AirlineCollection 1.2.0

dotnet add package AirlineCollection --version 1.2.0                
NuGet\Install-Package AirlineCollection -Version 1.2.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AirlineCollection" Version="1.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AirlineCollection --version 1.2.0                
#r "nuget: AirlineCollection, 1.2.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AirlineCollection as a Cake Addin
#addin nuget:?package=AirlineCollection&version=1.2.0

// Install AirlineCollection as a Cake Tool
#tool nuget:?package=AirlineCollection&version=1.2.0                
  • Light-weight
  • Device-agnostic country data (Alternative to the .NET Framework RegionInfo data)
  • Preloaded airline information wtih IATA 2-digit code, ICAO 3-digit code, and names.
  • Airline code lookup and normalization
  • Convenient static data collection with methods
  • Fully customizable instance data collection (to add new data and to remove old data)
  • IEnumerable implementation (can be used with LINQ)
  • DI-friendly interface
  • Unit Tested
  • No external library dependencies
  • No external calls
Name Format Description Example Notes
Iata2LetterCode Alphanumeric(2) IATA 2-Letter Code "AA" Commonly used for flight numbers; Can be recycled from a defunct airline
Icao3LetterCode Alphanumeric(3) ICAO 3-Letter Code "AAL" Occasionally used for flight numbers
Prefix Numeric(3) IATA-assigned air waybill prefix "001"
IataName (string) Name registered at IATA "American Airlines Inc." Not recommended for general use
IcaoName (string) Name registered at ICAO "American Airlines" Not recommended for general use
CallSign alphanumeric Identification of an aircraft in air-ground communications "American"
Name (string) General name "American Airlines" The most commonly used name


Read-only data collection


string code = "AA";
bool valid = AirlineCollection.Contains(code);  // True


string lowerCased = "aa";
bool valid = AirlineCollection.Contains(lowerCased);  // True


int numericCode = 1;
bool valid = AirlineCollection.Contains(numericCode);  // True


string iata2DigitCode = "aa";
string code = AirlineCollection.Normalize(iata2DigitCode);  // "AA"


string icao3DigitCode = "aal";
string code = AirlineCollection.Normalize(icao3DigitCode);  // "AAL"


int numericCode = 1;
string code = AirlineCollection.Normalize(numericCode);  // "001"


string invalidCode = "xyz";
string code = AirlineCollection.Normalize(invalidCode);  // null


int numericCode = 99999;
string code = AirlineCollection.Normalize(numericCode);  // null


string code = "AA";
var country = AirlineCollection.GetAirline(code);  // { "Iata2LetterCode":"AA", "Icao3LetterCode":"USA", "Prefix":"001", "IataName":"American Airlines Inc.", "IcaoName":"American Airlines", "Callsign":"American Airlines", "Name":"American Airlines" }


string invalidCode = "XYZ";
var airline = CountryCollection.GetAirline(code);  // null

<br />


Customizable data collection (All instance members can be mocked in unit testing by implementing IAirlineCollection)


string code = "AA";
var airline = new AirlineCollection()[code];  // { "Iata2LetterCode":"AA", "Icao3LetterCode":"USA", "Prefix":"001", "IataName":"American Airlines Inc.", "IcaoName":"American Airlines", "Callsign":"American Airlines", "Name":"American Airlines" }

.Add(iata2LetterCode, icao3LetterCode, prefix)

.Add(iata2LetterCode, icao3LetterCode, prefix, iataName, icaoName, callSign, name)

var airlines = new AirlineCollection();
airlines.Add("XX", "XXX", "999");
airlines.Add("ZZ", "ZZZ", "000", "ZZ Airline", "ZZ Air LLC", "ZZA", "ZZ Air");


var code = "AA";
var airlines = new AirlineCollection();

<br />



string code = "AA";
bool valid = new AirlineCollection().Contains(code);  // extension method


string iata2DigitCode = "aa";
string code = new AirlineCollection().Normalize(iata2DigitCode);  // extension method


string code = "AA";
var country = AirlineCollection.GetAirline(code);  // extension method
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 is compatible. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net5.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.0 2,941 12/5/2021
1.1.0 292 12/2/2021
1.0.0 3,485 11/25/2021

* Added more confirmed airlines
* Passed all unit tests (unchanged)