internal static bool ChangeProperty(string value, [_0008._0012(2)] string _0003, CultureInfo filter, out DateTimeOffset connection2)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (value.Length > 0)
     {
         if (value[0] == '/')
         {
             if (value.Length >= 9 && value.StartsWith("/Date(", StringComparison.Ordinal) && value.EndsWith(")/", StringComparison.Ordinal) && ListProperty(new InvocationTest(value.ToCharArray(), 0, value.Length), out connection2))
             {
                 return(true);
             }
         }
         else if (value.Length >= 19 && value.Length <= 40 && char.IsDigit(value[0]) && value[10] == 'T' && DateTimeOffset.TryParseExact(value, "yyyy-MM-ddTHH:mm:ss.FFFFFFFK", CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind, out connection2) && DestroyProperty(new InvocationTest(value.ToCharArray(), 0, value.Length), out connection2))
         {
             return(true);
         }
         if (!SetterTest.StartReader(_0003) && SelectProperty(value, _0003, filter, out connection2))
         {
             return(true);
         }
     }
     connection2 = default(DateTimeOffset);
     return(false);
 }
 internal static bool PostProperty(InvocationTest setup, [_0008._0012(2)] string _0003, CultureInfo state, out DateTimeOffset res2)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (setup._0002() > 0)
     {
         int num = setup._0001();
         if (setup[num] == '/')
         {
             if (setup._0002() >= 9 && setup.CalculateReader("/Date(") && setup.GetReader(")/") && ListProperty(setup, out res2))
             {
                 return(true);
             }
         }
         else if (setup._0002() >= 19 && setup._0002() <= 40 && char.IsDigit(setup[num]) && setup[num + 10] == 'T' && DestroyProperty(setup, out res2))
         {
             return(true);
         }
         if (!SetterTest.StartReader(_0003) && SelectProperty(setup.ToString(), _0003, state, out res2))
         {
             return(true);
         }
     }
     res2 = default(DateTimeOffset);
     return(false);
 }
 internal static bool RemoveProperty(string asset, PsMaxLengths connection, [_0008._0012(2)] string _0004, CultureInfo res2, out DateTime res3)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (asset.Length > 0)
     {
         if (asset[0] == '/')
         {
             if (asset.Length >= 9 && asset.StartsWith("/Date(", StringComparison.Ordinal) && asset.EndsWith(")/", StringComparison.Ordinal) && GetProperty(new InvocationTest(asset.ToCharArray(), 0, asset.Length), connection, out res3))
             {
                 return(true);
             }
         }
         else if (asset.Length >= 19 && asset.Length <= 40 && char.IsDigit(asset[0]) && asset[10] == 'T' && DateTime.TryParseExact(asset, "yyyy-MM-ddTHH:mm:ss.FFFFFFFK", CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind, out res3))
         {
             res3 = ReadProperty(res3, connection);
             return(true);
         }
         if (!SetterTest.StartReader(_0004) && StartProperty(asset, connection, _0004, res2, out res3))
         {
             return(true);
         }
     }
     res3 = default(DateTime);
     return(false);
 }
 internal static bool RateProperty(InvocationTest task, PsMaxLengths map, [_0008._0012(2)] string _0004, CultureInfo item2, out DateTime attr3)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (task._0002() > 0)
     {
         int num = task._0001();
         if (task[num] == '/')
         {
             if (task._0002() >= 9 && task.CalculateReader("/Date(") && task.GetReader(")/") && GetProperty(task, map, out attr3))
             {
                 return(true);
             }
         }
         else if (task._0002() >= 19 && task._0002() <= 40 && char.IsDigit(task[num]) && task[num + 10] == 'T' && ComputeProperty(task, map, out attr3))
         {
             return(true);
         }
         if (!SetterTest.StartReader(_0004) && StartProperty(task.ToString(), map, _0004, item2, out attr3))
         {
             return(true);
         }
     }
     attr3 = default(DateTime);
     return(false);
 }
示例#5
0
        private string CustomizeRequest(CreatorIssuer key, XmlNamespaceManager cont)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            string text = (key._0003() == null || (key._0001() == "xmlns" && key._0003() == "http://www.w3.org/2000/xmlns/")) ? null : cont.LookupPrefix(key._0003());

            if (!SetterTest.StartReader(text))
            {
                return(text + ":" + XmlConvert.DecodeName(key._0001()));
            }
            return(XmlConvert.DecodeName(key._0001()));
        }
