public void StoreEachAttributeValueInListOfComponent(int i, List <List <ClassOfListsFromReferencefile> > list, AttributeType AttributeInAttribute, AttributeType attributeType, SupportedRoleClassType supportedRoleClass, SystemUnitFamilyType 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.SupportesRoleClassType = supportedRoleClass.RefRoleClassPath.ToString(); /*attributeparameters.RefBaseClassPath = externalInterface.RefBaseClassPath; * attributeparameters.ID = externalInterface.ID;*/ sublist.Add(attributeparameters); list.Add(sublist); try { if (DictionaryofRolesforAutomationComponenet.ContainsKey("(" + i + ")" + supportedRoleClass.RoleReference.ToString())) { DictionaryofRolesforAutomationComponenet["(" + i + ")" + supportedRoleClass.RoleReference.ToString()].AddRange(list); } else { DictionaryofRolesforAutomationComponenet.Add("(" + i + ")" + supportedRoleClass.RoleReference.ToString(), list); } } catch (Exception) { throw; } }
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; } }
public void StoreEachAttributeValueInListOfComponent(int i, List <List <ClassOfListsFromReferencefile> > list, AttributeType attributeType, SupportedRoleClassType supportedRoleClass, SystemUnitFamilyType 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.SupportesRoleClassType = supportedRoleClass.RefRoleClassPath.ToString(); //attributeparameters.ID = supportedRoleClass.ID; sublist.Add(attributeparameters); list.Add(sublist); try { if (DictionaryofRolesforAutomationComponenet.ContainsKey("(" + i + ")" + supportedRoleClass.RoleReference.ToString())) { DictionaryofRolesforAutomationComponenet["(" + i + ")" + supportedRoleClass.RoleReference.ToString()].AddRange(list); } else { DictionaryofRolesforAutomationComponenet.Add("(" + i + ")" + supportedRoleClass.RoleReference.ToString(), list); } } catch (Exception) { throw; } }
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); } }
public void SearchAttributesInsideAttributesOFElectricConnectorType(string searchName, AttributeType attribute, ClassOfListsFromReferencefile item , ExternalInterfaceType electricConnectorType) { foreach (var nestedAttribute in attribute.Attribute) { if (nestedAttribute.Name == searchName) { var eachattribute = nestedAttribute.Attribute.Append(item.Name.ToString()); eachattribute.Value = item.Value; eachattribute.DefaultValue = item.Default; eachattribute.Unit = item.Unit; eachattribute.AttributeDataType = item.DataType; eachattribute.Description = item.Description; eachattribute.Copyright = item.CopyRight; eachattribute.ID = item.ID; foreach (var val in item.RefSemanticList.Elements) { var refsem = eachattribute.RefSemantic.Append(); refsem.CorrespondingAttributePath = val.FirstAttribute.Value; } electricConnectorType.RefBaseClassPath = item.RefBaseClassPath; } if (nestedAttribute.Attribute.Exists) { SearchAttributesInsideAttributesOFElectricConnectorType(searchName, nestedAttribute, item, electricConnectorType); } } }
public void SearchForAttributesInsideAttributesofAutomationComponent(string searchName, AttributeType attribute, ClassOfListsFromReferencefile item , SupportedRoleClassType SRC) { foreach (var nestedAttribute in attribute.Attribute) { if (nestedAttribute.Name == searchName) { var eachattribute = nestedAttribute.Attribute.Append(item.Name.ToString()); eachattribute.Value = item.Value; eachattribute.DefaultValue = item.Default; eachattribute.Unit = item.Unit; eachattribute.AttributeDataType = item.DataType; eachattribute.Description = item.Description; eachattribute.Copyright = item.CopyRight; eachattribute.ID = item.ID; foreach (var val in item.RefSemanticList.Elements) { var refsem = eachattribute.RefSemantic.Append(); refsem.CorrespondingAttributePath = val.FirstAttribute.Value; } SRC.RefRoleClassPath = item.SupportesRoleClassType; } if (nestedAttribute.Attribute.Exists) { SearchForAttributesInsideAttributesofAutomationComponent(searchName, nestedAttribute, item, SRC); } } }