/// <summary>
 /// Updates the compartments for the shapes associated to the given list of model elements
 /// </summary>
 /// <param name="elements">List of model elements</param>
 /// <param name="shapeType">The type of shape that needs updating</param>
 /// <param name="compartmentName">The name of the compartment to update</param>
 /// <param name="repaintOnly">If true, the method will only invalidate the shape for a repaint, without re-initializing the shape.</param>
 internal static void UpdateCompartments(global::System.Collections.IEnumerable elements, global::System.Type shapeType, string compartmentName, bool repaintOnly)
 {
     foreach (DslModeling::ModelElement element in elements)
     {
         DslModeling::LinkedElementCollection <DslDiagrams::PresentationElement> pels = DslDiagrams::PresentationViewsSubject.GetPresentation(element);
         foreach (DslDiagrams::PresentationElement pel in pels)
         {
             DslDiagrams::CompartmentShape compartmentShape = pel as DslDiagrams::CompartmentShape;
             if (compartmentShape != null && shapeType.IsAssignableFrom(compartmentShape.GetType()))
             {
                 if (repaintOnly)
                 {
                     compartmentShape.Invalidate();
                 }
                 else
                 {
                     foreach (DslDiagrams::CompartmentMapping mapping in compartmentShape.GetCompartmentMappings())
                     {
                         if (mapping.CompartmentId == compartmentName)
                         {
                             mapping.InitializeCompartmentShape(compartmentShape);
                             break;
                         }
                     }
                 }
             }
         }
     }
 }
Пример #2
0
        private ISet ExtractGeneralNames(global::System.Collections.IEnumerable names)
        {
            ISet set = new HashSet();

            if (names != null)
            {
                global::System.Collections.IEnumerator enumerator = names.GetEnumerator();
                try
                {
                    while (enumerator.MoveNext())
                    {
                        object current = enumerator.get_Current();
                        if (current is GeneralName)
                        {
                            set.Add(current);
                        }
                        else
                        {
                            set.Add(GeneralName.GetInstance(Asn1Object.FromByteArray((byte[])current)));
                        }
                    }
                    return(set);
                }
                finally
                {
                    global::System.IDisposable disposable = enumerator as global::System.IDisposable;
                    if (disposable != null)
                    {
                        disposable.Dispose();
                    }
                }
            }
            return(set);
        }
Пример #3
0
        internal static void RolePlayerChanged(DslModeling::RolePlayerChangedEventArgs e, bool repaintOnly)
        {
            if (e == null)
            {
                throw new global::System.ArgumentNullException("e");
            }
            if (typeof(global::ORMSolutions.ORMArchitect.RelationalModels.ConceptualDatabase.TableContainsColumn).IsAssignableFrom(e.DomainRelationship.ImplementationClass))
            {
                if (e.DomainRole.IsSource)
                {
                    //global::System.Collections.IEnumerable oldElements = CompartmentItemAddRule.GetTableForTableShapeColumnsCompartmentFromLastLink((global::ORMSolutions.ORMArchitect.RelationalModels.ConceptualDatabase.Column)e.OldRolePlayer);
                    //foreach(DslModeling::ModelElement element in oldElements)
                    //{
                    //	DslModeling::LinkedElementCollection<DslDiagrams::PresentationElement> pels = DslDiagrams::PresentationViewsSubject.GetPresentation(element);
                    //	foreach(DslDiagrams::PresentationElement pel in pels)
                    //	{
                    //		global::ORMSolutions.ORMArchitect.Views.RelationalView.TableShape compartmentShape = pel as global::ORMSolutions.ORMArchitect.Views.RelationalView.TableShape;
                    //		if(compartmentShape != null)
                    //		{
                    //			compartmentShape.GetCompartmentMappings()[0].InitializeCompartmentShape(compartmentShape);
                    //		}
                    //	}
                    //}

                    global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetTableForTableShapeColumnsCompartmentFromLastLink((global::ORMSolutions.ORMArchitect.RelationalModels.ConceptualDatabase.TableContainsColumn)e.ElementLink);
                    CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::ORMSolutions.ORMArchitect.Views.RelationalView.TableShape), "ColumnsCompartment", repaintOnly);
                }
                else
                {
                    global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetTableForTableShapeColumnsCompartment((global::ORMSolutions.ORMArchitect.RelationalModels.ConceptualDatabase.Column)e.NewRolePlayer);
                    CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::ORMSolutions.ORMArchitect.Views.RelationalView.TableShape), "ColumnsCompartment", repaintOnly);
                }
            }
        }
Пример #4
0
        private ISet LoadCrlEntries()
        {
            ISet set = new HashSet();

            global::System.Collections.IEnumerable revokedCertificateEnumeration = c.GetRevokedCertificateEnumeration();
            X509Name previousCertificateIssuer = IssuerDN;

            global::System.Collections.IEnumerator enumerator = revokedCertificateEnumeration.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    CrlEntry     crlEntry     = (CrlEntry)enumerator.get_Current();
                    X509CrlEntry x509CrlEntry = new X509CrlEntry(crlEntry, isIndirect, previousCertificateIssuer);
                    set.Add(x509CrlEntry);
                    previousCertificateIssuer = x509CrlEntry.GetCertificateIssuer();
                }
                return(set);
            }
            finally
            {
                global::System.IDisposable disposable = enumerator as global::System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
        }
