Example #1
0
            /// <summary>
            /// 解析
            /// </summary>
            /// <param name="value">仅支持string[]、string、{}、object、string(json)</param>
            /// <returns></returns>
            public Refer Parse(object value)
            {
                Refer result = value as Refer;

                if (result != null)
                {
                    return(result);
                }
                return(Parse(NodeValue.As(value)));
            }
Example #2
0
            /// <summary>
            /// 解析
            /// </summary>
            /// <param name="value">仅支持string[]、string、{}、object、string(json)</param>
            /// <returns></returns>
            public Define Parse(object value)
            {
                Define result = value as Define;

                if (result != null)
                {
                    return(result);
                }
                return(Parse(NodeValue.As(value)));
            }
Example #3
0
 void Next_Array(Condition parent, NodeValue jsonValue, NodeValueTypes[] types)
 {
     foreach (object item in (System.Collections.IEnumerable)jsonValue.Value)
     {
         NodeValue json = NodeValue.As(item);
         if (System.Array.IndexOf(types, json.Type) > -1)
         {
             Next(parent, json);
         }
     }
 }
Example #4
0
            /// <summary>
            /// 解析
            /// </summary>
            /// <param name="value"></param>
            /// <returns></returns>
            public Condition Parse(object value)
            {
                Condition result = value as Condition;

                if (result != null)
                {
                    return(result);
                }
                result = new Condition("$root", ConditionTypes.Root);
                Parse(result, NodeValue.As(value));
                return(result);
            }
Example #5
0
 void Parse(Condition parent, object value)
 {
     Next(parent, NodeValue.As(value));
 }