コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FormattingViewModel" /> class.
        /// </summary>
        /// <param name="package">The hosting package.</param>
        /// <param name="activeSettings">The active settings.</param>
        public FormattingViewModel(CodeMaidPackage package, Settings activeSettings)
            : base(package, activeSettings)
        {
            Mappings = new SettingsToOptionsList(ActiveSettings, this)
            {
                new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Formatting_CommentRunDuringCleanup, x => CommentRunDuringCleanup),
                new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Formatting_CommentSkipWrapOnLastWord, x => CommentSkipWrapOnLastWord),
                new SettingToOptionMapping <int, int>(x => ActiveSettings.Formatting_CommentWrapColumn, x => CommentWrapColumn),
                new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Formatting_CommentXmlAlignParamTags, x => CommentXmlAlignParamTags),
                new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Formatting_CommentXmlKeepTagsTogether, x => CommentXmlKeepTagsTogether),
                new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Formatting_CommentXmlSpaceSingleTags, x => CommentXmlSpaceSingleTags),
                new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Formatting_CommentXmlSpaceTags, x => CommentXmlSpaceTags),
                new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Formatting_CommentXmlSplitAllTags, x => CommentXmlSplitAllTags),
                new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Formatting_CommentXmlSplitSummaryTagToMultipleLines, x => CommentXmlSplitSummaryTagToMultipleLines),
                new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Formatting_CommentXmlTagsToLowerCase, x => CommentXmlTagsToLowerCase),
                new SettingToOptionMapping <int, int>(x => ActiveSettings.Formatting_CommentXmlValueIndent, x => CommentXmlValueIndent)
            };

            _editorProperties = Package.IDE.Properties["FontsAndColors", "TextEditor"];
            var property            = _editorProperties.Item("FontsAndColorsItems");
            var fontsAndColorsItems = (EnvDTE.FontsAndColorsItems)property.Object;

            _commentColors = fontsAndColorsItems.Item("Comment");

            PropertyChanged += (sender, args) => UpdatePreviewText();
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningFileTypesViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningFileTypesViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_ExcludeT4GeneratedCode, x => ExcludeT4GeneratedCode),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_ExclusionExpression, x => ExclusionExpression),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_InclusionExpression, x => InclusionExpression),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeCPlusPlus, x => IncludeCPlusPlus),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeCSharp, x => IncludeCSharp),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeCSS, x => IncludeCSS),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeEverythingElse, x => IncludeEverythingElse),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeFSharp, x => IncludeFSharp),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeHTML, x => IncludeHTML),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeJavaScript, x => IncludeJavaScript),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeJSON, x => IncludeJSON),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeLESS, x => IncludeLESS),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludePHP, x => IncludePHP),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludePowerShell, x => IncludePowerShell),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeR, x => IncludeR),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeSCSS, x => IncludeSCSS),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeTypeScript, x => IncludeTypeScript),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeVB, x => IncludeVisualBasic),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeXAML, x => IncludeXAML),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_IncludeXML, x => IncludeXML)
     };
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningUpdateViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningUpdateViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_UpdateAccessorsToBothBeSingleLineOrMultiLine, x => UpdateAccessorsToBothBeSingleLineOrMultiLine),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_UpdateEndRegionDirectives, x => UpdateEndRegionDirectives),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderCPlusPlus, x => UpdateFileHeaderCPlusPlus),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderCSharp, x => UpdateFileHeaderCSharp),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderCSS, x => UpdateFileHeaderCSS),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderFSharp, x => UpdateFileHeaderFSharp),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderHTML, x => UpdateFileHeaderHTML),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderJavaScript, x => UpdateFileHeaderJavaScript),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderJSON, x => UpdateFileHeaderJSON),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderLESS, x => UpdateFileHeaderLESS),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderPHP, x => UpdateFileHeaderPHP),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderPowerShell, x => UpdateFileHeaderPowerShell),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderR, x => UpdateFileHeaderR),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderSCSS, x => UpdateFileHeaderSCSS),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderTypeScript, x => UpdateFileHeaderTypeScript),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderVB, x => UpdateFileHeaderVisualBasic),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderXAML, x => UpdateFileHeaderXAML),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderXML, x => UpdateFileHeaderXML),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_UpdateSingleLineMethods, x => UpdateSingleLineMethods)
     };
 }
