當前位置: 首頁>>代碼示例>>C#>>正文


C# CodeMaidPackage類代碼示例

本文整理匯總了C#中CodeMaidPackage的典型用法代碼示例。如果您正苦於以下問題:C# CodeMaidPackage類的具體用法?C# CodeMaidPackage怎麽用?C# CodeMaidPackage使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CodeMaidPackage類屬於命名空間,在下文中一共展示了CodeMaidPackage類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: CommentFormatCommand

 /// <summary>
 /// Initializes a new instance of the <see cref="CommentFormatCommand" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 internal CommentFormatCommand(CodeMaidPackage package)
     : base(package,
            new CommandID(PackageGuids.GuidCodeMaidCommandCommentFormat, PackageIds.CmdIDCodeMaidCommentFormat))
 {
     _undoTransactionHelper = new UndoTransactionHelper(package, "CodeMaid Format Comment");
     _commentFormatLogic = CommentFormatLogic.GetInstance(package);
 }
開發者ID:reima,項目名稱:codemaid,代碼行數:11,代碼來源:CommentFormatCommand.cs

示例2: RemoveRegionCommand

 /// <summary>
 /// Initializes a new instance of the <see cref="RemoveRegionCommand" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 internal RemoveRegionCommand(CodeMaidPackage package)
     : base(package,
            new CommandID(GuidList.GuidCodeMaidCommandRemoveRegion, (int)PkgCmdIDList.CmdIDCodeMaidRemoveRegion))
 {
     _codeModelHelper = CodeModelHelper.GetInstance(package);
     _removeRegionLogic = RemoveRegionLogic.GetInstance(package);
 }
開發者ID:Mediomondo,項目名稱:codemaid,代碼行數:11,代碼來源:RemoveRegionCommand.cs

示例3: CleaningUpdateViewModel

 /// <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)
     };
 }
開發者ID:reima,項目名稱:codemaid,代碼行數:31,代碼來源:CleaningUpdateViewModel.cs

示例4: CodeModelManager

        /// <summary>
        /// Initializes a new instance of the <see cref="CodeModelManager" /> class.
        /// </summary>
        /// <param name="package">The hosting package.</param>
        private CodeModelManager(CodeMaidPackage package)
        {
            _package = package;

            _codeModelBuilder = CodeModelBuilder.GetInstance(_package);
            _codeModelCache = new CodeModelCache();
        }
開發者ID:reima,項目名稱:codemaid,代碼行數:11,代碼來源:CodeModelManager.cs

示例5: CleanupActiveCodeCommand

 /// <summary>
 /// Initializes a new instance of the <see cref="CleanupActiveCodeCommand" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 internal CleanupActiveCodeCommand(CodeMaidPackage package)
     : base(package,
            new CommandID(PackageGuids.GuidCodeMaidCommandCleanupActiveCode, PackageIds.CmdIDCodeMaidCleanupActiveCode))
 {
     CodeCleanupAvailabilityLogic = CodeCleanupAvailabilityLogic.GetInstance(Package);
     CodeCleanupManager = CodeCleanupManager.GetInstance(Package);
 }
開發者ID:reima,項目名稱:codemaid,代碼行數:11,代碼來源:CleanupActiveCodeCommand.cs

示例6: WindowEventListener

 /// <summary>
 /// Initializes a new instance of the <see cref="WindowEventListener" /> class.
 /// </summary>
 /// <param name="package">The package hosting the event listener.</param>
 internal WindowEventListener(CodeMaidPackage package)
     : base(package)
 {
     // Store access to the window events, otherwise events will not register properly via DTE.
     WindowEvents = Package.IDE.Events.get_WindowEvents(null);
     WindowEvents.WindowActivated += WindowEvents_WindowActivated;
 }
開發者ID:reima,項目名稱:codemaid,代碼行數:11,代碼來源:WindowEventListener.cs

示例7: RemoveRegionCommand

 /// <summary>
 /// Initializes a new instance of the <see cref="RemoveRegionCommand" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 internal RemoveRegionCommand(CodeMaidPackage package)
     : base(package,
            new CommandID(PackageGuids.GuidCodeMaidCommandRemoveRegion, PackageIds.CmdIDCodeMaidRemoveRegion))
 {
     _codeModelHelper = CodeModelHelper.GetInstance(package);
     _removeRegionLogic = RemoveRegionLogic.GetInstance(package);
 }
開發者ID:reima,項目名稱:codemaid,代碼行數:11,代碼來源:RemoveRegionCommand.cs