示例#6
0
        private InfoRequestStrategy FindIterator(string setup, AttrBroadcasterFilter cust, string dir, XmlNamespaceManager pred2)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            string text  = _0005() ? XmlConvert.EncodeLocalName(setup) : XmlConvert.EncodeName(setup);
            string text2 = SetterTest.StartReader(dir) ? pred2.DefaultNamespace : pred2.LookupNamespace(dir);

            if (SetterTest.StartReader(text2))
            {
                return(cust._0001(text));
            }
            return(cust._0001(text, text2));
        }
示例#7
0
        private void SortRequest(TagTestItem spec, AttrBroadcasterFilter connection, CreatorIssuer template, string pred2, XmlNamespaceManager connection3)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            if (SetterTest.StartReader(pred2))
            {
                throw StrategyError.PatchComposer(spec, "XmlNodeConverter cannot convert JSON with an empty property name to XML.");
            }
            Dictionary <string, string> token = null;
            string asset = null;

            if (!_0005())
            {
                token = (CheckIterator(spec) ? DisableIterator(spec, connection3) : null);
                asset = CustomerListAnnotation.CountIssuer(pred2);
                if (pred2.ExcludeReader('@'))
                {
                    string text      = pred2.Substring(1);
                    string reference = CustomerListAnnotation.CountIssuer(text);
                    PublishRequest(spec, connection, template, pred2, text, connection3, reference);
                    return;
                }
                if (pred2.ExcludeReader('$'))
                {
                    switch (pred2)
                    {
                    case "$values":
                        pred2 = pred2.Substring(1);
                        asset = connection3.LookupPrefix("http://james.newtonking.com/projects/json");
                        CallRequest(spec, connection, template, pred2, connection3, asset, token);
                        return;

                    case "$id":
                    case "$ref":
                    case "$type":
                    case "$value":
                    {
                        string v          = pred2.Substring(1);
                        string reference2 = connection3.LookupPrefix("http://james.newtonking.com/projects/json");
                        PublishRequest(spec, connection, template, pred2, v, connection3, reference2);
                        return;
                    }
                    }
                }
            }
            else if (CheckIterator(spec))
            {
                spec.SortError();
            }
            CallRequest(spec, connection, template, pred2, connection3, asset, token);
        }
示例#8
0
        private static void PublishRequest(TagTestItem def, AttrBroadcasterFilter cont, CreatorIssuer consumer, string res2, string v3, XmlNamespaceManager value4, string reference5)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            if (consumer._0001() == XmlNodeType.Document)
            {
                throw StrategyError.PatchComposer(def, "JSON root object has property '{0}' that will be converted to an attribute. A root object cannot have any attribute properties. Consider specifying a DeserializeRootElementName.".ListReader(CultureInfo.InvariantCulture, res2));
            }
            string        text  = XmlConvert.EncodeName(v3);
            string        text2 = WriteRequest(def);
            CreatorIssuer key   = (!SetterTest.StartReader(reference5)) ? cont._0002(text, value4.LookupNamespace(reference5), text2) : cont._0002(text, text2);

            ((InfoRequestStrategy)consumer)._0001(key);
        }