コード例 #4
0
 public FeaturesViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new Mapping(x => ActiveSettings.Feature_BuildProgressToolWindow, x => BuildProgressToolWindow),
         new Mapping(x => ActiveSettings.Feature_CleanupActiveCode, x => CleanupActiveCode),
         new Mapping(x => ActiveSettings.Feature_CleanupAllCode, x => CleanupAllCode),
         new Mapping(x => ActiveSettings.Feature_CleanupOpenCode, x => CleanupOpenCode),
         new Mapping(x => ActiveSettings.Feature_CleanupSelectedCode, x => CleanupSelectedCode),
         new Mapping(x => ActiveSettings.Feature_CloseAllReadOnly, x => CloseAllReadOnly),
         new Mapping(x => ActiveSettings.Feature_CollapseAllSolutionExplorer, x => CollapseAllSolutionExplorer),
         new Mapping(x => ActiveSettings.Feature_CollapseSelectedSolutionExplorer, x => CollapseSelectedSolutionExplorer),
         new Mapping(x => ActiveSettings.Feature_CommentFormat, x => CommentFormat),
         new Mapping(x => ActiveSettings.Feature_FindInSolutionExplorer, x => FindInSolutionExplorer),
         new Mapping(x => ActiveSettings.Feature_JoinLines, x => JoinLines),
         new Mapping(x => ActiveSettings.Feature_ReadOnlyToggle, x => ReadOnlyToggle),
         new Mapping(x => ActiveSettings.Feature_RemoveRegion, x => RemoveRegion),
         new Mapping(x => ActiveSettings.Feature_ReorganizeActiveCode, x => ReorganizeActiveCode),
         new Mapping(x => ActiveSettings.Feature_SettingCleanupOnSave, x => SettingCleanupOnSave),
         new Mapping(x => ActiveSettings.Feature_SortLines, x => SortLines),
         new Mapping(x => ActiveSettings.Feature_SpadeToolWindow, x => SpadeToolWindow),
         new Mapping(x => ActiveSettings.Feature_SwitchFile, x => SwitchFile)
     };
 }
コード例 #5
0
ファイル: FormattingViewModel.cs プロジェクト: AmakJ/codemaid
        /// <summary>
        /// Initializes a new instance of the <see cref="FormattingViewModel" /> class.
        /// </summary>
        /// <param name="package">The hosting package.</param>
        /// <param name="activeSettings">The active settings.</param>
        public FormattingViewModel(CodeMaidPackage package, Settings activeSettings)
            : base(package, activeSettings)
        {
            Mappings = new SettingsToOptionsList(ActiveSettings, this)
            {
                new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentRunDuringCleanup, x => CommentRunDuringCleanup),
                new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentSkipWrapOnLastWord, x => CommentSkipWrapOnLastWord),
                new SettingToOptionMapping<int, int>(x => ActiveSettings.Formatting_CommentWrapColumn, x => CommentWrapColumn),
                new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlAlignParamTags, x => CommentXmlAlignParamTags),
                new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlKeepTagsTogether, x => CommentXmlKeepTagsTogether),
                new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlSpaceSingleTags, x => CommentXmlSpaceSingleTags),
                new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlSpaceTags, x => CommentXmlSpaceTags),
                new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlSplitAllTags, x => CommentXmlSplitAllTags),
                new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlSplitSummaryTagToMultipleLines, x => CommentXmlSplitSummaryTagToMultipleLines),
                new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Formatting_CommentXmlTagsToLowerCase, x => CommentXmlTagsToLowerCase),
                new SettingToOptionMapping<int, int>(x => ActiveSettings.Formatting_CommentXmlValueIndent, x => CommentXmlValueIndent)
            };

            _editorProperties = Package.IDE.Properties["FontsAndColors", "TextEditor"];
            var property = _editorProperties.Item("FontsAndColorsItems");
            var fontsAndColorsItems = (EnvDTE.FontsAndColorsItems)property.Object;
            _commentColors = fontsAndColorsItems.Item("Comment");

            PropertyChanged += (sender, args) => UpdatePreviewText();
        }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningFileTypesViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningFileTypesViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_ExcludeT4GeneratedCode, x => ExcludeT4GeneratedCode),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_ExclusionExpression, x => ExclusionExpression),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeCPlusPlus, x => IncludeCPlusPlus),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeCSharp, x => IncludeCSharp),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeCSS, x => IncludeCSS),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeEverythingElse, x => IncludeEverythingElse),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeFSharp, x => IncludeFSharp),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeHTML, x => IncludeHTML),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeJavaScript, x => IncludeJavaScript),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeJSON, x => IncludeJSON),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeLESS, x => IncludeLESS),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludePHP, x => IncludePHP),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludePowerShell, x => IncludePowerShell),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeR, x => IncludeR),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeSCSS, x => IncludeSCSS),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeTypeScript, x => IncludeTypeScript),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeVB, x => IncludeVisualBasic),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeXAML, x => IncludeXAML),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_IncludeXML, x => IncludeXML)
     };
 }
