/// <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()); }
internal static Type GetExpectedType(this RESTableMetaCondition condition) => condition switch {