示例#9
0
        private void CallRequest(TagTestItem def, AttrBroadcasterFilter attr, CreatorIssuer state, string pred2, XmlNamespaceManager reference3, string asset4, Dictionary <string, string> token5)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            InfoRequestStrategy infoRequestStrategy = FindIterator(pred2, attr, asset4, reference3);

            state._0001(infoRequestStrategy);
            if (token5 != null)
            {
                foreach (KeyValuePair <string, string> item in token5)
                {
                    string        text  = XmlConvert.EncodeName(item.Key);
                    string        text2 = CustomerListAnnotation.CountIssuer(item.Key);
                    CreatorIssuer key   = (!SetterTest.StartReader(text2)) ? attr._0002(text, reference3.LookupNamespace(text2) ?? string.Empty, item.Value) : attr._0002(text, item.Value);
                    infoRequestStrategy._0001(key);
                }
            }
            switch (def._0001())
            {
            case WatcherComposer.Null:
                break;

            case WatcherComposer.Integer:
            case WatcherComposer.Float:
            case WatcherComposer.String:
            case WatcherComposer.Boolean:
            case WatcherComposer.Date:
            case WatcherComposer.Bytes:
            {
                string text3 = WriteRequest(def);
                if (text3 != null)
                {
                    ((CreatorIssuer)infoRequestStrategy)._0001(attr._0002(text3));
                }
                break;
            }

            case WatcherComposer.EndObject:
                reference3.RemoveNamespace(string.Empty, reference3.DefaultNamespace);
                break;

            default:
                reference3.PushScope();
                ValidateIterator(def, attr, reference3, infoRequestStrategy);
                reference3.PopScope();
                reference3.RemoveNamespace(string.Empty, reference3.DefaultNamespace);
                break;
            }
        }
 internal static void AssetProperty(TextWriter var1, DateTimeOffset caller, FindDirection role, string cfg2, CultureInfo cont3)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(cfg2))
     {
         char[] array = new char[64];
         int    count = ConcatProperty(array, 0, (role == (FindDirection)0) ? caller.DateTime : caller.UtcDateTime, caller.Offset, DateTimeKind.Local, role);
         var1.Write(array, 0, count);
     }
     else
     {
         var1.Write(caller.ToString(cfg2, cont3));
     }
 }
 internal static void TestProperty(TextWriter info, DateTime token, FindDirection state, string init2, CultureInfo res3)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(init2))
     {
         char[] array = new char[64];
         int    count = ConcatProperty(array, 0, token, null, token.Kind, state);
         info.Write(array, 0, count);
     }
     else
     {
         info.Write(token.ToString(init2, res3));
     }
 }
示例#12
0
 internal int?PostError(string param)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(param))
     {
         CancelError(WatcherComposer.Null, null, isstate: false);
         return(null);
     }
     if (int.TryParse(param, NumberStyles.Integer, this._0001(), out int result))
     {
         CancelError(WatcherComposer.Integer, result, isstate: false);
         return(result);
     }
     CancelError(WatcherComposer.String, param, isstate: false);
     throw ContextError.CheckComposer(this, "Could not convert string to integer: {0}.".ListReader(CultureInfo.InvariantCulture, param));
 }
示例#13
0
 internal double?GetError(string first)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(first))
     {
         CancelError(WatcherComposer.Null, null, isstate: false);
         return(null);
     }
     if (double.TryParse(first, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite | NumberStyles.AllowLeadingSign | NumberStyles.AllowDecimalPoint | NumberStyles.AllowThousands | NumberStyles.AllowExponent, this._0001(), out double result))
     {
         CancelError(WatcherComposer.Float, result, isstate: false);
         return(result);
     }
     CancelError(WatcherComposer.String, first, isstate: false);
     throw ContextError.CheckComposer(this, "Could not convert string to double: {0}.".ListReader(CultureInfo.InvariantCulture, first));
 }
示例#14
0
 internal bool?StartError(string first)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(first))
     {
         CancelError(WatcherComposer.Null, null, isstate: false);
         return(null);
     }
     if (bool.TryParse(first, out bool result))
     {
         CancelError(WatcherComposer.Boolean, result, isstate: false);
         return(result);
     }
     CancelError(WatcherComposer.String, first, isstate: false);
     throw ContextError.CheckComposer(this, "Could not convert string to boolean: {0}.".ListReader(CultureInfo.InvariantCulture, first));
 }
 public override void _0001(DateTimeOffset res)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     GetTest(WatcherComposer.Date);
     if (SetterTest.StartReader(base._0003()))
     {
         int count = InsertTest(res);
         m_MethodComposer.Write(m_RegistryComposer, 0, count);
     }
     else
     {
         m_MethodComposer.Write(_ServiceComposer);
         m_MethodComposer.Write(res.ToString(base._0003(), base._0001()));
         m_MethodComposer.Write(_ServiceComposer);
     }
 }
 public override void _0001(DateTime last)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     GetTest(WatcherComposer.Date);
     last = DescriptorIteratorMapping.ReadProperty(last, base._0001());
     if (SetterTest.StartReader(base._0003()))
     {
         int count = MapTest(last);
         m_MethodComposer.Write(m_RegistryComposer, 0, count);
     }
     else
     {
         m_MethodComposer.Write(_ServiceComposer);
         m_MethodComposer.Write(last.ToString(base._0003(), base._0001()));
         m_MethodComposer.Write(_ServiceComposer);
     }
 }
