Exemplo n.º 1
0
        public void CkeckForNestedAttributesOfExternalIterface(int i, AttributeType attributeType, ExternalInterfaceType externalInterface)
        {
            List <List <ClassOfListsFromReferencefile> > attributelist = new List <List <ClassOfListsFromReferencefile> >();

            if (attributeType.Attribute.Exists)
            {
                foreach (var attributeinattribute in attributeType.Attribute)
                {
                    StoreEachAttributeValueInListOfExternalIterface(i, attributelist, attributeinattribute, attributeType, externalInterface);
                    CkeckForNestedAttributesOfExternalIterface(i, attributeinattribute, externalInterface);
                }
            }
            if (!attributeType.Attribute.Exists)
            {
                List <List <ClassOfListsFromReferencefile> > list    = new List <List <ClassOfListsFromReferencefile> >();
                List <ClassOfListsFromReferencefile>         sublist = new List <ClassOfListsFromReferencefile>();


                list.Add(sublist);
                if (DictionaryofElectricalConnectorType.ContainsKey("(" + i + ")" + externalInterface.Name.ToString()
                                                                    + "{" + "Class:" + "  " + externalInterface.BaseClass + "}"))
                {
                    DictionaryofElectricalConnectorType["(" + i + ")" + externalInterface.Name.ToString()
                                                        + "{" + "Class:" + "  " + externalInterface.BaseClass + "}"].AddRange(list);
                }
                else
                {
                    DictionaryofElectricalConnectorType.Add("(" + i + ")" + externalInterface.Name.ToString()
                                                            + "{" + "Class:" + "  " + externalInterface.BaseClass + "}", list);
                }
            }
        }
Exemplo n.º 2
0
        public void StoreEachAttributeValueInListOfExternalIterface(int i, List <List <ClassOfListsFromReferencefile> > list,
                                                                    AttributeType attributeType, ExternalInterfaceType externalInterface)
        {
            list = new List <List <ClassOfListsFromReferencefile> >();
            List <ClassOfListsFromReferencefile> sublist             = new List <ClassOfListsFromReferencefile>();
            ClassOfListsFromReferencefile        attributeparameters = new ClassOfListsFromReferencefile();

            attributeparameters.Name            = attributeType.Name;
            attributeparameters.Value           = attributeType.Value;
            attributeparameters.Default         = attributeType.DefaultValue;
            attributeparameters.Unit            = attributeType.Unit;
            attributeparameters.DataType        = attributeType.AttributeDataType;
            attributeparameters.Description     = attributeType.Description;
            attributeparameters.CopyRight       = attributeType.Copyright;
            attributeparameters.AttributePath   = attributeType.AttributePath;
            attributeparameters.RefSemanticList = attributeType.RefSemantic;
            // attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString();
            attributeparameters.RefBaseClassPath = externalInterface.RefBaseClassPath;
            attributeparameters.ID = externalInterface.ID;

            sublist.Add(attributeparameters);
            list.Add(sublist);
            try
            {
                if (DictionaryofElectricalConnectorType.ContainsKey("(" + i + ")" + externalInterface.Name.ToString()
                                                                    + "{" + "Class:" + "  " + externalInterface.BaseClass + "}"))
                {
                    DictionaryofElectricalConnectorType["(" + i + ")" + externalInterface.Name.ToString()
                                                        + "{" + "Class:" + "  " + externalInterface.BaseClass + "}"].AddRange(list);
                }
                else
                {
                    DictionaryofElectricalConnectorType.Add("(" + i + ")" + externalInterface.Name.ToString()
                                                            + "{" + "Class:" + "  " + externalInterface.BaseClass + "}", list);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemplo n.º 3
0
        public void StoreEachAttributeValueInListOfExternalIterface(int i, List <List <ClassOfListsFromReferencefile> > list,
                                                                    AttributeType AttributeInAttribute, AttributeType attributeType, ExternalInterfaceType externalInterface)
        {
            list = new List <List <ClassOfListsFromReferencefile> >();
            List <ClassOfListsFromReferencefile> sublist = new List <ClassOfListsFromReferencefile>();

            ClassOfListsFromReferencefile attributeparameters = new ClassOfListsFromReferencefile();

            // In the following parameters on right hand side "attributeType" has been changed to "AttributeInAttribute" this has been repeated to all
            // methods of name "StoreEachAttributeValuesInList" with four parameters.
            attributeparameters.Name            = AttributeInAttribute.Name;
            attributeparameters.Value           = AttributeInAttribute.Value;
            attributeparameters.Default         = AttributeInAttribute.DefaultValue;
            attributeparameters.Unit            = AttributeInAttribute.Unit;
            attributeparameters.DataType        = AttributeInAttribute.AttributeDataType;
            attributeparameters.Description     = AttributeInAttribute.Description;
            attributeparameters.CopyRight       = AttributeInAttribute.Copyright;
            attributeparameters.AttributePath   = AttributeInAttribute.AttributePath;
            attributeparameters.RefSemanticList = AttributeInAttribute.RefSemantic;
            // attributeparameters.ReferencedClassName = externalInterface.BaseClass.ToString();
            attributeparameters.RefBaseClassPath = externalInterface.RefBaseClassPath;
            attributeparameters.ID = externalInterface.ID;


            sublist.Add(attributeparameters);
            list.Add(sublist);
            if (DictionaryofElectricalConnectorType.ContainsKey("(" + i + ")" + externalInterface.Name.ToString()
                                                                + "{" + "Class:" + "  " + externalInterface.BaseClass + "}"))
            {
                DictionaryofElectricalConnectorType["(" + i + ")" + externalInterface.Name.ToString()
                                                    + "{" + "Class:" + "  " + externalInterface.BaseClass + "}"].AddRange(list);
            }
            else
            {
                DictionaryofElectricalConnectorType.Add("(" + i + ")" + externalInterface.Name.ToString()
                                                        + "{" + "Class:" + "  " + externalInterface.BaseClass + "}", list);
            }
        }