Exemplo n.º 1
0
 /// <summary>
 /// Rewrite a <see cref="ConstantCriteria" /> as a <see cref="MatchAllCriteria" /> that might be
 /// wrapped in a <see cref="NotCriteria" /> depending on whether it is true or false respectively.
 /// </summary>
 /// <param name="constant"><see cref="ConstantCriteria" /> to rewrite.</param>
 /// <returns>
 /// <see cref="MatchAllCriteria" /> if true; otherwise a <see cref="MatchAllCriteria" />
 /// wrapped in a <see cref="NotCriteria" /> if false.
 /// </returns>
 static ICriteria Rewrite(ConstantCriteria constant)
 {
     return(constant == ConstantCriteria.True ? MatchAllCriteria.Instance : NotCriteria.Create(MatchAllCriteria.Instance));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Rewrite a <see cref="ConstantCriteria" /> as a <see cref="MatchAllCriteria" /> that might be 
 /// wrapped in a <see cref="NotCriteria" /> depending on whether it is true or false respectively.
 /// </summary>
 /// <param name="constant"><see cref="ConstantCriteria" /> to rewrite.</param>
 /// <returns>
 /// <see cref="MatchAllCriteria" /> if true; otherwise a <see cref="MatchAllCriteria" /> 
 /// wrapped in a <see cref="NotCriteria" /> if false.
 /// </returns>
 private static ICriteria Rewrite(ConstantCriteria constant)
 {
     return constant == ConstantCriteria.True ? MatchAllCriteria.Instance : NotCriteria.Create(MatchAllCriteria.Instance);
 }