コード例 #1
0
        /// <summary>
        /// Get default setting for given profile type.
        /// </summary>
        /// <param name="profile">
        /// The code cleanup profile to use.
        /// </param>
        /// <param name="profileType">
        /// Determine if it is a full or reformat <see cref="CodeCleanup.DefaultProfileType"/>.
        /// </param>
        public void SetDefaultSetting(CodeCleanupProfile profile, CodeCleanup.DefaultProfileType profileType)
        {
            // Default option are set in the constructors.
            OrderingOptions orderingOptions = new OrderingOptions();

            profile.SetSetting(OrderingDescriptor, orderingOptions);

            LayoutOptions layoutOptions = new LayoutOptions();

            profile.SetSetting(LayoutDescriptor, layoutOptions);

            DocumentationOptions documentationOptions = new DocumentationOptions();

            profile.SetSetting(DocumentationDescriptor, documentationOptions);

            SpacingOptions spacingOptions = new SpacingOptions();

            profile.SetSetting(SpacingDescriptor, spacingOptions);

            ReadabilityOptions readabilityOptions = new ReadabilityOptions();

            profile.SetSetting(ReadabilityDescriptor, readabilityOptions);

            MaintainabilityOptions maintainabilityOptions = new MaintainabilityOptions();

            profile.SetSetting(MaintainabilityDescriptor, maintainabilityOptions);
        }
コード例 #2
0
        public void SetDefaultSetting(CodeCleanupProfile profile, CodeCleanup.DefaultProfileType profileType)
        {
            switch (profileType)
            {
            case CodeCleanup.DefaultProfileType.FULL:
            case CodeCleanup.DefaultProfileType.REFORMAT:
                profile.SetSetting(OurDescriptor, true);
                break;

            default:
                throw new ArgumentOutOfRangeException("profileType");
            }
        }
コード例 #3
0
        /// <inheritdoc/>
        public void SetDefaultSetting(CodeCleanupProfile profile, CodeCleanup.DefaultProfileType profileType)
        {
            switch (profileType)
            {
            case CodeCleanup.DefaultProfileType.FULL:
                profile.SetSetting(DescriptorInstance, true);
                break;

            default:
                profile.SetSetting(DescriptorInstance, false);
                break;
            }
        }
コード例 #4
0
 /// <summary>
 /// Get default setting for given profile type.
 /// </summary>
 /// <param name="profile">
 /// The code cleanup profile to use.
 /// </param>
 /// <param name="profileType">
 /// Determine if it is a full or reformat <see cref="CodeCleanup.DefaultProfileType"/>.
 /// </param>
 public void SetDefaultSetting(CodeCleanupProfile profile, CodeCleanup.DefaultProfileType profileType)
 {
     profile.SetSetting(Descriptor, new StyleCopCodeCleanupOptions());
 }
コード例 #5
0
 /// <summary>
 /// Get default setting for given profile type.
 /// </summary>
 /// <param name="profile">
 /// The code cleanup profile to use.
 /// </param>
 /// <param name="profileType">
 /// Determine if it is a full or reformat <see cref="CodeCleanup.DefaultProfileType"/>.
 /// </param>
 public void SetDefaultSetting(CodeCleanupProfile profile, CodeCleanup.DefaultProfileType profileType)
 {
     profile.SetSetting(FIX_VIOLATIONS, value: true);
     profile.SetSetting(CREATE_XML_DOC_STUB, value: false);
 }
 public void SetDefaultSetting(CodeCleanupProfile profile, CodeCleanup.DefaultProfileType profileType)
 {
 }