public void Descriptions() { IDictionary <TestEnum, string> enums = EnumHelper.Descriptions <TestEnum>(); Assert.AreEqual(3, enums.Count); Assert.AreEqual("A", enums[TestEnum.A]); Assert.AreEqual("B", enums[TestEnum.B]); Assert.AreEqual("C", enums[TestEnum.C]); }
public IActionResult GetEnums() { var enums = new { Cartidges = EnumHelper.Descriptions <Cartridge>(), Types = EnumHelper.Descriptions <FirearmType>() }; return(Ok(enums)); }
public IActionResult GetEnums() { var enums = new { BrassManufacturers = EnumHelper.Descriptions <BrassManufacturer>(), BulletConstuction = EnumHelper.Descriptions <BulletConstruction>(), BulletTypes = EnumHelper.Descriptions <BulletType>(), BulletBaseTypes = EnumHelper.Descriptions <BulletBaseType>(), BulletManufacturers = EnumHelper.Descriptions <BulletManufacturer>(), Calibers = EnumHelper.Descriptions <Caliber>(), Cartidges = EnumHelper.Descriptions <Cartridge>(), PrimerTypes = EnumHelper.Descriptions <PrimerType>(), PrimerManufacturers = EnumHelper.Descriptions <PrimerManufacturer>(), Powders = EnumHelper.Descriptions <GunPowder>(), FirearmTypes = EnumHelper.Descriptions <FirearmType>() }; return(Ok(enums)); }