public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs)
            {
                global::System.Xml.Schema.XmlSchemaComplexType type     = new global::System.Xml.Schema.XmlSchemaComplexType();
                global::System.Xml.Schema.XmlSchemaSequence    sequence = new global::System.Xml.Schema.XmlSchemaSequence();
                ExistingOpenProblemsDataSet ds = new ExistingOpenProblemsDataSet();

                global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
                any1.Namespace       = "http://www.w3.org/2001/XMLSchema";
                any1.MinOccurs       = new decimal(0);
                any1.MaxOccurs       = decimal.MaxValue;
                any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any1);
                global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
                any2.Namespace       = "urn:schemas-microsoft-com:xml-diffgram-v1";
                any2.MinOccurs       = new decimal(1);
                any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
                sequence.Items.Add(any2);
                global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute1.Name       = "namespace";
                attribute1.FixedValue = ds.Namespace;
                type.Attributes.Add(attribute1);
                global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
                attribute2.Name       = "tableTypeName";
                attribute2.FixedValue = "openordersDataTable";
                type.Attributes.Add(attribute2);
                type.Particle = sequence;
                global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
                if (xs.Contains(dsSchema.TargetNamespace))
                {
                    global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
                    global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
                    try {
                        global::System.Xml.Schema.XmlSchema schema = null;
                        dsSchema.Write(s1);
                        for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext();)
                        {
                            schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
                            s2.SetLength(0);
                            schema.Write(s2);
                            if ((s1.Length == s2.Length))
                            {
                                s1.Position = 0;
                                s2.Position = 0;
                                for (; ((s1.Position != s1.Length) &&
                                        (s1.ReadByte() == s2.ReadByte()));)
                                {
                                    ;
                                }
                                if ((s1.Position == s1.Length))
                                {
                                    return(type);
                                }
                            }
                        }
                    }
                    finally {
                        if ((s1 != null))
                        {
                            s1.Close();
                        }
                        if ((s2 != null))
                        {
                            s2.Close();
                        }
                    }
                }
                xs.Add(dsSchema);
                return(type);
            }
Exemple #2
0
        private ProfessionInfo(Asn1Sequence seq)
        {
            //IL_0024: Unknown result type (might be due to invalid IL or missing references)
            //IL_0070: Unknown result type (might be due to invalid IL or missing references)
            //IL_010d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0168: Unknown result type (might be due to invalid IL or missing references)
            //IL_01a7: Unknown result type (might be due to invalid IL or missing references)
            if (seq.Count > 5)
            {
                throw new ArgumentException(string.Concat((object)"Bad sequence size: ", (object)seq.Count));
            }
            global::System.Collections.IEnumerator enumerator = seq.GetEnumerator();
            enumerator.MoveNext();
            Asn1Encodable asn1Encodable = (Asn1Encodable)enumerator.get_Current();

            if (asn1Encodable is Asn1TaggedObject)
            {
                Asn1TaggedObject asn1TaggedObject = (Asn1TaggedObject)asn1Encodable;
                if (asn1TaggedObject.TagNo != 0)
                {
                    throw new ArgumentException(string.Concat((object)"Bad tag number: ", (object)asn1TaggedObject.TagNo));
                }
                namingAuthority = NamingAuthority.GetInstance(asn1TaggedObject, isExplicit: true);
                enumerator.MoveNext();
                asn1Encodable = (Asn1Encodable)enumerator.get_Current();
            }
            professionItems = Asn1Sequence.GetInstance(asn1Encodable);
            if (enumerator.MoveNext())
            {
                asn1Encodable = (Asn1Encodable)enumerator.get_Current();
                if (asn1Encodable is Asn1Sequence)
                {
                    professionOids = Asn1Sequence.GetInstance(asn1Encodable);
                }
                else if (asn1Encodable is DerPrintableString)
                {
                    registrationNumber = DerPrintableString.GetInstance(asn1Encodable).GetString();
                }
                else
                {
                    if (!(asn1Encodable is Asn1OctetString))
                    {
                        throw new ArgumentException("Bad object encountered: " + Platform.GetTypeName(asn1Encodable));
                    }
                    addProfessionInfo = Asn1OctetString.GetInstance(asn1Encodable);
                }
            }
            if (enumerator.MoveNext())
            {
                asn1Encodable = (Asn1Encodable)enumerator.get_Current();
                if (asn1Encodable is DerPrintableString)
                {
                    registrationNumber = DerPrintableString.GetInstance(asn1Encodable).GetString();
                }
                else
                {
                    if (!(asn1Encodable is DerOctetString))
                    {
                        throw new ArgumentException("Bad object encountered: " + Platform.GetTypeName(asn1Encodable));
                    }
                    addProfessionInfo = (DerOctetString)asn1Encodable;
                }
            }
            if (enumerator.MoveNext())
            {
                asn1Encodable = (Asn1Encodable)enumerator.get_Current();
                if (!(asn1Encodable is DerOctetString))
                {
                    throw new ArgumentException("Bad object encountered: " + Platform.GetTypeName(asn1Encodable));
                }
                addProfessionInfo = (DerOctetString)asn1Encodable;
            }
        }
