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);
 }
 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);
 }
 public static bool IsNullOrEmpty(UriTemplateQueryValue utqv)
 {
     if (utqv == null)
     {
         return true;
     }
     if (utqv == UriTemplateQueryValue.Empty)
     {
         return true;
     }
     return false;
 }
 public static bool IsNullOrEmpty(UriTemplateQueryValue utqv)
 {
     if (utqv == null)
     {
         return(true);
     }
     if (utqv == UriTemplateQueryValue.Empty)
     {
         return(true);
     }
     return(false);
 }
Beispiel #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);
        }
        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);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #11
0
 public override bool IsEquivalentTo(UriTemplateQueryValue other)
 {
     return(other == UriTemplateQueryValue.Empty);
 }
Beispiel #12
0
 public static bool IsNullOrEmpty(UriTemplateQueryValue utqv)
 {
     return((utqv == null) || (utqv == Empty));
 }
Beispiel #13
0
 public abstract bool IsEquivalentTo(UriTemplateQueryValue other);
 public override bool IsEquivalentTo(UriTemplateQueryValue other)
 {
     return (other == UriTemplateQueryValue.Empty);
 }
 public abstract bool IsEquivalentTo(UriTemplateQueryValue other);
 public static bool IsNullOrEmpty(UriTemplateQueryValue utqv)
 {
     return ((utqv == null) || (utqv == Empty));
 }