示例#17
0
        private void CollectRequest(TagTestItem def, AttrBroadcasterFilter cust, XmlNamespaceManager consumer, string reg2, CreatorIssuer second3)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            if (!_0005())
            {
                switch (reg2)
                {
                case "#text":
                    second3._0001(cust._0002(WriteRequest(def)));
                    return;

                case "#cdata-section":
                    second3._0001(cust._0003(WriteRequest(def)));
                    return;

                case "#whitespace":
                    second3._0001(cust._0004(WriteRequest(def)));
                    return;

                case "#significant-whitespace":
                    second3._0001(cust._0005(WriteRequest(def)));
                    return;
                }
                if (!SetterTest.StartReader(reg2) && reg2[0] == '?')
                {
                    VerifyIterator(def, cust, second3, reg2);
                    return;
                }
                if (string.Equals(reg2, "!DOCTYPE", StringComparison.OrdinalIgnoreCase))
                {
                    PatchIterator(def, cust, second3);
                    return;
                }
            }
            if (def._0001() == WatcherComposer.StartArray)
            {
                RevertRequest(def, cust, reg2, second3, consumer);
            }
            else
            {
                SortRequest(def, cust, second3, reg2, consumer);
            }
        }
        public override string _0002()
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            string text = base._0002();

            if (_WorkerIssuer == null)
            {
                _WorkerIssuer = m_SetterIssuer._0003();
            }
            if (!SetterTest.StartReader(_WorkerIssuer))
            {
                if (SetterTest.StartReader(text))
                {
                    return(_WorkerIssuer);
                }
                text = ((!text.ExcludeReader('[')) ? (_WorkerIssuer + "." + text) : (_WorkerIssuer + text));
            }
            return(text);
        }
示例#19
0
 internal decimal?SelectError(string first)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(first))
     {
         CancelError(WatcherComposer.Null, null, isstate: false);
         return(null);
     }
     if (decimal.TryParse(first, NumberStyles.Number, this._0001(), out decimal result))
     {
         CancelError(WatcherComposer.Float, result, isstate: false);
         return(result);
     }
     if (HelperDicCandidate.LogoutProperty(first.ToCharArray(), 0, first.Length, out result) == (TYMED)1)
     {
         CancelError(WatcherComposer.Float, result, isstate: false);
         return(result);
     }
     CancelError(WatcherComposer.String, first, isstate: false);
     throw ContextError.CheckComposer(this, "Could not convert string to decimal: {0}.".ListReader(CultureInfo.InvariantCulture, first));
 }
示例#20
0
 internal DateTimeOffset?ConcatError(string info)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(info))
     {
         CancelError(WatcherComposer.Null, null, isstate: false);
         return(null);
     }
     if (DescriptorIteratorMapping.ChangeProperty(info, setterError, this._0001(), out DateTimeOffset connection))
     {
         CancelError(WatcherComposer.Date, connection, isstate: false);
         return(connection);
     }
     if (DateTimeOffset.TryParse(info, this._0001(), DateTimeStyles.RoundtripKind, out connection))
     {
         CancelError(WatcherComposer.Date, connection, isstate: false);
         return(connection);
     }
     CancelError(WatcherComposer.String, info, isstate: false);
     throw ContextError.CheckComposer(this, "Could not convert string to DateTimeOffset: {0}.".ListReader(CultureInfo.InvariantCulture, info));
 }
