Kunc.RiotGames.Lor.DeckCodes
0.2.0
Prefix Reserved
See the version list below for details.
dotnet add package Kunc.RiotGames.Lor.DeckCodes --version 0.2.0
NuGet\Install-Package Kunc.RiotGames.Lor.DeckCodes -Version 0.2.0
<PackageReference Include="Kunc.RiotGames.Lor.DeckCodes" Version="0.2.0" />
paket add Kunc.RiotGames.Lor.DeckCodes --version 0.2.0
#r "nuget: Kunc.RiotGames.Lor.DeckCodes, 0.2.0"
// Install Kunc.RiotGames.Lor.DeckCodes as a Cake Addin #addin nuget:?package=Kunc.RiotGames.Lor.DeckCodes&version=0.2.0 // Install Kunc.RiotGames.Lor.DeckCodes as a Cake Tool #tool nuget:?package=Kunc.RiotGames.Lor.DeckCodes&version=0.2.0
Kunc.RiotGames.Lor.DeckCodes
This is a C# implementation of the C# library RiotGames/LoRDeckCodes. This library is faster and allocate less memory.
Usage
var deck1 = new List<DeckItem>()
{
new() { CardCode = "01DE002", Count = 4 },
new() { CardCode = "02BW003", Count = 2 },
new() { CardCode = "02BW010", Count = 3 },
...
}
var deckEncoder = new LorDeckEncoder();
string code = deckEncoder.GetCodeFromDeck(deck1);
List<DeckCard> deck2 = deckEncoder.GetDeckFromCode<DeckCard>(code);
You can also use your own class, all you have to do is implement 2 interface
IDeckCard
- to get deck from code
IReadOnlyDeckCard
- to get the code from the deck
class MyCard : IDeckItem, IReadOnlyDeckItem
{
public string CardCode { get; set; }
public int Count { get; set; }
// ...
}
var deckEncoder = new LorDeckEncoder();
List<MyCard> deck = deckEncoder.GetDeckFromCode<MyCard>("SomeCode");
string code = deckEncoder.GetCodeFromDeck(deck);
Build-in DI support
serviceCollection.AddLorDeckCodes();
// ...
var deckEncoder = serviceProvider.GetRequiredService<ILorDeckEncoder>();
Disclaimer
Kunc.RiotGames.Lor.DeckCodes
isn't endorsed by Riot Games and doesn't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties. Riot Games, and all associated properties are trademarks or registered trademarks of Riot Games, Inc.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- CommunityToolkit.HighPerformance (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Added default extension method for IServiceCollection.