File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ Features:
47
47
* Roslyn Analyzers and CodeFixes help the developers to implement the Smart Enums correctly
48
48
* [ Allows iteration over all items] ( https://github.com/PawelGerr/Thinktecture.Runtime.Extensions/wiki/Smart-Enums#what-is-implemented-for-you )
49
49
* [ Allows custom properties and methods] ( https://github.com/PawelGerr/Thinktecture.Runtime.Extensions/wiki/Smart-Enums#adding-behavior )
50
- * [ Switch-casemap ] ( https://github.com/PawelGerr/Thinktecture.Runtime.Extensions/wiki/Smart-Enums#switch-casemap )
50
+ * [ Switch-case/Map ] ( https://github.com/PawelGerr/Thinktecture.Runtime.Extensions/wiki/Smart-Enums#switch-casemap )
51
51
* Provides appropriate constructor, based on the specified properties/fields
52
52
* Provides means for lookup, cast and type conversion from key-type to Smart Enum and vice versa
53
53
* Provides proper implementation of ` Equals ` , ` GetHashCode ` , ` ToString ` and equality comparison via ` == ` and ` != `
@@ -173,6 +173,10 @@ returnValue = productType.Switch(logger,
173
173
ProductType .Groceries , static l => " Switch with Func<T>: Groceries" ,
174
174
ProductType .Housewares , static l => " Switch with Func<T>: Housewares" );
175
175
176
+ // Maps an item to another instance
177
+ returnValue = productType .Map (ProductType .Groceries , " Map: Groceries" ,
178
+ ProductType .Housewares , " Map: Housewares" );
179
+
176
180
------------
177
181
178
182
// Implements IParsable<T> which is especially helpful with minimal web apis.
You can’t perform that action at this time.
0 commit comments