コード例 #7
0
ファイル: FeaturesViewModel.cs プロジェクト: waodng/VSIX
 public FeaturesViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new Mapping(x => ActiveSettings.Feature_BuildProgressToolWindow, x => BuildProgressToolWindow),
         new Mapping(x => ActiveSettings.Feature_CleanupActiveCode, x => CleanupActiveCode),
         new Mapping(x => ActiveSettings.Feature_CleanupAllCode, x => CleanupAllCode),
         new Mapping(x => ActiveSettings.Feature_CleanupOpenCode, x => CleanupOpenCode),
         new Mapping(x => ActiveSettings.Feature_CleanupSelectedCode, x => CleanupSelectedCode),
         new Mapping(x => ActiveSettings.Feature_CloseAllReadOnly, x => CloseAllReadOnly),
         new Mapping(x => ActiveSettings.Feature_CollapseAllSolutionExplorer, x => CollapseAllSolutionExplorer),
         new Mapping(x => ActiveSettings.Feature_CollapseSelectedSolutionExplorer, x => CollapseSelectedSolutionExplorer),
         new Mapping(x => ActiveSettings.Feature_CommentFormat, x => CommentFormat),
         new Mapping(x => ActiveSettings.Feature_FindInSolutionExplorer, x => FindInSolutionExplorer),
         new Mapping(x => ActiveSettings.Feature_JoinLines, x => JoinLines),
         new Mapping(x => ActiveSettings.Feature_ReadOnlyToggle, x => ReadOnlyToggle),
         new Mapping(x => ActiveSettings.Feature_RemoveRegion, x => RemoveRegion),
         new Mapping(x => ActiveSettings.Feature_ReorganizeActiveCode, x => ReorganizeActiveCode),
         new Mapping(x => ActiveSettings.Feature_SettingCleanupOnSave, x => SettingCleanupOnSave),
         new Mapping(x => ActiveSettings.Feature_SortLines, x => SortLines),
         new Mapping(x => ActiveSettings.Feature_SpadeToolWindow, x => SpadeToolWindow),
         new Mapping(x => ActiveSettings.Feature_SwitchFile, x => SwitchFile),
         new Mapping(x => ActiveSettings.Refactoring, x => Refactoring),                          //重构代码
         new Mapping(x => ActiveSettings.NestInOutFile, x => NestInOutFile),                      //嵌入嵌出文件
         new Mapping(x => ActiveSettings.Feature_HideVsMenu, x => HideVsMenu),                    //隐藏vs菜单栏
         new Mapping(x => ActiveSettings.Feature_FileDifferent, x => FileDifferent),              //文件比较
         new Mapping(x => ActiveSettings.Feature_DataBaseWordWindow, x => DataBaseWordToolWindow) //数据库文档导出
     };
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningUpdateViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningUpdateViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_UpdateAccessorsToBothBeSingleLineOrMultiLine, x => UpdateAccessorsToBothBeSingleLineOrMultiLine),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_UpdateEndRegionDirectives, x => UpdateEndRegionDirectives),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderCPlusPlus, x => UpdateFileHeaderCPlusPlus),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderCSharp, x => UpdateFileHeaderCSharp),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderCSS, x => UpdateFileHeaderCSS),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderFSharp, x => UpdateFileHeaderFSharp),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderHTML, x => UpdateFileHeaderHTML),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderJavaScript, x => UpdateFileHeaderJavaScript),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderJSON, x => UpdateFileHeaderJSON),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderLESS, x => UpdateFileHeaderLESS),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderPHP, x => UpdateFileHeaderPHP),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderPowerShell, x => UpdateFileHeaderPowerShell),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderR, x => UpdateFileHeaderR),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderSCSS, x => UpdateFileHeaderSCSS),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderTypeScript, x => UpdateFileHeaderTypeScript),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderVB, x => UpdateFileHeaderVisualBasic),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderXAML, x => UpdateFileHeaderXAML),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UpdateFileHeaderXML, x => UpdateFileHeaderXML),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_UpdateSingleLineMethods, x => UpdateSingleLineMethods)
     };
 }
コード例 #9
0
ファイル: SwitchingViewModel.cs プロジェクト: reima/codemaid
 /// <summary>
 /// Initializes a new instance of the <see cref="SwitchingViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public SwitchingViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Switching_RelatedFileExtensionsExpression, x => RelatedFileExtensionsExpression)
     };
 }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SwitchingViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public SwitchingViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Switching_RelatedFileExtensionsExpression, x => RelatedFileExtensionsExpression)
     };
 }
コード例 #11
0
ファイル: FindingViewModel.cs プロジェクト: rucila/codemaid
 /// <summary>
 /// Initializes a new instance of the <see cref="FindingViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public FindingViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Finding_TemporarilyOpenSolutionFolders, x => TemporarilyOpenSolutionFolders)
     };
 }
コード例 #12
0
ファイル: FindingViewModel.cs プロジェクト: reima/codemaid
 /// <summary>
 /// Initializes a new instance of the <see cref="FindingViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public FindingViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Finding_TemporarilyOpenSolutionFolders, x => TemporarilyOpenSolutionFolders)
     };
 }
コード例 #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CollapsingViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CollapsingViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Collapsing_CollapseSolutionWhenOpened, x => CollapseSolutionWhenOpened),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Collapsing_KeepSoloProjectExpanded, x => KeepSoloProjectExpanded)
     };
 }
コード例 #14
0
ファイル: CollapsingViewModel.cs プロジェクト: zer09/codemaid
 /// <summary>
 /// Initializes a new instance of the <see cref="CollapsingViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CollapsingViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Collapsing_CollapseSolutionWhenOpened, x => CollapseSolutionWhenOpened),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Collapsing_KeepSoloProjectExpanded, x => KeepSoloProjectExpanded)
     };
 }
