Public static readonly ProductType Housewares = new HousewaresProductType() Public static readonly ProductType Groceries = new( "Groceries ", requiresFoodVendorLicense: true) All other features mentioned above are generated by the Roslyn Source Generators in the background. MessagePack support ( IMessagePackFormatter)ĭefinition of a new Smart Enum without any custom properties and methods.Entity Framework Core support ( ValueConverter). ![]() ASP.NET Core support (model binding and model validation).Allows changing the propery name Key, which holds the underlying value - thanks to Roslyn Source Generator.Allows custom validation of constructor arguments.Allows extensions of existing Smart Enums.Choice between always-valid IEnum and maybe-valid IValidatableEnum.Provides proper implementation of Equals, GetHashCode, ToString and equality comparison via = and !=.Provides means for lookup, cast and type conversion from key-type to Smart Enum and vice versa.Provides appropriate constructor based on the specified properties/fields.Roslyn Analyzers and CodeFixes help the developers to implement the Smart Enums correctly.This library provides some interfaces, classes, Roslyn Source Generators, Roslyn Analyzers and Roslyn CodeFixes for implementation of Smart Enums and Value Objects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
June 2023
Categories |