public static int getInt(IntIdentifier identifier) { switch (_theme) { case Theme.Dark: if (_int_ThemeDark.ContainsKey(identifier)) { return(_int_ThemeDark[identifier]); } break; case Theme.Light: if (_int_ThemeLight.ContainsKey(identifier)) { return(_int_ThemeLight[identifier]); } break; case Theme.Contrast: if (_int_ThemeContrast.ContainsKey(identifier)) { return(_int_ThemeContrast[identifier]); } break; } if (_int_ThemeDark.ContainsKey(identifier)) { return(_int_ThemeDark[identifier]); } return(1); }
public static bool TryParse(string value, out PersonID entityID) { if (IntIdentifier.TryParse(value, out var id)) { entityID = new PersonID(id); return(true); } else { entityID = new PersonID(); return(false); } }
public IntLeftRightChain(int[] arr) { IIdentifier rootIdentifier = new IntIdentifier(0); RootLink = new IntLink(arr[0], rootIdentifier); //Add to Chain for (int index = 1; index < arr.Length; index++) { int value = arr[index]; ILink <int> link = RootLink; do { if (value < link.GetValue()) { ILink <int> linked = link.GetLeftLink(); if (linked == null) { IIdentifier identifier = new IntIdentifier(index); ILink <int> leftLink = new IntLink(value, identifier); link.AddLeftLink(leftLink); break; } link = linked; } else { ILink <int> linked = link.GetRightLink(); if (linked == null) { IIdentifier identifier = new IntIdentifier(index); ILink <int> rightLink = new IntLink(value, identifier); link.AddRightLink(rightLink); break; } link = linked; } }while (true); } }
/// <summary> /// Maps the IDataReader values to a Categories object /// </summary> /// <param name="reader">The IDataReader to map</param> protected override void MapObject(IDataReader reader) { int ordinal; ordinal = reader.GetOrdinal("CategoryID"); if (!reader.IsDBNull(ordinal)) { _CategoryID = ((System.Int32)(reader.GetValue(ordinal))); } ordinal = reader.GetOrdinal("CategoryName"); if (!reader.IsDBNull(ordinal)) { _CategoryName = ((System.String)(reader.GetValue(ordinal))); } ordinal = reader.GetOrdinal("Description"); _Description = (!reader.IsDBNull(ordinal))?(System.String?)((System.String)(reader.GetValue(ordinal))) : null; ordinal = reader.GetOrdinal("Picture"); _Picture = (!reader.IsDBNull(ordinal))?(System.Byte[]?)((System.Byte[])(reader.GetValue(ordinal))) : null; _ID = new IntIdentifier($pkCallingArgumets); }
public PersonID(IntIdentifier id) : base(id.ID) { /* No additional construction required. */ }
public static int get(this IntIdentifier identifier) { return(PropertyManager.getInt(identifier)); }
protected bool Equals(IntIdentifier other) { return(Id == other.Id); }
protected bool Equals(IntIdentifier other) { return Id == other.Id; }