コード例 #15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningGeneralViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningGeneralViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_AutoCleanupOnFileSave, x => AutoCleanupOnFileSave),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_AutoSaveAndCloseIfOpenedByCleanup, x => AutoSaveAndCloseIfOpenedByCleanup),
         new SettingToOptionMapping <int, AskYesNo>(x => ActiveSettings.Cleaning_PerformPartialCleanupOnExternal, x => PerformPartialCleanupOnExternal)
     };
 }
コード例 #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningUpdateViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningUpdateViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_UpdateAccessorsToBothBeSingleLineOrMultiLine, x => UpdateAccessorsToBothBeSingleLineOrMultiLine),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_UpdateEndRegionDirectives, x => UpdateEndRegionDirectives),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_UpdateSingleLineMethods, x => UpdateSingleLineMethods)
     };
 }
コード例 #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProgressingViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public ProgressingViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Progressing_HideBuildProgressOnBuildStop, x => HideBuildProgressOnBuildStop),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Progressing_ShowBuildProgressOnBuildStart, x => ShowBuildProgressOnBuildStart),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Progressing_ShowProgressOnWindowsTaskbar, x => ShowProgressOnWindowsTaskbar)
     };
 }
コード例 #18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningUpdateViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningUpdateViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_UpdateAccessorsToBothBeSingleLineOrMultiLine, x => UpdateAccessorsToBothBeSingleLineOrMultiLine),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_UpdateEndRegionDirectives, x => UpdateEndRegionDirectives),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_UpdateSingleLineMethods, x => UpdateSingleLineMethods)
     };
 }
コード例 #19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProgressingViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public ProgressingViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Progressing_HideBuildProgressOnBuildStop, x => HideBuildProgressOnBuildStop),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Progressing_ShowBuildProgressOnBuildStart, x => ShowBuildProgressOnBuildStart),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Progressing_ShowProgressOnWindowsTaskbar, x => ShowProgressOnWindowsTaskbar)
     };
 }
コード例 #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningGeneralViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningGeneralViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_AutoCleanupOnFileSave, x => AutoCleanupOnFileSave),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_AutoSaveAndCloseIfOpenedByCleanup, x => AutoSaveAndCloseIfOpenedByCleanup),
         new SettingToOptionMapping<int, AskYesNo>(x => ActiveSettings.Cleaning_PerformPartialCleanupOnExternal, x => PerformPartialCleanupOnExternal)
     };
 }
コード例 #21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningVisualStudioViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningVisualStudioViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RunVisualStudioFormatDocumentCommand, x => RunVisualStudioFormatDocument),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RunVisualStudioRemoveAndSortUsingStatements, x => RunVisualStudioRemoveAndSortUsingStatements),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_SkipRemoveAndSortUsingStatementsDuringAutoCleanupOnSave, x => SkipRemoveAndSortUsingStatementsDuringAutoCleanupOnSave),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.Cleaning_UsingStatementsToReinsertWhenRemovedExpression, x => UsingStatementsToReinsertWhenRemovedExpression)
     };
 }
コード例 #22
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReorganizingRegionsViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public ReorganizingRegionsViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Reorganizing_RegionsIncludeAccessLevel, x => IncludeAccessLevel),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Reorganizing_RegionsInsertKeepEvenIfEmpty, x => InsertKeepEvenIfEmpty),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Reorganizing_RegionsInsertNewRegions, x => InsertNewRegions),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Reorganizing_RegionsRemoveExistingRegions, x => RemoveExistingRegions)
     };
 }
コード例 #23
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReorganizingRegionsViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public ReorganizingRegionsViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_RegionsIncludeAccessLevel, x => IncludeAccessLevel),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_RegionsInsertKeepEvenIfEmpty, x => InsertKeepEvenIfEmpty),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_RegionsInsertNewRegions, x => InsertNewRegions),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_RegionsRemoveExistingRegions, x => RemoveExistingRegions)
     };
 }
コード例 #24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReorganizingGeneralViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public ReorganizingGeneralViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Reorganizing_AlphabetizeMembersOfTheSameGroup, x => AlphabetizeMembersOfTheSameGroup),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Reorganizing_KeepMembersWithinRegions, x => KeepMembersWithinRegions),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Reorganizing_PrimaryOrderByAccessLevel, x => PrimaryOrderByAccessLevel),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Reorganizing_RunAtStartOfCleanup, x => RunAtStartOfCleanup)
     };
 }
コード例 #25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReorganizingGeneralViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public ReorganizingGeneralViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_AlphabetizeMembersOfTheSameGroup, x => AlphabetizeMembersOfTheSameGroup),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_KeepMembersWithinRegions, x => KeepMembersWithinRegions),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_PrimaryOrderByAccessLevel, x => PrimaryOrderByAccessLevel),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_RunAtStartOfCleanup, x => RunAtStartOfCleanup)
     };
 }
