Exemple #1
0
        /// <summary>
        /// Adds the submitted enums to the diagram.
        /// </summary>
        private void AddEnum(TypeDeclaration enumTp)
        {
            EnumType enumType = diagram.AddEnum();

            enumType.Name           = enumTp.Name;
            enumType.AccessModifier = enumTp.Modifiers.ToEnClass();

            AddEnumValues(enumType, enumType.Values);
        }
Exemple #2
0
        /// <summary>
        /// Adds the submitted enums to the diagram.
        /// </summary>
        /// <param name="enums">A list of enums to add.</param>
        private void AddEnums(IEnumerable <NREnum> enums)
        {
            foreach (NREnum nrEnum in enums)
            {
                EnumType enumType = diagram.AddEnum();
                enumType.Name           = nrEnum.Name;
                enumType.AccessModifier = nrEnum.AccessModifier.ToNClass();

                AddEnumValues(enumType, nrEnum.Values);

                types.Add(nrEnum, enumType);
            }
        }