示例#21
0
 internal DateTime?DeleteError(string info)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (SetterTest.StartReader(info))
     {
         CancelError(WatcherComposer.Null, null, isstate: false);
         return(null);
     }
     if (DescriptorIteratorMapping.RemoveProperty(info, this._0001(), setterError, this._0001(), out DateTime res))
     {
         res = DescriptorIteratorMapping.ReadProperty(res, this._0001());
         CancelError(WatcherComposer.Date, res, isstate: false);
         return(res);
     }
     if (DateTime.TryParse(info, this._0001(), DateTimeStyles.RoundtripKind, out res))
     {
         res = DescriptorIteratorMapping.ReadProperty(res, this._0001());
         CancelError(WatcherComposer.Date, res, isstate: false);
         return(res);
     }
     throw ContextError.CheckComposer(this, "Could not convert string to DateTime: {0}.".ListReader(CultureInfo.InvariantCulture, info));
 }
 private bool PrintRequest(string last)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     if (!SetterTest.StartReader(last) && last != ((FieldIssuer)this)._0001()?._0003() && SetterTest.StartReader(_0001(last)))
     {
         bool flag = false;
         if (this._0001().HasAttributes)
         {
             foreach (XAttribute item in this._0001().Attributes())
             {
                 if (item.Name.LocalName == "xmlns" && SetterTest.StartReader(item.Name.NamespaceName) && item.Value == last)
                 {
                     flag = true;
                 }
             }
         }
         if (!flag)
         {
             return(true);
         }
     }
     return(false);
 }
        public static void SetIssuer(TextWriter reference, string col, char control, bool wantord2, bool[] ord3, GraphGroupStyle attr4, GDBD.Workers.WrapperComposerWorker <char> instance5, ref char[] result6)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            if (wantord2)
            {
                reference.Write(control);
            }
            if (!SetterTest.StartReader(col))
            {
                int num = RemoveIssuer(col, ord3, attr4);
                if (num == -1)
                {
                    reference.Write(col);
                }
                else
                {
                    if (num != 0)
                    {
                        if (result6 == null || result6.Length < num)
                        {
                            result6 = ValueFilterResolver.SearchIssuer(instance5, num, result6);
                        }
                        col.CopyTo(0, result6, 0, num);
                        reference.Write(result6, 0, num);
                    }
                    int num2;
                    for (int i = num; i < col.Length; i++)
                    {
                        char c = col[i];
                        if (c < ord3.Length && !ord3[c])
                        {
                            continue;
                        }
                        string text;
                        switch (c)
                        {
                        case '\t':
                            text = "\\t";
                            break;

                        case '\n':
                            text = "\\n";
                            break;

                        case '\r':
                            text = "\\r";
                            break;

                        case '\f':
                            text = "\\f";
                            break;

                        case '\b':
                            text = "\\b";
                            break;

                        case '\\':
                            text = "\\\\";
                            break;

                        case '\u0085':
                            text = "\\u0085";
                            break;

                        case '\u2028':
                            text = "\\u2028";
                            break;

                        case '\u2029':
                            text = "\\u2029";
                            break;

                        default:
                            if (c < ord3.Length || attr4 == (GraphGroupStyle)1)
                            {
                                if (c == '\'' && attr4 != (GraphGroupStyle)2)
                                {
                                    text = "\\'";
                                    break;
                                }
                                if (c == '"' && attr4 != (GraphGroupStyle)2)
                                {
                                    text = "\\\"";
                                    break;
                                }
                                if (result6 == null || result6.Length < 6)
                                {
                                    result6 = ValueFilterResolver.SearchIssuer(instance5, 6, result6);
                                }
                                SetterTest.PrintReader(c, result6);
                                text = "!";
                            }
                            else
                            {
                                text = null;
                            }
                            break;
                        }
                        if (text == null)
                        {
                            continue;
                        }
                        bool flag = string.Equals(text, "!", StringComparison.Ordinal);
                        if (i > num)
                        {
                            num2 = i - num + (flag ? 6 : 0);
                            int num3 = flag ? 6 : 0;
                            if (result6 == null || result6.Length < num2)
                            {
                                char[] array = ValueFilterResolver.RegisterIssuer(instance5, num2);
                                if (flag)
                                {
                                    Array.Copy(result6, array, 6);
                                }
                                ValueFilterResolver.RestartIssuer(instance5, result6);
                                result6 = array;
                            }
                            col.CopyTo(num, result6, num3, num2 - num3);
                            reference.Write(result6, num3, num2 - num3);
                        }
                        num = i + 1;
                        if (!flag)
                        {
                            reference.Write(text);
                        }
                        else
                        {
                            reference.Write(result6, 0, 6);
                        }
                    }
                    num2 = col.Length - num;
                    if (num2 > 0)
                    {
                        if (result6 == null || result6.Length < num2)
                        {
                            result6 = ValueFilterResolver.SearchIssuer(instance5, num2, result6);
                        }
                        col.CopyTo(num, result6, 0, num2);
                        reference.Write(result6, 0, num2);
                    }
                }
            }
            if (wantord2)
            {
                reference.Write(control);
            }
        }
