Ejemplo n.º 1
0
        /// <summary>
        /// Adds the submitted structs to the diagram.
        /// </summary>
        private void AddStrct(TypeDeclaration strctTp)
        {
            StructureType structureType = diagram.AddStructure();

            structureType.Name           = strctTp.Name;
            structureType.AccessModifier = strctTp.Modifiers.ToEnClass();

            AddFields(structureType, strctTp);
            AddProperties(structureType, strctTp);
            AddEvents(structureType, strctTp);
            AddConstructors(structureType, strctTp);
            AddDestructors(structureType, strctTp);
            AddMethods(structureType, strctTp);
            AddOperators(structureType, strctTp);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds the submitted structs to the diagram.
        /// </summary>
        /// <param name="structs">A list of structs to add.</param>
        private void AddStrcts(IEnumerable <NRStruct> structs)
        {
            foreach (NRStruct nrStruct in structs)
            {
                StructureType structureType = diagram.AddStructure();
                structureType.Name           = nrStruct.Name;
                structureType.AccessModifier = nrStruct.AccessModifier.ToNClass();

                AddFields(structureType, nrStruct.Fields);
                AddProperties(structureType, nrStruct.Properties);
                AddEvents(structureType, nrStruct.Events);
                AddConstructors(structureType, nrStruct.Constructors);
                AddMethods(structureType, nrStruct.Methods);
                AddOperators(structureType, nrStruct.Operators);

                types.Add(nrStruct, structureType);
            }
        }