コード例 #26
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ThirdPartyViewModel" /> class.
        /// </summary>
        /// <param name="package">The hosting package.</param>
        /// <param name="activeSettings">The active settings.</param>
        public ThirdPartyViewModel(CodeMaidPackage package, Settings activeSettings)
            : base(package, activeSettings)
        {
            Mappings = new SettingsToOptionsList(ActiveSettings, this)
            {
                new SettingToOptionMapping<bool, bool>(x => ActiveSettings.ThirdParty_UseJetBrainsReSharperCleanup, x => UseJetBrainsReSharperCleanup),
                new SettingToOptionMapping<bool, bool>(x => ActiveSettings.ThirdParty_UseTelerikJustCodeCleanup, x => UseTelerikJustCodeCleanup),
                new SettingToOptionMapping<bool, bool>(x => ActiveSettings.ThirdParty_UseXAMLStylerCleanup, x => UseXAMLStylerCleanup),
                new SettingToOptionMapping<string, string>(x => ActiveSettings.ThirdParty_OtherCleaningCommandsExpression, x => OtherCleaningCommandsExpression)
            };

            _commandHelper = CommandHelper.GetInstance(package);
        }
コード例 #27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningVisualStudioViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningVisualStudioViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RunVisualStudioFormatDocumentCommand, x => RunVisualStudioFormatDocument),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RunVisualStudioRemoveUnusedUsingStatements, x => RunVisualStudioRemoveUnusedUsingStatements),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RunVisualStudioSortUsingStatements, x => RunVisualStudioSortUsingStatements),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_SkipRemoveUnusedUsingStatementsDuringAutoCleanupOnSave, x => SkipRemoveUnusedUsingStatementsDuringAutoCleanupOnSave),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_SkipSortUsingStatementsDuringAutoCleanupOnSave, x => SkipSortUsingStatementsDuringAutoCleanupOnSave),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.Cleaning_UsingStatementsToReinsertWhenRemovedExpression, x => UsingStatementsToReinsertWhenRemovedExpression)
     };
 }
コード例 #28
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ThirdPartyViewModel" /> class.
        /// </summary>
        /// <param name="package">The hosting package.</param>
        /// <param name="activeSettings">The active settings.</param>
        public ThirdPartyViewModel(CodeMaidPackage package, Settings activeSettings)
            : base(package, activeSettings)
        {
            Mappings = new SettingsToOptionsList(ActiveSettings, this)
            {
                new SettingToOptionMapping <bool, bool>(x => ActiveSettings.ThirdParty_UseJetBrainsReSharperCleanup, x => UseJetBrainsReSharperCleanup),
                new SettingToOptionMapping <bool, bool>(x => ActiveSettings.ThirdParty_UseTelerikJustCodeCleanup, x => UseTelerikJustCodeCleanup),
                new SettingToOptionMapping <bool, bool>(x => ActiveSettings.ThirdParty_UseXAMLStylerCleanup, x => UseXAMLStylerCleanup),
                new SettingToOptionMapping <string, string>(x => ActiveSettings.ThirdParty_OtherCleaningCommandsExpression, x => OtherCleaningCommandsExpression)
            };

            _commandHelper = CommandHelper.GetInstance(package);
        }
