DataDictionary.Types.Structure.GenerateInheritedFields C# (CSharp) Méthode

GenerateInheritedFields() public méthode

Generates the fields from the interited interfaces, if they are missing
public GenerateInheritedFields ( ) : void
Résultat void
        public void GenerateInheritedFields()
        {
            foreach (Structure inheritedStructure in Interfaces)
            {
                foreach (StructureElement inheritedElement in inheritedStructure.Elements)
                {
                    StructureElement correspondingElement = null;
                    foreach (StructureElement element in Elements)
                    {
                        if (element.Name.Equals(inheritedElement.Name))
                        {
                            correspondingElement = element;
                            break;
                        }
                    }
                    if (correspondingElement == null) // no correspondance found => create that element
                    {
                        appendElements(inheritedElement.Duplicate() as StructureElement);
                    }
                    else // correspondace found => update that element
                    {
                        correspondingElement.TypeName = inheritedElement.TypeName;
                    }
                }
            }
        }