示例8: DocumentEventListener

 /// <summary>
 /// Initializes a new instance of the <see cref="DocumentEventListener" /> class.
 /// </summary>
 /// <param name="package">The package hosting the event listener.</param>
 internal DocumentEventListener(CodeMaidPackage package)
     : base(package)
 {
     // Store access to the document events, otherwise events will not register properly via DTE.
     DocumentEvents = Package.IDE.Events.DocumentEvents;
     DocumentEvents.DocumentClosing += DocumentEvents_DocumentClosing;
 }
開發者ID:agamat,項目名稱:codemaid,代碼行數:11,代碼來源:DocumentEventListener.cs

示例9: BaseCommand

        /// <summary>
        /// Initializes a new instance of the <see cref="BaseCommand" /> class.
        /// </summary>
        /// <param name="package">The hosting package.</param>
        /// <param name="id">The id for the command.</param>
        protected BaseCommand(CodeMaidPackage package, CommandID id)
            : base(BaseCommand_Execute, id)
        {
            Package = package;

            BeforeQueryStatus += BaseCommand_BeforeQueryStatus;
        }
開發者ID:adontz,項目名稱:codemaid,代碼行數:12,代碼來源:BaseCommand.cs

示例10: CommentFormatCommand

 /// <summary>
 /// Initializes a new instance of the <see cref="CommentFormatCommand" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 internal CommentFormatCommand(CodeMaidPackage package)
     : base(package,
            new CommandID(GuidList.GuidCodeMaidCommandCommentFormat, (int)PkgCmdIDList.CmdIDCodeMaidCommentFormat))
 {
     _undoTransactionHelper = new UndoTransactionHelper(package, "Format Comment");
     _commentFormatLogic = CommentFormatLogic.GetInstance(package);
 }
開發者ID:stevenha,項目名稱:codemaid,代碼行數:11,代碼來源:CommentFormatCommand.cs

示例11: CleanupOpenCodeCommand

 /// <summary>
 /// Initializes a new instance of the <see cref="CleanupOpenCodeCommand" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 internal CleanupOpenCodeCommand(CodeMaidPackage package)
     : base(package,
            new CommandID(GuidList.GuidCodeMaidCommandCleanupOpenCode, (int)PkgCmdIDList.CmdIDCodeMaidCleanupOpenCode))
 {
     CodeCleanupAvailabilityLogic = CodeCleanupAvailabilityLogic.GetInstance(Package);
     CodeCleanupManager = CodeCleanupManager.GetInstance(Package);
 }
開發者ID:adontz,項目名稱:codemaid,代碼行數:11,代碼來源:CleanupOpenCodeCommand.cs

示例12: SpadeContextInsertRegionCommand

 /// <summary>
 /// Initializes a new instance of the <see cref="SpadeContextInsertRegionCommand" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 internal SpadeContextInsertRegionCommand(CodeMaidPackage package)
     : base(package,
            new CommandID(GuidList.GuidCodeMaidCommandSpadeContextInsertRegion, (int)PkgCmdIDList.CmdIDCodeMaidSpadeContextInsertRegion))
 {
     _generateRegionLogic = GenerateRegionLogic.GetInstance(package);
     _undoTransactionHelper = new UndoTransactionHelper(package, "CodeMaid Insert Region");
 }
開發者ID:adontz,項目名稱:codemaid,代碼行數:11,代碼來源:SpadeContextInsertRegionCommand.cs

示例13: FormattingViewModel

        /// <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();
        }
開發者ID:AmakJ,項目名稱:codemaid,代碼行數:30,代碼來源:FormattingViewModel.cs

示例14: CleaningFileTypesViewModel

 /// <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)
     };
 }
開發者ID:reima,項目名稱:codemaid,代碼行數:31,代碼來源:CleaningFileTypesViewModel.cs

示例15: TextEditorEventListener

 /// <summary>
 /// Initializes a new instance of the <see cref="TextEditorEventListener" /> class.
 /// </summary>
 /// <param name="package">The package hosting the event listener.</param>
 internal TextEditorEventListener(CodeMaidPackage package)
     : base(package)
 {
     // Store access to the text editor events, otherwise events will not register properly
     // via DTE.
     TextEditorEvents = Package.IDE.Events.TextEditorEvents;
     TextEditorEvents.LineChanged += TextEditorEvents_LineChanged;
 }
開發者ID:agamat,項目名稱:codemaid,代碼行數:12,代碼來源:TextEditorEventListener.cs


注:本文中的CodeMaidPackage類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。