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,12 @@ public static Maybe<TEnumeration> FromName(string name)
6666 : null ;
6767 }
6868
69+
70+ #if NET40
71+ public static ICollection < TEnumeration > All = EnumerationsById . Values . OfType < TEnumeration > ( ) . ToList ( ) ;
72+ #else
6973 public static IReadOnlyCollection < TEnumeration > All = EnumerationsById . Values . OfType < TEnumeration > ( ) . ToList ( ) ;
74+ #endif
7075
7176 public static bool Is ( string possibleName ) => All . Select ( e => e . Name ) . Contains ( possibleName ) ;
7277
@@ -106,7 +111,11 @@ protected EnumValueObject(string id)
106111 Id = id ;
107112 }
108113
114+ #if NET40
115+ public static ICollection < TEnumeration > All = Enumerations . Values . OfType < TEnumeration > ( ) . ToList ( ) ;
116+ #else
109117 public static IReadOnlyCollection < TEnumeration > All = Enumerations . Values . OfType < TEnumeration > ( ) . ToList ( ) ;
118+ #endif
110119
111120 public virtual string Id { get ; protected set ; }
112121
You can’t perform that action at this time.
0 commit comments