Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ValueOf/IValueOf.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace ValueOf
{
public interface IValueOf<TValue, TThis>
{
static abstract TThis From(TValue item);
TValue Value { get; }
bool Equals(object obj);
int GetHashCode();
string ToString();
}
}
4 changes: 2 additions & 2 deletions ValueOf/ValueOf.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;

namespace ValueOf
{
public class ValueOf<TValue, TThis> where TThis : ValueOf<TValue, TThis>, new()
public class ValueOf<TValue, TThis> : IValueOf<TValue, TThis> where TThis : ValueOf<TValue, TThis>, new()
{
private static readonly Func<TThis> Factory;

Expand Down
5 changes: 3 additions & 2 deletions ValueOf/ValueOf.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net451;netcoreapp1.1;netstandard1.3</TargetFrameworks>
<TargetFrameworks>net6.0</TargetFrameworks>
<LangVersion>preview</LangVersion>
<Authors>Harry McIntyre</Authors>
<Title>ValueOf - Easy 'One-Liner' Value Objects for c#. Get over your Primitive Obsession!</Title>
<Company>Harry McIntyre</Company>
Expand Down