private CodeTypeDeclaration GenerateConstantTwoOptions(BooleanAttributeMetadata booleanAttribute)
        {
            CodeTypeDeclaration booleanOptionSet = new CodeTypeDeclaration(booleanAttribute.SchemaName)
            {
                IsClass    = true,
                Attributes = MemberAttributes.Static | MemberAttributes.Public
            };

            if (generateXmlDocumentation)
            {
                CustomizationService.AddMissingXmlDocumentation(booleanAttribute.SchemaName, booleanOptionSet.Comments);
            }
            var values = EnumItem.ToUniqueValues(booleanAttribute.OptionSet);

            foreach (var value in values)
            {
                CodeMemberField codeMemberField = new CodeMemberField(typeof(bool), value.Value)
                {
                    InitExpression = new CodePrimitiveExpression(value.Key == 1),
                    Attributes     = MemberAttributes.Const | MemberAttributes.Public
                };

                if (generateXmlDocumentation)
                {
                    CustomizationService.AddMissingXmlDocumentation(value.Description, codeMemberField.Comments);
                }

                booleanOptionSet.Members.Add(codeMemberField);
            }
            return(booleanOptionSet);
        }
 private CodeTypeDeclaration GenerateEnumTwoOptions(BooleanAttributeMetadata booleanAttribute)
 {
     return(GenerateEnumOptions(booleanAttribute.SchemaName, EnumItem.ToUniqueValues(booleanAttribute.OptionSet)));
 }
 private CodeTypeDeclaration GenerateEnumOptions(string schemaName, OptionMetadataCollection optionSet)
 {
     return(GenerateEnumOptions(schemaName, EnumItem.ToUniqueValues(optionSet)));
 }