コード例 #29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReorganizingGeneralViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public ReorganizingGeneralViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_AlphabetizeMembersOfTheSameGroup, x => AlphabetizeMembersOfTheSameGroup),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_ExplicitMembersAtEnd, x => ExplicitInterfaceMembersAtTheEnd),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_KeepMembersWithinRegions, x => KeepMembersWithinRegions),
         new SettingToOptionMapping <int, AskYesNo>(x => ActiveSettings.Reorganizing_PerformWhenPreprocessorConditionals, x => PerformWhenPreprocessorConditionals),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_PrimaryOrderByAccessLevel, x => PrimaryOrderByAccessLevel),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Reorganizing_RunAtStartOfCleanup, x => RunAtStartOfCleanup)
     };
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningInsertViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningInsertViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterClasses, x => InsertBlankLinePaddingAfterClasses),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterDelegates, x => InsertBlankLinePaddingAfterDelegates),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterEndRegionTags, x => InsertBlankLinePaddingAfterEndRegionTags),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterEnumerations, x => InsertBlankLinePaddingAfterEnumerations),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterEvents, x => InsertBlankLinePaddingAfterEvents),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterFieldsMultiLine, x => InsertBlankLinePaddingAfterFieldsMultiLine),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterFieldsSingleLine, x => InsertBlankLinePaddingAfterFieldsSingleLine),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterInterfaces, x => InsertBlankLinePaddingAfterInterfaces),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterMethods, x => InsertBlankLinePaddingAfterMethods),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterNamespaces, x => InsertBlankLinePaddingAfterNamespaces),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterPropertiesMultiLine, x => InsertBlankLinePaddingAfterPropertiesMultiLine),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterPropertiesSingleLine, x => InsertBlankLinePaddingAfterPropertiesSingleLine),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterRegionTags, x => InsertBlankLinePaddingAfterRegionTags),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterStructs, x => InsertBlankLinePaddingAfterStructs),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterUsingStatementBlocks, x => InsertBlankLinePaddingAfterUsingStatementBlocks),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeCaseStatements, x => InsertBlankLinePaddingBeforeCaseStatements),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeClasses, x => InsertBlankLinePaddingBeforeClasses),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeDelegates, x => InsertBlankLinePaddingBeforeDelegates),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeEndRegionTags, x => InsertBlankLinePaddingBeforeEndRegionTags),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeEnumerations, x => InsertBlankLinePaddingBeforeEnumerations),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeEvents, x => InsertBlankLinePaddingBeforeEvents),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeFieldsMultiLine, x => InsertBlankLinePaddingBeforeFieldsMultiLine),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeFieldsSingleLine, x => InsertBlankLinePaddingBeforeFieldsSingleLine),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeInterfaces, x => InsertBlankLinePaddingBeforeInterfaces),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeMethods, x => InsertBlankLinePaddingBeforeMethods),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeNamespaces, x => InsertBlankLinePaddingBeforeNamespaces),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforePropertiesMultiLine, x => InsertBlankLinePaddingBeforePropertiesMultiLine),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforePropertiesSingleLine, x => InsertBlankLinePaddingBeforePropertiesSingleLine),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeRegionTags, x => InsertBlankLinePaddingBeforeRegionTags),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeSingleLineComments, x => InsertBlankLinePaddingBeforeSingleLineComments),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeStructs, x => InsertBlankLinePaddingBeforeStructs),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeUsingStatementBlocks, x => InsertBlankLinePaddingBeforeUsingStatementBlocks),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBetweenPropertiesMultiLineAccessors, x => InsertBlankLinePaddingBetweenPropertiesMultiLineAccessors),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertBlankSpaceBeforeSelfClosingAngleBrackets, x => InsertBlankSpaceBeforeSelfClosingAngleBrackets),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertEndOfFileTrailingNewLine, x => InsertEndOfFileTrailingNewLine),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnClasses, x => InsertExplicitAccessModifiersOnClasses),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnDelegates, x => InsertExplicitAccessModifiersOnDelegates),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnEnumerations, x => InsertExplicitAccessModifiersOnEnumerations),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnEvents, x => InsertExplicitAccessModifiersOnEvents),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnFields, x => InsertExplicitAccessModifiersOnFields),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnInterfaces, x => InsertExplicitAccessModifiersOnInterfaces),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnMethods, x => InsertExplicitAccessModifiersOnMethods),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnProperties, x => InsertExplicitAccessModifiersOnProperties),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnStructs, x => InsertExplicitAccessModifiersOnStructs)
     };
 }
コード例 #31
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningInsertViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningInsertViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterClasses, x => InsertBlankLinePaddingAfterClasses),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterDelegates, x => InsertBlankLinePaddingAfterDelegates),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterEndRegionTags, x => InsertBlankLinePaddingAfterEndRegionTags),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterEnumerations, x => InsertBlankLinePaddingAfterEnumerations),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterEvents, x => InsertBlankLinePaddingAfterEvents),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterFieldsMultiLine, x => InsertBlankLinePaddingAfterFieldsMultiLine),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterInterfaces, x => InsertBlankLinePaddingAfterInterfaces),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterMethods, x => InsertBlankLinePaddingAfterMethods),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterNamespaces, x => InsertBlankLinePaddingAfterNamespaces),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterPropertiesMultiLine, x => InsertBlankLinePaddingAfterPropertiesMultiLine),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterPropertiesSingleLine, x => InsertBlankLinePaddingAfterPropertiesSingleLine),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterRegionTags, x => InsertBlankLinePaddingAfterRegionTags),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterStructs, x => InsertBlankLinePaddingAfterStructs),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingAfterUsingStatementBlocks, x => InsertBlankLinePaddingAfterUsingStatementBlocks),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeCaseStatements, x => InsertBlankLinePaddingBeforeCaseStatements),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeClasses, x => InsertBlankLinePaddingBeforeClasses),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeDelegates, x => InsertBlankLinePaddingBeforeDelegates),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeEndRegionTags, x => InsertBlankLinePaddingBeforeEndRegionTags),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeEnumerations, x => InsertBlankLinePaddingBeforeEnumerations),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeEvents, x => InsertBlankLinePaddingBeforeEvents),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeFieldsMultiLine, x => InsertBlankLinePaddingBeforeFieldsMultiLine),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeInterfaces, x => InsertBlankLinePaddingBeforeInterfaces),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeMethods, x => InsertBlankLinePaddingBeforeMethods),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeNamespaces, x => InsertBlankLinePaddingBeforeNamespaces),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforePropertiesMultiLine, x => InsertBlankLinePaddingBeforePropertiesMultiLine),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforePropertiesSingleLine, x => InsertBlankLinePaddingBeforePropertiesSingleLine),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeRegionTags, x => InsertBlankLinePaddingBeforeRegionTags),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeSingleLineComments, x => InsertBlankLinePaddingBeforeSingleLineComments),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeStructs, x => InsertBlankLinePaddingBeforeStructs),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBeforeUsingStatementBlocks, x => InsertBlankLinePaddingBeforeUsingStatementBlocks),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankLinePaddingBetweenPropertiesMultiLineAccessors, x => InsertBlankLinePaddingBetweenPropertiesMultiLineAccessors),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertBlankSpaceBeforeSelfClosingAngleBrackets, x => InsertBlankSpaceBeforeSelfClosingAngleBrackets),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertEndOfFileTrailingNewLine, x => InsertEndOfFileTrailingNewLine),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnClasses, x => InsertExplicitAccessModifiersOnClasses),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnDelegates, x => InsertExplicitAccessModifiersOnDelegates),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnEnumerations, x => InsertExplicitAccessModifiersOnEnumerations),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnEvents, x => InsertExplicitAccessModifiersOnEvents),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnFields, x => InsertExplicitAccessModifiersOnFields),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnInterfaces, x => InsertExplicitAccessModifiersOnInterfaces),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnMethods, x => InsertExplicitAccessModifiersOnMethods),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnProperties, x => InsertExplicitAccessModifiersOnProperties),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_InsertExplicitAccessModifiersOnStructs, x => InsertExplicitAccessModifiersOnStructs)
     };
 }