示例#24
0
        private void ValidateIterator(TagTestItem def, AttrBroadcasterFilter caller, XmlNamespaceManager tag, CreatorIssuer ord2)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            do
            {
                switch (def._0001())
                {
                case WatcherComposer.EndObject:
                case WatcherComposer.EndArray:
                    return;

                case WatcherComposer.PropertyName:
                {
                    if (ord2._0001() == XmlNodeType.Document && caller._0001() != null)
                    {
                        throw StrategyError.PatchComposer(def, "JSON root object has multiple properties. The root object must have a single property in order to create a valid XML document. Consider specifying a DeserializeRootElementName.");
                    }
                    string text = def._0001().ToString();
                    def.SortError();
                    if (def._0001() == WatcherComposer.StartArray)
                    {
                        int num = 0;
                        while (def._0001() && def._0001() != WatcherComposer.EndArray)
                        {
                            CollectRequest(def, caller, tag, text, ord2);
                            num++;
                        }
                        if (num == 1 && this._0003())
                        {
                            CustomerListAnnotation.CustomizeIssuer(text, out string _0003, out string role);
                            string b = SetterTest.StartReader(_0003) ? tag.DefaultNamespace : tag.LookupNamespace(_0003);
                            foreach (CreatorIssuer item in ord2._0001())
                            {
                                InfoRequestStrategy infoRequestStrategy = item as InfoRequestStrategy;
                                if (infoRequestStrategy != null && ((CreatorIssuer)infoRequestStrategy)._0001() == role && infoRequestStrategy._0003() == b)
                                {
                                    LoginIterator(infoRequestStrategy, caller);
                                    break;
                                }
                            }
                        }
                    }
                    else
                    {
                        CollectRequest(def, caller, tag, text, ord2);
                    }
                    break;
                }

                case WatcherComposer.StartConstructor:
                {
                    string reg = def._0001().ToString();
                    while (def._0001() && def._0001() != WatcherComposer.EndConstructor)
                    {
                        CollectRequest(def, caller, tag, reg, ord2);
                    }
                    break;
                }

                case WatcherComposer.Comment:
                    ord2._0001(caller._0001((string)def._0001()));
                    break;

                default:
                    throw StrategyError.PatchComposer(def, "Unexpected JsonToken when deserializing node: " + def._0001());
                }
            }while (def._0001());
        }
