A class in Alta.Api.DataTransferModels, Alta.Api.DataTransferModels.Models.Shared.
A server region, with the fixed list of known regions. Note the constructor arguments are swapped in the presets: FriendlyName holds the code (USEast1) and ShortName holds the long name.
Constructors
| Member | What it is |
|---|
Region(string friendlyName, string shortName) | Creates a Region from friendlyName and shortName. |
Fields
| Member | What it is |
|---|
static readonly Region ApNortheast1 | Asia Pacific (Tokyo). |
static readonly Region ApSoutheast2 | Asia Pacific (Sydney). |
static readonly Region CnNorth1 | China (Beijing). |
static readonly Region EuCentral1 | EU Central (Frankfurt). |
static readonly Region UsEast1 | US East (Virginia). |
static readonly Region UsEast2 | US East (Ohio). |
static readonly Region UsWest1 | US West (N. California). |
1 private and internal field
| Member | What it is |
|---|
private static HashSet<Region> allRegions | Backing set for AllRegions. |
Properties
| Member | What it is |
|---|
static IEnumerable<Region> AllRegions { get; } | All seven preset regions, built on first use. |
string FriendlyName { get; } | For the presets this holds the code, such as USEast1, because the constructor arguments are swapped. |
string ShortName { get; } | For the presets this holds the long name, such as US East (Virginia). This is what goes into JSON. |
Methods
| Member | What it is |
|---|
static Region Parse(string name) | Finds the preset whose ShortName matches, which for the presets is the long name like US East (Virginia). Returns null if none. |