public static bool CompareReferenceArgument(this PredicateArgument argument, Func <ReferenceArgument, bool> comparer) { Contract.Requires(argument != null); Contract.Requires(comparer != null); var stringArgument = argument as ReferenceArgument; return(stringArgument != null && comparer(stringArgument)); }
public static bool CompareContractResultArgument(this PredicateArgument argument, Func <ContractResultPredicateArgument, bool> comparer) { Contract.Requires(argument != null); Contract.Requires(comparer != null); var contractResultPredicateArgument = argument as ContractResultPredicateArgument; Contract.Assert(contractResultPredicateArgument != null); return(comparer(contractResultPredicateArgument)); }
public void PredicateArgument_ParseShouldFail() { // Arrange PredicateArgument argument = new PredicateArgument(); IStringReader reader = new StringReader("foo::bar"); // Act ReadResults readResults = argument.Parse(reader, out _); // Assert Assert.IsFalse(readResults.Successful); }
public ExpressionPredicateCheck(PredicateArgument argument, ICSharpExpression expression) : base(argument) { Contract.Requires(expression != null); _expression = expression; }
private EnumValidationPredicateCheck(PredicateArgument argument, IClrTypeName callSiteType) : base(argument, callSiteType) { Contract.Assert(IsEnum(callSiteType)); }
protected MethodCallPredicateCheck(PredicateArgument argument, IClrTypeName callSiteType) : base(argument) { Contract.Requires(callSiteType != null); CallSiteType = callSiteType; }
protected PredicateCheck(PredicateArgument argument) { Contract.Requires(argument != null); _argument = argument; }
private EqualityExpressionPredicateCheck(PredicateArgument argument) : base(argument) {}
private EqualityExpressionPredicateCheck(PredicateArgument argument) : base(argument) { }