diff --git a/ValueOf/IValueOf.cs b/ValueOf/IValueOf.cs new file mode 100644 index 0000000..b457eae --- /dev/null +++ b/ValueOf/IValueOf.cs @@ -0,0 +1,11 @@ +namespace ValueOf +{ + public interface IValueOf + { + static abstract TThis From(TValue item); + TValue Value { get; } + bool Equals(object obj); + int GetHashCode(); + string ToString(); + } +} \ No newline at end of file diff --git a/ValueOf/ValueOf.cs b/ValueOf/ValueOf.cs index b707102..01b2d10 100644 --- a/ValueOf/ValueOf.cs +++ b/ValueOf/ValueOf.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; @@ -6,7 +6,7 @@ namespace ValueOf { - public class ValueOf where TThis : ValueOf, new() + public class ValueOf : IValueOf where TThis : ValueOf, new() { private static readonly Func Factory; diff --git a/ValueOf/ValueOf.csproj b/ValueOf/ValueOf.csproj index 157e4c7..6c018ec 100644 --- a/ValueOf/ValueOf.csproj +++ b/ValueOf/ValueOf.csproj @@ -1,7 +1,8 @@ - + - net451;netcoreapp1.1;netstandard1.3 + net6.0 + preview Harry McIntyre ValueOf - Easy 'One-Liner' Value Objects for c#. Get over your Primitive Obsession! Harry McIntyre