Пример #5
0
        public virtual X509CrlEntry GetRevokedCertificate(BigInteger serialNumber)
        {
            global::System.Collections.IEnumerable revokedCertificateEnumeration = c.GetRevokedCertificateEnumeration();
            X509Name previousCertificateIssuer = IssuerDN;

            global::System.Collections.IEnumerator enumerator = revokedCertificateEnumeration.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    CrlEntry     crlEntry     = (CrlEntry)enumerator.get_Current();
                    X509CrlEntry x509CrlEntry = new X509CrlEntry(crlEntry, isIndirect, previousCertificateIssuer);
                    if (serialNumber.Equals(crlEntry.UserCertificate.Value))
                    {
                        return(x509CrlEntry);
                    }
                    previousCertificateIssuer = x509CrlEntry.GetCertificateIssuer();
                }
            }
            finally
            {
                global::System.IDisposable disposable = enumerator as global::System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
            return(null);
        }
Пример #6
0
        private static byte[] ToBytes(global::System.Collections.IEnumerable octs)
        {
            //IL_0000: Unknown result type (might be due to invalid IL or missing references)
            //IL_0006: Expected O, but got Unknown
            MemoryStream val = new MemoryStream();

            global::System.Collections.IEnumerator enumerator = octs.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    DerOctetString derOctetString = (DerOctetString)enumerator.get_Current();
                    byte[]         octets         = derOctetString.GetOctets();
                    ((Stream)val).Write(octets, 0, octets.Length);
                }
            }
            finally
            {
                global::System.IDisposable disposable = enumerator as global::System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
            return(val.ToArray());
        }
Пример #7
0
        public ExtendedKeyUsage(global::System.Collections.IEnumerable usages)
        {
            Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector();

            global::System.Collections.IEnumerator enumerator = usages.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    object        current  = enumerator.get_Current();
                    Asn1Encodable instance = DerObjectIdentifier.GetInstance(current);
                    asn1EncodableVector.Add(instance);
                    usageTable.set_Item((object)instance, (object)instance);
                }
            }
            finally
            {
                global::System.IDisposable disposable = enumerator as global::System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
            seq = new DerSequence(asn1EncodableVector);
        }
 public PgpSecretKeyRingBundle(global::System.Collections.IEnumerable e)
 {
     secretRings = Platform.CreateHashtable();
     order       = Platform.CreateArrayList();
     global::System.Collections.IEnumerator enumerator = e.GetEnumerator();
     try
     {
         while (enumerator.MoveNext())
         {
             object           current          = enumerator.get_Current();
             PgpSecretKeyRing pgpSecretKeyRing = current as PgpSecretKeyRing;
             if (pgpSecretKeyRing == null)
             {
                 throw new PgpException(Platform.GetTypeName(current) + " found where PgpSecretKeyRing expected");
             }
             long keyId = pgpSecretKeyRing.GetPublicKey().KeyId;
             secretRings.Add((object)keyId, (object)pgpSecretKeyRing);
             order.Add((object)keyId);
         }
     }
     finally
     {
         global::System.IDisposable disposable = enumerator as global::System.IDisposable;
         if (disposable != null)
         {
             disposable.Dispose();
         }
     }
 }
Пример #9
0
 public WirelessChannels(global::System.Collections.IEnumerable c) : this() {
   if (c == null)
     throw new global::System.ArgumentNullException("c");
   foreach (WirelessChannel element in c) {
     this.Add(element);
   }
 }