Exemple #3
0
        public static global::System.Type resolveClass(string name)
        {
            unchecked {
                                #line 98 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                if ((global::haxe.lang.StringExt.indexOf(name, ".", null) == -1))
                {
                                        #line 99 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                    name = global::haxe.lang.Runtime.concat("haxe.root.", name);
                }

                                #line 101 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                global::System.Type t = global::System.Type.GetType(((string)(name)));
                                #line 103 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                if (global::System.Object.ReferenceEquals(((object)(t)), default(object)))
                {
                                        #line 104 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                    global::System.Collections.IEnumerator all = (global::System.AppDomain.CurrentDomain.GetAssemblies() as global::System.Array).GetEnumerator();
                    while (all.MoveNext())
                    {
                                                #line 106 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        global::System.Reflection.Assembly t2 = ((global::System.Reflection.Assembly)(all.Current));
                        t = t2.GetType(((string)(name)));
                                                #line 108 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        if (!(global::System.Object.ReferenceEquals(((object)(t)), default(object))))
                        {
                                                        #line 109 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                            break;
                        }
                    }
                }

                                #line 113 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                if (global::System.Object.ReferenceEquals(((object)(t)), default(object)))
                {
                                        #line 114 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                    switch (name)
                    {
                    case "haxe.root.Bool":
                    {
                                                        #line 126 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        return((global::System.Type)(typeof(bool)));
                    }


                    case "haxe.root.Class":
                    {
                                                        #line 120 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        return((global::System.Type)(typeof(global::System.Type)));
                    }


                    case "haxe.root.Dynamic":
                    {
                                                        #line 122 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        return((global::System.Type)(typeof(object)));
                    }


                    case "haxe.root.Float":
                    {
                                                        #line 118 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        return((global::System.Type)(typeof(double)));
                    }


                    case "haxe.root.Int":
                    {
                                                        #line 116 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        return((global::System.Type)(typeof(int)));
                    }


                    case "haxe.root.String":
                    {
                                                        #line 124 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        return((global::System.Type)(typeof(string)));
                    }


                    default:
                    {
                                                        #line 128 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                        return(null);
                    }
                    }
                }
                else
                {
                                        #line 142 "C:\\HaxeToolkit\\haxe\\std\\cs\\_std\\Type.hx"
                    return((global::System.Type)(t));
                }
            }
                        #line default
        }
Exemple #4
0
        private static global::System.Collections.IList SortCerts(global::System.Collections.IList certs)
        {
            if (((global::System.Collections.ICollection)certs).get_Count() < 2)
            {
                return(certs);
            }
            X509Name issuerDN = ((X509Certificate)certs.get_Item(0)).IssuerDN;
            bool     flag     = true;

            for (int i = 1; i != ((global::System.Collections.ICollection)certs).get_Count(); i++)
            {
                X509Certificate x509Certificate = (X509Certificate)certs.get_Item(i);
                if (issuerDN.Equivalent(x509Certificate.SubjectDN, inOrder: true))
                {
                    issuerDN = ((X509Certificate)certs.get_Item(i)).IssuerDN;
                    continue;
                }
                flag = false;
                break;
            }
            if (flag)
            {
                return(certs);
            }
            global::System.Collections.IList list   = Platform.CreateArrayList(((global::System.Collections.ICollection)certs).get_Count());
            global::System.Collections.IList result = Platform.CreateArrayList((global::System.Collections.ICollection)certs);
            for (int j = 0; j < ((global::System.Collections.ICollection)certs).get_Count(); j++)
            {
                X509Certificate x509Certificate2 = (X509Certificate)certs.get_Item(j);
                bool            flag2            = false;
                X509Name        subjectDN        = x509Certificate2.SubjectDN;
                {
                    global::System.Collections.IEnumerator enumerator = ((global::System.Collections.IEnumerable)certs).GetEnumerator();
                    try
                    {
                        while (enumerator.MoveNext())
                        {
                            X509Certificate x509Certificate3 = (X509Certificate)enumerator.get_Current();
                            if (x509Certificate3.IssuerDN.Equivalent(subjectDN, inOrder: true))
                            {
                                flag2 = true;
                                break;
                            }
                        }
                    }
                    finally
                    {
                        global::System.IDisposable disposable = enumerator as global::System.IDisposable;
                        if (disposable != null)
                        {
                            disposable.Dispose();
                        }
                    }
                }
                if (!flag2)
                {
                    list.Add((object)x509Certificate2);
                    certs.RemoveAt(j);
                }
            }
            if (((global::System.Collections.ICollection)list).get_Count() > 1)
            {
                return(result);
            }
            for (int k = 0; k != ((global::System.Collections.ICollection)list).get_Count(); k++)
            {
                issuerDN = ((X509Certificate)list.get_Item(k)).IssuerDN;
                for (int l = 0; l < ((global::System.Collections.ICollection)certs).get_Count(); l++)
                {
                    X509Certificate x509Certificate4 = (X509Certificate)certs.get_Item(l);
                    if (issuerDN.Equivalent(x509Certificate4.SubjectDN, inOrder: true))
                    {
                        list.Add((object)x509Certificate4);
                        certs.RemoveAt(l);
                        break;
                    }
                }
            }
            if (((global::System.Collections.ICollection)certs).get_Count() > 0)
            {
                return(result);
            }
            return(list);
        }