示例#25
0
        private void InitRequest(RecordClassDispatcher first, CreatorIssuer second, XmlNamespaceManager template, bool isresult2)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            switch (second._0001())
            {
            case XmlNodeType.Document:
            case XmlNodeType.DocumentFragment:
                ExcludeRequest(first, second, template, isresult2);
                break;

            case XmlNodeType.Element:
                if (CancelRequest(second) && DefineRequest(second) && second._0001().Count > 0)
                {
                    ExcludeRequest(first, second, template, hasattr2: false);
                    break;
                }
                template.PushScope();
                foreach (CreatorIssuer item in second._0002())
                {
                    if (item._0003() == "http://www.w3.org/2000/xmlns/")
                    {
                        string prefix = (item._0001() != "xmlns") ? XmlConvert.DecodeName(item._0001()) : string.Empty;
                        string text   = item._0002();
                        if (text == null)
                        {
                            throw new StrategyError("Namespace attribute must have a value.");
                        }
                        template.AddNamespace(prefix, text);
                    }
                }
                if (isresult2)
                {
                    first._0002(QueryRequest(second, template));
                }
                if (!ResolveIterator(second._0002()) && second._0001().Count == 1 && second._0001()[0]._0001() == XmlNodeType.Text)
                {
                    first._0004(second._0001()[0]._0002());
                }
                else if (second._0001().Count == 0 && second._0002().Count == 0)
                {
                    if (((InfoRequestStrategy)second)._0001())
                    {
                        first._0008();
                    }
                    else
                    {
                        first._0004(string.Empty);
                    }
                }
                else
                {
                    first._0002();
                    for (int i = 0; i < second._0002().Count; i++)
                    {
                        InitRequest(first, second._0002()[i], template, isresult2: true);
                    }
                    ExcludeRequest(first, second, template, hasattr2: true);
                    first._0011();
                }
                template.PopScope();
                break;

            case XmlNodeType.Comment:
                if (isresult2)
                {
                    first._0005(second._0002());
                }
                break;

            case XmlNodeType.Attribute:
            case XmlNodeType.Text:
            case XmlNodeType.CDATA:
            case XmlNodeType.ProcessingInstruction:
            case XmlNodeType.Whitespace:
            case XmlNodeType.SignificantWhitespace:
                if ((!(second._0003() == "http://www.w3.org/2000/xmlns/") || !(second._0002() == "http://james.newtonking.com/projects/json")) && (!(second._0003() == "http://james.newtonking.com/projects/json") || !(second._0001() == "Array")))
                {
                    if (isresult2)
                    {
                        first._0002(QueryRequest(second, template));
                    }
                    first._0004(second._0002());
                }
                break;

            case XmlNodeType.XmlDeclaration:
            {
                DicEventConsumer dicEventConsumer = (DicEventConsumer)second;
                first._0002(QueryRequest(second, template));
                first._0002();
                if (!SetterTest.StartReader(dicEventConsumer._0004()))
                {
                    first._0002("@version");
                    first._0004(dicEventConsumer._0004());
                }
                if (!SetterTest.StartReader(dicEventConsumer._0005()))
                {
                    first._0002("@encoding");
                    first._0004(dicEventConsumer._0005());
                }
                if (!SetterTest.StartReader(dicEventConsumer._0006()))
                {
                    first._0002("@standalone");
                    first._0004(dicEventConsumer._0006());
                }
                first._0011();
                break;
            }

            case XmlNodeType.DocumentType:
            {
                IndexerIssuer indexerIssuer = (IndexerIssuer)second;
                first._0002(QueryRequest(second, template));
                first._0002();
                if (!SetterTest.StartReader(indexerIssuer._0004()))
                {
                    first._0002("@name");
                    first._0004(indexerIssuer._0004());
                }
                if (!SetterTest.StartReader(indexerIssuer._0006()))
                {
                    first._0002("@public");
                    first._0004(indexerIssuer._0006());
                }
                if (!SetterTest.StartReader(indexerIssuer._0005()))
                {
                    first._0002("@system");
                    first._0004(indexerIssuer._0005());
                }
                if (!SetterTest.StartReader(indexerIssuer._0007()))
                {
                    first._0002("@internalSubset");
                    first._0004(indexerIssuer._0007());
                }
                first._0011();
                break;
            }

            default:
                throw new StrategyError("Unexpected XmlNodeType when serializing nodes: " + second._0001());
            }
        }
示例#26
0
        public override object _0001(TagTestItem param, Type reg, object serv, PrototypeError first2)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            switch (param._0001())
            {
            case WatcherComposer.Null:
                return(null);

            default:
                throw StrategyError.PatchComposer(param, "XmlNodeConverter can only convert JSON that begins with an object.");

            case WatcherComposer.StartObject:
            {
                XmlNamespaceManager   xmlNamespaceManager   = new XmlNamespaceManager(new NameTable());
                AttrBroadcasterFilter attrBroadcasterFilter = null;
                CreatorIssuer         creatorIssuer         = null;
                if (typeof(XObject).IsAssignableFrom(reg))
                {
                    if (reg != typeof(XContainer) && reg != typeof(XDocument) && reg != typeof(XElement) && reg != typeof(XNode) && reg != typeof(XObject))
                    {
                        throw StrategyError.PatchComposer(param, "XmlNodeConverter only supports deserializing XDocument, XElement, XContainer, XNode or XObject.");
                    }
                    attrBroadcasterFilter = new AuthenticationComposerPool(new XDocument());
                    creatorIssuer         = attrBroadcasterFilter;
                }
                if (typeof(XmlNode).IsAssignableFrom(reg))
                {
                    if (reg != typeof(XmlDocument) && reg != typeof(XmlElement) && reg != typeof(XmlNode))
                    {
                        throw StrategyError.PatchComposer(param, "XmlNodeConverter only supports deserializing XmlDocument, XmlElement or XmlNode.");
                    }
                    attrBroadcasterFilter = new ConnectionComposerWorker(new XmlDocument
                        {
                            XmlResolver = null
                        });
                    creatorIssuer = attrBroadcasterFilter;
                }
                if (attrBroadcasterFilter == null || creatorIssuer == null)
                {
                    throw StrategyError.PatchComposer(param, "Unexpected type when converting XML: " + reg);
                }
                if (!SetterTest.StartReader(_0001()))
                {
                    SortRequest(param, attrBroadcasterFilter, creatorIssuer, _0001(), xmlNamespaceManager);
                }
                else
                {
                    param.SortError();
                    ValidateIterator(param, attrBroadcasterFilter, xmlNamespaceManager, creatorIssuer);
                }
                if (reg == typeof(XElement))
                {
                    XElement obj = (XElement)((CreatorIssuer)attrBroadcasterFilter._0001())._0001();
                    obj.Remove();
                    return(obj);
                }
                if (reg == typeof(XmlElement))
                {
                    return(((CreatorIssuer)attrBroadcasterFilter._0001())._0001());
                }
                return(((CreatorIssuer)attrBroadcasterFilter)._0001());
            }
            }
        }
示例#27
0
        private Dictionary <string, string> DisableIterator(TagTestItem v, XmlNamespaceManager token)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            Dictionary <string, string> dictionary = null;
            bool flag = false;

            while (!flag && v._0001())
            {
                switch (v._0001())
                {
                case WatcherComposer.PropertyName:
                {
                    string text = v._0001().ToString();
                    if (!SetterTest.StartReader(text))
                    {
                        switch (text[0])
                        {
                        case '@':
                        {
                            if (dictionary == null)
                            {
                                dictionary = new Dictionary <string, string>();
                            }
                            text = text.Substring(1);
                            v.SortError();
                            string value = WriteRequest(v);
                            dictionary.Add(text, value);
                            if (OrderIterator(text, out string _0003))
                            {
                                token.AddNamespace(_0003, value);
                            }
                            break;
                        }

                        case '$':
                            switch (text)
                            {
                            case "$values":
                            case "$id":
                            case "$ref":
                            case "$type":
                            case "$value":
                            {
                                string text2 = token.LookupPrefix("http://james.newtonking.com/projects/json");
                                if (text2 == null)
                                {
                                    if (dictionary == null)
                                    {
                                        dictionary = new Dictionary <string, string>();
                                    }
                                    int?num = null;
                                    int?num2;
                                    while (true)
                                    {
                                        num2 = num;
                                        if (token.LookupNamespace("json" + num2) == null)
                                        {
                                            break;
                                        }
                                        num = num.GetValueOrDefault() + 1;
                                    }
                                    num2  = num;
                                    text2 = "json" + num2;
                                    dictionary.Add("xmlns:" + text2, "http://james.newtonking.com/projects/json");
                                    token.AddNamespace(text2, "http://james.newtonking.com/projects/json");
                                }
                                if (text == "$values")
                                {
                                    flag = true;
                                    break;
                                }
                                text = text.Substring(1);
                                v.SortError();
                                if (!RulesClientBridge.StartIssuer(v._0001()))
                                {
                                    throw StrategyError.PatchComposer(v, "Unexpected JsonToken: " + v._0001());
                                }
                                if (dictionary == null)
                                {
                                    dictionary = new Dictionary <string, string>();
                                }
                                string value = v._0001()?.ToString();
                                dictionary.Add(text2 + ":" + text, value);
                                break;
                            }

                            default:
                                flag = true;
                                break;
                            }
                            break;

                        default:
                            flag = true;
                            break;
                        }
                    }
                    else
                    {
                        flag = true;
                    }
                    break;
                }

                case WatcherComposer.Comment:
                case WatcherComposer.EndObject:
                    flag = true;
                    break;

                default:
                    throw StrategyError.PatchComposer(v, "Unexpected JsonToken: " + v._0001());
                }
            }
            return(dictionary);
        }