Example #1
0
 /// <summary>
 /// Creates a new custom UriCondition encoding a meta-condition
 /// </summary>
 public UriCondition(RESTableMetaCondition metaCondition, string valueLiteral)
 {
     if (metaCondition is < Unsafe or > Safepost)
     {
         throw new ArgumentOutOfRangeException(nameof(metaCondition));
     }
     Key           = metaCondition.ToString().ToLower();
     Operator      = Operator.EQUALS;
     ValueLiteral  = valueLiteral;
     ValueTypeCode = Type.GetTypeCode(metaCondition.GetExpectedType());
 }
Example #2
0
 internal static Type GetExpectedType(this RESTableMetaCondition condition) => condition switch
 {