Пример #10
0
        internal static global::System.Collections.IList CreateArrayList(global::System.Collections.IEnumerable collection)
        {
            //IL_0000: Unknown result type (might be due to invalid IL or missing references)
            //IL_0006: Expected O, but got Unknown
            ArrayList val = new ArrayList();

            global::System.Collections.IEnumerator enumerator = collection.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    object current = enumerator.get_Current();
                    val.Add(current);
                }
                return((global::System.Collections.IList)val);
            }
            finally
            {
                global::System.IDisposable disposable = enumerator as global::System.IDisposable;
                if (disposable != null)
                {
                    disposable.Dispose();
                }
            }
        }
        internal static void RolePlayerChanged(DslModeling::RolePlayerChangedEventArgs e, bool repaintOnly)
        {
            if (e == null)
            {
                throw new global::System.ArgumentNullException("e");
            }
            if (typeof(global::EPAM.NHModelingLanguage.EntityHasProperties).IsAssignableFrom(e.DomainRelationship.ImplementationClass))
            {
                if (e.DomainRole.IsSource)
                {
                    //global::System.Collections.IEnumerable oldElements = CompartmentItemAddRule.GetEntityForEntityShapePropertiesFromLastLink((global::EPAM.NHModelingLanguage.Property)e.OldRolePlayer);
                    //foreach(DslModeling::ModelElement element in oldElements)
                    //{
                    //	DslModeling::LinkedElementCollection<DslDiagrams::PresentationElement> pels = DslDiagrams::PresentationViewsSubject.GetPresentation(element);
                    //	foreach(DslDiagrams::PresentationElement pel in pels)
                    //	{
                    //		global::EPAM.NHModelingLanguage.EntityShape compartmentShape = pel as global::EPAM.NHModelingLanguage.EntityShape;
                    //		if(compartmentShape != null)
                    //		{
                    //			compartmentShape.GetCompartmentMappings()[0].InitializeCompartmentShape(compartmentShape);
                    //		}
                    //	}
                    //}

                    global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityForEntityShapePropertiesFromLastLink((global::EPAM.NHModelingLanguage.EntityHasProperties)e.ElementLink);
                    CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::EPAM.NHModelingLanguage.EntityShape), "Properties", repaintOnly);
                }
                else
                {
                    global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityForEntityShapeProperties((global::EPAM.NHModelingLanguage.Property)e.NewRolePlayer);
                    CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::EPAM.NHModelingLanguage.EntityShape), "Properties", repaintOnly);
                }
            }
        }
Пример #12
0
			internal static void ElementPropertyChanged(DslModeling::ElementPropertyChangedEventArgs e, bool repaintOnly)
			{
				if(e==null) throw new global::System.ArgumentNullException("e");
				if(e.ModelElement is global::Company.OrmLanguage.Property && e.DomainProperty.Id == global::Company.OrmLanguage.Property.NameDomainPropertyId)
				{
					global::System.Collections.IEnumerable elements = CompartmentItemAddRule.GetEntityElementForEntityShapeProperties((global::Company.OrmLanguage.Property)e.ModelElement);
					CompartmentItemAddRule.UpdateCompartments(elements, typeof(global::Company.OrmLanguage.EntityShape), "Properties", repaintOnly);
				}
			}
Пример #13
0
 public EnumerableProxy(global::System.Collections.IEnumerable inner)
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     if (inner == null)
     {
         throw new ArgumentNullException("inner");
     }
     this.inner = inner;
 }
Пример #14
0
        static global::System.Collections.IList FilterElementsFromViewForProperties(global::System.Collections.IEnumerable elements)
        {
            List <Property> properties = new List <Property>();

            foreach (Property p in elements)
            {
                properties.Add(p);
            }
            return(properties.OrderBy(prp => prp.Order).ToList());
        }
Пример #15
0
 public Point3DfArray(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (Point3Df element in c)
     {
         this.Add(element);
     }
 }
Пример #16
0
 public AudioMediaVector(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (AudioMedia element in c)
     {
         this.Add(element);
     }
 }
Пример #17
0
 public VideoDevInfoVector2(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (VideoDevInfo element in c)
     {
         this.Add(element);
     }
 }
Пример #18
0
 public SslCertNameVector(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (SslCertName element in c)
     {
         this.Add(element);
     }
 }
Пример #19
0
 public MipFieldValues(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (Value element in c)
     {
         this.Add(element);
     }
 }
Пример #20
0
 public BondHelperVector(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (BondHelper element in c)
     {
         this.Add(element);
     }
 }
Пример #21
0
 public PpsSourceOptions(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (InertialTypes.PpsSource element in c)
     {
         this.Add(element);
     }
 }
Пример #22
0
 public StatusSelectors(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (DeviceStatusData.StatusSelector element in c)
     {
         this.Add(element);
     }
 }
Пример #23
0
 public MUTUALLY_RECURSIVE_VECTOR(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (MUTUALLY_RECURSIVE_FIELD element in c)
     {
         this.Add(element);
     }
 }
 public VectorStringSwig(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (string element in c)
     {
         this.Add(element);
     }
 }
Пример #25
0
 public TransmitPowers(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (WirelessTypes.TransmitPower element in c)
     {
         this.Add(element);
     }
 }
Пример #26
0
 public GLOBAL_SYMBOL_VECTOR(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (GLOBAL_SYMBOL_FIELD element in c)
     {
         this.Add(element);
     }
 }
 public StochasticProcessVector(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (StochasticProcess element in c)
     {
         this.Add(element);
     }
 }
Пример #28
0
 public MipChannelIdentifiers(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (MipChannelIdentifier element in c)
     {
         this.Add(element);
     }
 }
Пример #29
0
 public GuidCollection(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (System.Guid element in c)
     {
         this.Add(element);
     }
 }
Пример #30
0
 public AdvancedLowPassFilterConfig(global::System.Collections.IEnumerable c) : this()
 {
     if (c == null)
     {
         throw new global::System.ArgumentNullException("c");
     }
     foreach (AdvancedLowPassFilterData element in c)
     {
         this.Add(element);
     }
 }