コード例 #32
0
ファイル: GeneralViewModel.cs プロジェクト: zer09/codemaid
 /// <summary>
 /// Initializes a new instance of the <see cref="GeneralViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public GeneralViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.General_CacheFiles, x => CacheFiles),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.General_DiagnosticsMode, x => DiagnosticsMode),
         new SettingToOptionMapping <string, string>(x => ActiveSettings.General_Font, x => Font),
         new SettingToOptionMapping <int, IconSetMode>(x => ActiveSettings.General_IconSet, x => IconSetMode),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.General_LoadModelsAsynchronously, x => LoadModelsAsynchronously),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.General_ShowStartPageOnSolutionClose, x => ShowStartPageOnSolutionClose),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.General_SkipUndoTransactionsDuringAutoCleanupOnSave, x => SkipUndoTransactionsDuringAutoCleanupOnSave),
         new SettingToOptionMapping <int, ThemeMode>(x => ActiveSettings.General_Theme, x => ThemeMode),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.General_UseUndoTransactions, x => UseUndoTransactions)
     };
 }
コード例 #33
0
ファイル: GeneralViewModel.cs プロジェクト: reima/codemaid
 /// <summary>
 /// Initializes a new instance of the <see cref="GeneralViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public GeneralViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.General_CacheFiles, x => CacheFiles),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.General_DiagnosticsMode, x => DiagnosticsMode),
         new SettingToOptionMapping<string, string>(x => ActiveSettings.General_Font, x => Font),
         new SettingToOptionMapping<int, IconSetMode>(x => ActiveSettings.General_IconSet, x => IconSetMode),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.General_LoadModelsAsynchronously, x => LoadModelsAsynchronously),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.General_ShowStartPageOnSolutionClose, x => ShowStartPageOnSolutionClose),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.General_SkipUndoTransactionsDuringAutoCleanupOnSave, x => SkipUndoTransactionsDuringAutoCleanupOnSave),
         new SettingToOptionMapping<int, ThemeMode>(x => ActiveSettings.General_Theme, x => ThemeMode),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.General_UseUndoTransactions, x => UseUndoTransactions)
     };
 }
コード例 #34
0
ファイル: DiggingViewModel.cs プロジェクト: agamat/codemaid
 /// <summary>
 /// Initializes a new instance of the <see cref="DiggingViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public DiggingViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Digging_CenterOnWhole, x => CenterOnWhole),
         new SettingToOptionMapping<int, int>(x => ActiveSettings.Digging_ComplexityAlertThreshold, x => ComplexityAlertThreshold),
         new SettingToOptionMapping<int, int>(x => ActiveSettings.Digging_ComplexityWarningThreshold, x => ComplexityWarningThreshold),
         new SettingToOptionMapping<int, int>(x => ActiveSettings.Digging_IndentationMargin, x => IndentationMargin),
         new SettingToOptionMapping<int, CodeSortOrder>(x => ActiveSettings.Digging_PrimarySortOrder, x => PrimarySortOrder),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Digging_SecondarySortTypeByName, x => SecondarySortTypeByName),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Digging_ShowItemComplexity, x => ShowItemComplexity),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Digging_ShowItemMetadata, x => ShowItemMetadata),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Digging_ShowMethodParameters, x => ShowMethodParameters),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Digging_SynchronizeOutlining, x => SynchronizeOutlining)
     };
 }
コード例 #35
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DiggingViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public DiggingViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Digging_CenterOnWhole, x => CenterOnWhole),
         new SettingToOptionMapping <int, int>(x => ActiveSettings.Digging_ComplexityAlertThreshold, x => ComplexityAlertThreshold),
         new SettingToOptionMapping <int, int>(x => ActiveSettings.Digging_ComplexityWarningThreshold, x => ComplexityWarningThreshold),
         new SettingToOptionMapping <int, int>(x => ActiveSettings.Digging_IndentationMargin, x => IndentationMargin),
         new SettingToOptionMapping <int, CodeSortOrder>(x => ActiveSettings.Digging_PrimarySortOrder, x => PrimarySortOrder),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Digging_SecondarySortTypeByName, x => SecondarySortTypeByName),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Digging_ShowItemComplexity, x => ShowItemComplexity),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Digging_ShowItemMetadata, x => ShowItemMetadata),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Digging_ShowMethodParameters, x => ShowMethodParameters),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Digging_SynchronizeOutlining, x => SynchronizeOutlining)
     };
 }
