Copper.Eic
0.0.8
dotnet add package Copper.Eic --version 0.0.8
NuGet\Install-Package Copper.Eic -Version 0.0.8
<PackageReference Include="Copper.Eic" Version="0.0.8" />
<PackageVersion Include="Copper.Eic" Version="0.0.8" />
<PackageReference Include="Copper.Eic" />
paket add Copper.Eic --version 0.0.8
#r "nuget: Copper.Eic, 0.0.8"
#:package Copper.Eic@0.0.8
#addin nuget:?package=Copper.Eic&version=0.0.8
#tool nuget:?package=Copper.Eic&version=0.0.8
Copper.Eic
⚡Small library that makes it easier to work with EIC codes.
Binaries
| Package | Version | Description |
|---|---|---|
| Copper.Eic | EIC library |
Value type
You can work with EICs by going
var eic = EIC.Parse("10YGB----------A");
var issuingOffice = eic.IssuingOffice; // 10
var type = eic.GetObjectTypeValue(); // EIC.ObjectTypeValue.Areas
var value = eic.Value; // "GB"
which can be great in its own right, but there's also fun to be had by using
EIC client
which will happily download ENTSO-E's full catalog of EIC codes like this:
var eics = await EicClient.DownloadAllEicCodesFromEntsoeAsync();
which at the time of writing yields 73985 EIC codes, wrapped in EicDetails objects that hold a bunch of stuff in addition to the actual EIC.
If you're building stuff that is always-on and relies on ENTSO-E's catalog of EIC codes, you might want to introduce
Caching
which can be easily done by registering this bad boy in your container
var cacheDir = Path.Combine(AppContext.BaseDirectory, "data", "eic");
services.AddSingleton(new EicCache(cacheDir));
and then you can have it injected into your own classes, e.g.
public class YourOwnClass(EicCache eicCache)
{
public void PrintCodes()
{
var eics = eicCache.AllEics;
// we have all the EICs now 🙂
}
}
The EIC catalog gets downloaded, and a background worker will periodically (by default once every hour) refresh it.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- nito.asyncex (>= 5.1.2)
- polly (>= 8.8.0)
-
net8.0
- nito.asyncex (>= 5.1.2)
- polly (>= 8.8.0)
-
net9.0
- nito.asyncex (>= 5.1.2)
- polly (>= 8.8.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.