public override bool IsEquivalentTo(UriTemplateQueryValue other)
 {
     if (other == null)
     {
         return false;
     }
     return (other.Nature == UriTemplatePartType.Variable);
 }
 public override bool IsEquivalentTo(UriTemplateQueryValue other)
 {
     if (other == null)
     {
         return(false);
     }
     return(other.Nature == UriTemplatePartType.Variable);
 }
コード例 #3
0
 public override bool IsEquivalentTo(UriTemplateQueryValue other)
 {
     if (other == null)
     {
         Fx.Assert("why would we ever call this?");
         return false;
     }
     return (other.Nature == UriTemplatePartType.Variable);
 }
 public override bool IsEquivalentTo(UriTemplateQueryValue other)
 {
     if (other == null)
     {
         Fx.Assert("why would we ever call this?");
         return(false);
     }
     return(other.Nature == UriTemplatePartType.Variable);
 }
コード例 #5
0
 public static bool IsNullOrEmpty(UriTemplateQueryValue utqv)
 {
     if (utqv == null)
     {
         return true;
     }
     if (utqv == UriTemplateQueryValue.Empty)
     {
         return true;
     }
     return false;
 }
コード例 #6
0
 public static bool IsNullOrEmpty(UriTemplateQueryValue utqv)
 {
     if (utqv == null)
     {
         return(true);
     }
     if (utqv == UriTemplateQueryValue.Empty)
     {
         return(true);
     }
     return(false);
 }
コード例 #7
0
        public override bool IsEquivalentTo(UriTemplateQueryValue other)
        {
            if (other == null)
            {
                return(false);
            }
            if (other.Nature != UriTemplatePartType.Literal)
            {
                return(false);
            }
            UriTemplateLiteralQueryValue value2 = other as UriTemplateLiteralQueryValue;

            return(this.CompareTo(value2) == 0);
        }
コード例 #8
0
        public override bool IsEquivalentTo(UriTemplateQueryValue other)
        {
            if (other == null)
            {
                Fx.Assert("why would we ever call this?");
                return(false);
            }
            if (other.Nature != UriTemplatePartType.Literal)
            {
                return(false);
            }
            UriTemplateLiteralQueryValue otherAsLiteral = other as UriTemplateLiteralQueryValue;

            Fx.Assert(otherAsLiteral != null, "The nature requires that this will be OK");
            return(CompareTo(otherAsLiteral) == 0);
        }
コード例 #9
0
        private static string[] GetQueryLiterals(UriTemplate up, Dictionary <string, byte> queryVarNames)
        {
            string[] strArray = new string[queryVarNames.Count];
            int      index    = 0;

            foreach (string str in queryVarNames.Keys)
            {
                UriTemplateQueryValue value2 = up.queries[str];
                if (value2 == UriTemplateQueryValue.Empty)
                {
                    strArray[index] = null;
                }
                else
                {
                    strArray[index] = ((UriTemplateLiteralQueryValue)value2).AsRawUnescapedString();
                }
                index++;
            }
            return(strArray);
        }
コード例 #10
0
        static string[] GetQueryLiterals(UriTemplate up, Dictionary <string, byte> queryVarNames)
        {
            string[] queryLitVals = new string[queryVarNames.Count];
            int      i            = 0;

            foreach (string queryVarName in queryVarNames.Keys)
            {
                Fx.Assert(up.queries.ContainsKey(queryVarName), "query doesn't have name");
                UriTemplateQueryValue utqv = up.queries[queryVarName];
                Fx.Assert(utqv.Nature == UriTemplatePartType.Literal, "query for name is not literal");
                if (utqv == UriTemplateQueryValue.Empty)
                {
                    queryLitVals[i] = null;
                }
                else
                {
                    queryLitVals[i] = ((UriTemplateLiteralQueryValue)(utqv)).AsRawUnescapedString();
                }
                ++i;
            }
            return(queryLitVals);
        }
コード例 #11
0
 public override bool IsEquivalentTo(UriTemplateQueryValue other)
 {
     return(other == UriTemplateQueryValue.Empty);
 }
コード例 #12
0
 public static bool IsNullOrEmpty(UriTemplateQueryValue utqv)
 {
     return((utqv == null) || (utqv == Empty));
 }
コード例 #13
0
 public abstract bool IsEquivalentTo(UriTemplateQueryValue other);
コード例 #14
0
 public override bool IsEquivalentTo(UriTemplateQueryValue other)
 {
     return (other == UriTemplateQueryValue.Empty);
 }
コード例 #15
0
 public abstract bool IsEquivalentTo(UriTemplateQueryValue other);
 public static bool IsNullOrEmpty(UriTemplateQueryValue utqv)
 {
     return ((utqv == null) || (utqv == Empty));
 }