public MyClassWithCstr(StandardEnum standard, NumberedEnum numbered, FlagsEnum flags, ManualSetupEnum manual, IgnoredEnum ignored) { this.Standard = standard; this.Numbered = numbered; this.Flags = flags; this.Manual = manual; this.Ignored = ignored; }
/// <summary> /// Initializes a new instance of the <see cref="DataTypeSchema" /> class. /// </summary> /// <param name="Standard">Standard (required).</param> /// <param name="Nickname">Nickname (required) (default to "null").</param> public DataTypeSchema(StandardEnum Standard = default(StandardEnum), string Nickname = "null") { // to ensure "Standard" is required (not null) if (Standard == null) { throw new InvalidDataException("Standard is a required property for DataTypeSchema and cannot be null"); } else { this.Standard = Standard; } // to ensure "Nickname" is required (not null) if (Nickname == null) { throw new InvalidDataException("Nickname is a required property for DataTypeSchema and cannot be null"); } else { this.Nickname = Nickname; } }
public int?DefaultFullApiResponseEndpointWithUriParameterAndBodyParameterAndExtraParameters(int myInt, [InUri] StandardModel uri, [InBody] StandardNullableModel body, int?myNullableInt, StandardEnum?myNullableEnum, StandardEnum myEnum) { return(body.IntProp); }
public MyClassWithCstr(StandardEnum standard, NumberedEnum numbered, FlagsEnum flags, ManualSetupEnum manual, IgnoredEnum ignored) { this.Standard = standard; this.Numbered = numbered; this.Flags = flags; this.Manual = manual; this.Ignored = ignored; }
public void FromDescription_StandardEnums(string text, StandardEnum expectedEnum) { StandardEnum result = text.FromDescription <StandardEnum>(); Assert.AreEqual(expectedEnum, result); }
public void ToDescription_StandardEnums(StandardEnum se, string expectedResult) { var abbr = se.ToDescription(); Assert.AreEqual(expectedResult, abbr); }
public void ToEnumName_StandardEnums(StandardEnum se, string expectedResult) { var abbr = se.ToEnumName(); Assert.AreEqual(expectedResult, abbr); }
public void FromEnumName_StandardEnums(string text, StandardEnum expectedEnum) { StandardEnum result = text.FromEnumName <StandardEnum>(); Assert.AreEqual(expectedEnum, result); }