コード例 #36
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReorganizingTypesViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public ReorganizingTypesViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeClasses, x => Classes),
         new SettingToOptionMapping <string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeConstructors, x => Constructors),
         new SettingToOptionMapping <string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeDelegates, x => Delegates),
         new SettingToOptionMapping <string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeDestructors, x => Destructors),
         new SettingToOptionMapping <string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeEnums, x => Enums),
         new SettingToOptionMapping <string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeEvents, x => Events),
         new SettingToOptionMapping <string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeFields, x => Fields),
         new SettingToOptionMapping <string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeIndexers, x => Indexers),
         new SettingToOptionMapping <string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeInterfaces, x => Interfaces),
         new SettingToOptionMapping <string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeMethods, x => Methods),
         new SettingToOptionMapping <string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeProperties, x => Properties),
         new SettingToOptionMapping <string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeStructs, x => Structs)
     };
 }
コード例 #37
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ReorganizingTypesViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public ReorganizingTypesViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeClasses, x => Classes),
         new SettingToOptionMapping<string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeConstructors, x => Constructors),
         new SettingToOptionMapping<string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeDelegates, x => Delegates),
         new SettingToOptionMapping<string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeDestructors, x => Destructors),
         new SettingToOptionMapping<string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeEnums, x => Enums),
         new SettingToOptionMapping<string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeEvents, x => Events),
         new SettingToOptionMapping<string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeFields, x => Fields),
         new SettingToOptionMapping<string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeIndexers, x => Indexers),
         new SettingToOptionMapping<string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeInterfaces, x => Interfaces),
         new SettingToOptionMapping<string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeMethods, x => Methods),
         new SettingToOptionMapping<string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeProperties, x => Properties),
         new SettingToOptionMapping<string, MemberTypeSetting>(x => ActiveSettings.Reorganizing_MemberTypeStructs, x => Structs)
     };
 }
コード例 #38
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningRemoveViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningRemoveViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesAfterAttributes, x => RemoveBlankLinesAfterAttributes),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesAfterOpeningBrace, x => RemoveBlankLinesAfterOpeningBraces),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesAtBottom, x => RemoveBlankLinesAtBottom),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesAtTop, x => RemoveBlankLinesAtTop),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesBeforeClosingBrace, x => RemoveBlankLinesBeforeClosingBraces),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesBeforeClosingTags, x => RemoveBlankLinesBeforeClosingTags),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesBetweenChainedStatements, x => RemoveBlankLinesBetweenChainedStatements),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankSpacesBeforeClosingAngleBrackets, x => RemoveBlankSpacesBeforeClosingAngleBrackets),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RemoveEndOfFileTrailingNewLine, x => RemoveEndOfFileTrailingNewLine),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RemoveEndOfLineWhitespace, x => RemoveEndOfLineWhitespace),
         new SettingToOptionMapping<bool, bool>(x => ActiveSettings.Cleaning_RemoveMultipleConsecutiveBlankLines, x => RemoveMultipleConsecutiveBlankLines),
         new SettingToOptionMapping<int, NoneEmptyAll>(x => ActiveSettings.Cleaning_RemoveRegions, x => RemoveRegions)
     };
 }
コード例 #39
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CleaningRemoveViewModel" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <param name="activeSettings">The active settings.</param>
 public CleaningRemoveViewModel(CodeMaidPackage package, Settings activeSettings)
     : base(package, activeSettings)
 {
     Mappings = new SettingsToOptionsList(ActiveSettings, this)
     {
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesAfterAttributes, x => RemoveBlankLinesAfterAttributes),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesAfterOpeningBrace, x => RemoveBlankLinesAfterOpeningBraces),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesAtBottom, x => RemoveBlankLinesAtBottom),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesAtTop, x => RemoveBlankLinesAtTop),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesBeforeClosingBrace, x => RemoveBlankLinesBeforeClosingBraces),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesBeforeClosingTags, x => RemoveBlankLinesBeforeClosingTags),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankLinesBetweenChainedStatements, x => RemoveBlankLinesBetweenChainedStatements),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RemoveBlankSpacesBeforeClosingAngleBrackets, x => RemoveBlankSpacesBeforeClosingAngleBrackets),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RemoveEndOfFileTrailingNewLine, x => RemoveEndOfFileTrailingNewLine),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RemoveEndOfLineWhitespace, x => RemoveEndOfLineWhitespace),
         new SettingToOptionMapping <bool, bool>(x => ActiveSettings.Cleaning_RemoveMultipleConsecutiveBlankLines, x => RemoveMultipleConsecutiveBlankLines),
         new SettingToOptionMapping <int, NoneEmptyAll>(x => ActiveSettings.Cleaning_RemoveRegions, x => RemoveRegions)
     };
 }