File tree Expand file tree Collapse file tree
CSharpFunctionalExtensions/ValueObject Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public static Maybe<TEnumeration> FromName(string name)
6666 : null ;
6767 }
6868
69- public static IReadOnlyCollection < TEnumeration > All = EnumerationsById . Values ;
69+ public static IReadOnlyCollection < TEnumeration > All = EnumerationsById . Values . OfType < TEnumeration > ( ) . ToList ( ) ;
7070
7171 public static bool Is ( string possibleName ) => All . Select ( e => e . Name ) . Contains ( possibleName ) ;
7272
@@ -106,7 +106,7 @@ protected EnumValueObject(string id)
106106 Id = id ;
107107 }
108108
109- public static IReadOnlyCollection < TEnumeration > All = Enumerations . Values ;
109+ public static IReadOnlyCollection < TEnumeration > All = Enumerations . Values . OfType < TEnumeration > ( ) . ToList ( ) ;
110110
111111 public virtual string Id { get ; protected set ; }
112112
You can’t perform that action at this time.
0 commit comments