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

            _codeModelManager = CodeModelManager.GetInstance(_package);
            _codeReorderManager = CodeReorderManager.GetInstance(_package);
            _undoTransactionHelper = new UndoTransactionHelper(_package, "CodeMaid Cleanup");

            _codeCleanupAvailabilityLogic = CodeCleanupAvailabilityLogic.GetInstance(_package);
            _commentFormatLogic = CommentFormatLogic.GetInstance(_package);
            _insertBlankLinePaddingLogic = InsertBlankLinePaddingLogic.GetInstance(_package);
            _insertExplicitAccessModifierLogic = InsertExplicitAccessModifierLogic.GetInstance();
            _insertWhitespaceLogic = InsertWhitespaceLogic.GetInstance(_package);
            _removeRegionLogic = RemoveRegionLogic.GetInstance(_package);
            _removeWhitespaceLogic = RemoveWhitespaceLogic.GetInstance(_package);
            _updateLogic = UpdateLogic.GetInstance(_package);
            _usingStatementCleanupLogic = UsingStatementCleanupLogic.GetInstance(_package);
        }
Example #2
0
 /// <summary>
 /// Gets an instance of the <see cref="CodeReorderManager" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <returns>An instance of the <see cref="CodeReorderManager" /> class.</returns>
 internal static CodeReorderManager GetInstance(CodeMaidPackage package)
 {
     return(_instance ?? (_instance = new CodeReorderManager(package)));
 }
 public static void ClassInitialize(TestContext testContext)
 {
     _codeReorderManager = CodeReorderManager.GetInstance(TestEnvironment.Package);
     Assert.IsNotNull(_codeReorderManager);
 }
 /// <summary>
 /// Gets an instance of the <see cref="CodeReorderManager" /> class.
 /// </summary>
 /// <param name="package">The hosting package.</param>
 /// <returns>An instance of the <see cref="CodeReorderManager" /> class.</returns>
 internal static CodeReorderManager GetInstance(CodeMaidPackage package)
 {
     return _instance ?? (_instance = new CodeReorderManager(package));
 }