Пример #1
0
        public void CkeckForNestedAttributesOfElectricalConnectorPins(int i, AttributeType attributeType, ExternalInterfaceType externalInterface,
                                                                      ExternalInterfaceType classType)
        {
            List <List <ClassOfListsFromReferencefile> > attributelist = new List <List <ClassOfListsFromReferencefile> >();

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


                list.Add(sublist);
                if (DictioanryofElectricalConnectorPinType.ContainsKey("(" + i + ")" + classType.Name.ToString() + "{" + "Class:" + "  " + classType.BaseClass + "}" + externalInterface.Name.ToString()
                                                                       + "{" + "Class:" + "  " + externalInterface.BaseClass + "}"))
                {
                    DictioanryofElectricalConnectorPinType["(" + i + ")" + classType.Name.ToString() + "{" + "Class:" + "  " + classType.BaseClass + "}" + externalInterface.Name.ToString()
                                                           + "{" + "Class:" + "  " + externalInterface.BaseClass + "}"].AddRange(list);
                }
                else
                {
                    DictioanryofElectricalConnectorPinType.Add("(" + i + ")" + classType.Name.ToString() + "{" + "Class:" + "  " + classType.BaseClass + "}" + externalInterface.Name.ToString()
                                                               + "{" + "Class:" + "  " + externalInterface.BaseClass + "}", list);
                }
            }
        }
Пример #2
0
        public void StoreEachAttributeValueInListOfElectricalConnectorPins(int i, List <List <ClassOfListsFromReferencefile> > list,
                                                                           AttributeType attributeType, ExternalInterfaceType externalInterface, ExternalInterfaceType classType)
        {
            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 (DictioanryofElectricalConnectorPinType.ContainsKey("(" + i + ")" + classType.Name.ToString() + "{" + "Class:" + "  " + classType.BaseClass + "}" + externalInterface.Name.ToString()
                                                                       + "{" + "Class:" + "  " + externalInterface.BaseClass + "}"))
                {
                    DictioanryofElectricalConnectorPinType["(" + i + ")" + classType.Name.ToString() + "{" + "Class:" + "  " + classType.BaseClass + "}" + externalInterface.Name.ToString()
                                                           + "{" + "Class:" + "  " + externalInterface.BaseClass + "}"].AddRange(list);
                }
                else
                {
                    DictioanryofElectricalConnectorPinType.Add("(" + i + ")" + classType.Name.ToString() + "{" + "Class:" + "  " + classType.BaseClass + "}" + externalInterface.Name.ToString()
                                                               + "{" + "Class:" + "  " + externalInterface.BaseClass + "}", list);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Пример #3
0
        public void StoreEachAttributeValueInListOfElectricalConnectorPins(int i, List <List <ClassOfListsFromReferencefile> > list,
                                                                           AttributeType AttributeInAttribute, AttributeType attributeType, ExternalInterfaceType externalInterface, ExternalInterfaceType classType)
        {
            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 (DictioanryofElectricalConnectorPinType.ContainsKey("(" + i + ")" + classType.Name.ToString() + "{" + "Class:" + "  " + classType.BaseClass + "}" + externalInterface.Name.ToString()
                                                                   + "{" + "Class:" + "  " + externalInterface.BaseClass + "}"))
            {
                DictioanryofElectricalConnectorPinType["(" + i + ")" + classType.Name.ToString() + "{" + "Class:" + "  " + classType.BaseClass + "}" + externalInterface.Name.ToString()
                                                       + "{" + "Class:" + "  " + externalInterface.BaseClass + "}"].AddRange(list);
            }
            else
            {
                DictioanryofElectricalConnectorPinType.Add("(" + i + ")" + classType.Name.ToString() + "{" + "Class:" + "  " + classType.BaseClass + "}" + externalInterface.Name.ToString()
                                                           + "{" + "Class:" + "  " + externalInterface.BaseClass + "}", list);
            }
        }