public static TypeSpecification IsEqualTo(this TypeSpecification @this, Type expected) { Guard.NotNull(@this, "this"); Guard.NotNull(expected, "expected"); return(@this.Combine(t => Outcome.FailIf(t != expected, String.Format("Not the expected type: {0}", expected.Name)))); }
public static TypeSpecification IsGenericArgument(this TypeSpecification @this) { Guard.NotNull(@this, "this"); return(@this.Combine(t => Outcome.FailIf(!t.IsGenericParameter, "Was not a generic argument."))); }