This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add extensions section and update ordering
- Loading branch information
1 parent
32328a7
commit 045f316
Showing
4 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
106 changes: 106 additions & 0 deletions
106
BlossomiShymae.RiotBlossomDocs/content/4.fundamentals/4.extensions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
--- | ||
title: "Extensions" | ||
description: "" | ||
--- | ||
|
||
# Extensions | ||
|
||
:badge[Added in 1.2.0] | ||
|
||
RiotBlossom provides extensions that turbo charges the provided type enums! This should | ||
be way better than the old way of manually referencing a mapper or converter, hehe! | ||
|
||
![hehe](/img/fundamentals-extensions-hehe.png) | ||
|
||
Provided examples of each available method are shown below: | ||
|
||
## LeagueDivisionExtensions | ||
|
||
```csharp | ||
// => "IV" | ||
LeagueDivision.IV.GetValue(); | ||
``` | ||
|
||
## LeagueQueueExtensions | ||
|
||
```csharp | ||
// => "RANKED_SOLO_5x5" | ||
LeagueQueue.RankedSolo5x5.GetValue(); | ||
``` | ||
|
||
## LeagueTierExtensions | ||
|
||
```csharp | ||
// => "PLATINUM" | ||
LeagueTier.Platinum.GetValue(); | ||
``` | ||
|
||
## LorRegionExtensions | ||
|
||
```csharp | ||
// => "americas" | ||
LorRegion.Americas.GetId(); | ||
``` | ||
|
||
## PlatformExtensions | ||
|
||
```csharp | ||
// => "JP" | ||
Platform.Japan.GetAbbreviation(); | ||
``` | ||
|
||
```csharp | ||
// => "Europe Nordic and East" | ||
Platform.EuropeNordicEast.GetPrettyName(); | ||
``` | ||
|
||
```csharp | ||
// => Region.Asia | ||
Platform.Korea.GetRegion(); | ||
``` | ||
|
||
```csharp | ||
// => "na1" | ||
Platform.NorthAmerica.GetId(); | ||
``` | ||
|
||
```csharp | ||
// => "americas" | ||
Platform.Brazil.GetRegionId(); | ||
``` | ||
|
||
```csharp | ||
// => "ja_JP" | ||
Platform.Japan.GetDefaultLocale(); | ||
``` | ||
|
||
## RegionExtensions | ||
|
||
```csharp | ||
// => "americas" | ||
Region.Americas.GetId(); | ||
``` | ||
|
||
```csharp | ||
// => "Asia" | ||
Region.Asia.GetPrettyName(); | ||
``` | ||
|
||
## TftLeagueQueueExtensions | ||
|
||
```csharp | ||
// => "RANKED_TFT_TURBO" | ||
TftLeagueQueue.RankedTftTurbo.GetValue(); | ||
``` | ||
|
||
## ValRegionExtensions | ||
|
||
```csharp | ||
// => "NA" | ||
ValRegion.NorthAmerica.GetAbbreviation(); | ||
``` | ||
|
||
```csharp | ||
// => "ap" | ||
ValRegion.AsiaPacific.GetId(); | ||
``` |
File renamed without changes.
File renamed without changes.
Binary file added
BIN
+18.4 KB
BlossomiShymae.RiotBlossomDocs/public/img/fundamentals-extensions-hehe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.