Skip to content

Instantly share code, notes, and snippets.

@FelicePollano
Created December 17, 2011 13:12
Show Gist options
  • Select an option

  • Save FelicePollano/1490175 to your computer and use it in GitHub Desktop.

Select an option

Save FelicePollano/1490175 to your computer and use it in GitHub Desktop.
public interface IContract<T>
{
IContract<T> Is<TT>();
IContract<T> IsEqual<TT>(TT of) where TT : T,IEquatable<TT>;
IContract<T> IsGreatherThan<TT>(TT of) where TT : T,IComparable;
IContract<T> IsGreatherThanOrEqual<TT>(TT of) where TT :T, IComparable;
IContract<T> IsLessThan<TT>(TT of) where TT : T,IComparable;
IContract<T> IsLessThanOrEq<TT>(TT of) where TT : T,IComparable;
IContract<T> IsNot<TT>();
IContract<T> IsNotEqual<TT>(TT of) where TT : T,IEquatable<TT>;
IContract<T> IsNotNull();
IContract<T> IsNotTheSameOf(object of);
IContract<T> IsNull();
IContract<T> IsTheSameOf(object of);
IContract<T> Meet(Expression<Predicate<T>> predicate);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment