Beispiel #1
0
        private void AssetRequest(CreatorIssuer var1, XmlNamespaceManager cust)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            List <CreatorIssuer> list          = null;
            CreatorIssuer        creatorIssuer = var1;

            while ((creatorIssuer = creatorIssuer._0001()) != null)
            {
                if (creatorIssuer._0001() == XmlNodeType.Element)
                {
                    if (list == null)
                    {
                        list = new List <CreatorIssuer>();
                    }
                    list.Add(creatorIssuer);
                }
            }
            if (list != null)
            {
                list.Reverse();
                foreach (CreatorIssuer item in list)
                {
                    cust.PushScope();
                    foreach (CreatorIssuer item2 in item._0002())
                    {
                        if (item2._0003() == "http://www.w3.org/2000/xmlns/" && item2._0001() != "xmlns")
                        {
                            cust.AddNamespace(item2._0001(), item2._0002());
                        }
                    }
                }
            }
        }
Beispiel #2
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()));
        }
Beispiel #3
0
 private static bool DefineRequest(CreatorIssuer init)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     foreach (CreatorIssuer item in init._0001())
     {
         if (item._0001() != init._0001())
         {
             return(false);
         }
     }
     return(true);
 }
Beispiel #4
0
        private string QueryRequest(CreatorIssuer first, XmlNamespaceManager connection)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            switch (first._0001())
            {
            case XmlNodeType.Attribute:
                if (first._0003() == "http://james.newtonking.com/projects/json")
                {
                    return("$" + first._0001());
                }
                return("@" + CustomizeRequest(first, connection));

            case XmlNodeType.CDATA:
                return("#cdata-section");

            case XmlNodeType.Comment:
                return("#comment");

            case XmlNodeType.Element:
                if (first._0003() == "http://james.newtonking.com/projects/json")
                {
                    return("$" + first._0001());
                }
                return(CustomizeRequest(first, connection));

            case XmlNodeType.ProcessingInstruction:
                return("?" + CustomizeRequest(first, connection));

            case XmlNodeType.DocumentType:
                return("!" + CustomizeRequest(first, connection));

            case XmlNodeType.XmlDeclaration:
                return("?xml");

            case XmlNodeType.SignificantWhitespace:
                return("#significant-whitespace");

            case XmlNodeType.Text:
                return("#text");

            case XmlNodeType.Whitespace:
                return("#whitespace");

            default:
                throw new StrategyError("Unexpected XmlNodeType when getting node name: " + first._0001());
            }
        }
Beispiel #5
0
        private void RevertRequest(TagTestItem instance, AttrBroadcasterFilter selection, string template, CreatorIssuer value2, XmlNamespaceManager item3)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            string dir = CustomerListAnnotation.CountIssuer(template);
            InfoRequestStrategy infoRequestStrategy = FindIterator(template, selection, dir, item3);

            value2._0001(infoRequestStrategy);
            int num = 0;

            while (instance._0001() && instance._0001() != WatcherComposer.EndArray)
            {
                CollectRequest(instance, selection, item3, template, infoRequestStrategy);
                num++;
            }
            if (_0003())
            {
                LoginIterator(infoRequestStrategy, selection);
            }
            if (num == 1 && _0003())
            {
                foreach (CreatorIssuer item4 in ((CreatorIssuer)infoRequestStrategy)._0001())
                {
                    InfoRequestStrategy infoRequestStrategy2 = item4 as InfoRequestStrategy;
                    if (infoRequestStrategy2 != null && ((CreatorIssuer)infoRequestStrategy2)._0001() == template)
                    {
                        LoginIterator(infoRequestStrategy2, selection);
                        break;
                    }
                }
            }
        }
 public override CreatorIssuer _0001(CreatorIssuer reference)
 {
     //Discarded unreachable code: IL_0002
     //IL_0003: Incompatible stack heights: 0 vs 1
     _0001().Add(reference._0001());
     m_ProcessIssuer = null;
     return(reference);
 }
Beispiel #7
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);
            }
        }
Beispiel #8
0
        private void VerifyIterator(TagTestItem setup, AttrBroadcasterFilter visitor, CreatorIssuer temp, string setup2)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            if (setup2 == "?xml")
            {
                string instance = null;
                string caller   = null;
                string tag      = null;
                while (setup._0001() && setup._0001() != WatcherComposer.EndObject)
                {
                    switch (setup._0001()?.ToString())
                    {
                    case "@version":
                        setup.SortError();
                        instance = WriteRequest(setup);
                        break;

                    case "@encoding":
                        setup.SortError();
                        caller = WriteRequest(setup);
                        break;

                    case "@standalone":
                        setup.SortError();
                        tag = WriteRequest(setup);
                        break;

                    default:
                        throw StrategyError.PatchComposer(setup, "Unexpected property name encountered while deserializing XmlDeclaration: " + setup._0001());
                    }
                }
                CreatorIssuer asset = visitor._0001(instance, caller, tag);
                temp._0001(asset);
            }
            else
            {
                CreatorIssuer asset2 = visitor._0001(setup2.Substring(1), WriteRequest(setup));
                temp._0001(asset2);
            }
        }
Beispiel #9
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);
        }
Beispiel #10
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;
            }
        }
Beispiel #11
0
        private void PatchIterator(TagTestItem setup, AttrBroadcasterFilter selection, CreatorIssuer util)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            string spec   = null;
            string caller = null;
            string state  = null;
            string config = null;

            while (setup._0001() && setup._0001() != WatcherComposer.EndObject)
            {
                switch (setup._0001()?.ToString())
                {
                case "@name":
                    setup.SortError();
                    spec = WriteRequest(setup);
                    break;

                case "@public":
                    setup.SortError();
                    caller = WriteRequest(setup);
                    break;

                case "@system":
                    setup.SortError();
                    state = WriteRequest(setup);
                    break;

                case "@internalSubset":
                    setup.SortError();
                    config = WriteRequest(setup);
                    break;

                default:
                    throw StrategyError.PatchComposer(setup, "Unexpected property name encountered while deserializing XmlDeclaration: " + setup._0001());
                }
            }
            CreatorIssuer asset = selection._0001(spec, caller, state, config);

            util._0001(asset);
        }
Beispiel #12
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());
            }
        }
Beispiel #13
0
        private void ExcludeRequest(RecordClassDispatcher i, CreatorIssuer vis, XmlNamespaceManager third, bool hasattr2)
        {
            //Discarded unreachable code: IL_0002
            //IL_0003: Incompatible stack heights: 0 vs 1
            switch (vis._0001().Count)
            {
            case 0:
                return;

            case 1:
            {
                string ident = QueryRequest(vis._0001()[0], third);
                SetupRequest(i, third, hasattr2, vis._0001(), ident);
                return;
            }
            }
            Dictionary <string, object> dictionary = null;
            string text = null;

            for (int j = 0; j < vis._0001().Count; j++)
            {
                CreatorIssuer creatorIssuer = vis._0001()[j];
                string        text2         = QueryRequest(creatorIssuer, third);
                object        value;
                if (dictionary == null)
                {
                    if (text == null)
                    {
                        text = text2;
                        continue;
                    }
                    if (text2 == text)
                    {
                        continue;
                    }
                    dictionary = new Dictionary <string, object>();
                    if (j > 1)
                    {
                        List <CreatorIssuer> list = new List <CreatorIssuer>(j);
                        for (int k = 0; k < j; k++)
                        {
                            list.Add(vis._0001()[k]);
                        }
                        dictionary.Add(text, list);
                    }
                    else
                    {
                        dictionary.Add(text, vis._0001()[0]);
                    }
                    dictionary.Add(text2, creatorIssuer);
                }
                else if (!dictionary.TryGetValue(text2, out value))
                {
                    dictionary.Add(text2, creatorIssuer);
                }
                else
                {
                    List <CreatorIssuer> list2 = value as List <CreatorIssuer>;
                    if (list2 == null)
                    {
                        list2 = (List <CreatorIssuer>)(dictionary[text2] = new List <CreatorIssuer>
                        {
                            (CreatorIssuer)value
                        });
                    }
                    list2.Add(creatorIssuer);
                }
            }
            if (dictionary == null)
            {
                SetupRequest(i, third, hasattr2, vis._0001(), text);
            }
            else
            {
                foreach (KeyValuePair <string, object> item in dictionary)
                {
                    List <CreatorIssuer> list3 = item.Value as List <CreatorIssuer>;
                    if (list3 != null)
                    {
                        SetupRequest(i, third, hasattr2, list3, item.Key);
                    }
                    else
                    {
                        ManageRequest(i, third, hasattr2, (CreatorIssuer)item.Value, item.Key);
                    }
                }
            }
        }
Beispiel #14
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());
        }