コード例 #1
0
        internal EFRefactoringOperation(
            EFNormalizableItem objectToRename, string newName, EFRenameContributorInput contributorInput, IServiceProvider serviceProvider)
            : base(serviceProvider)
        {
            Debug.Assert(contributorInput != null, "contributorInput != null");

            _contributorInput = contributorInput;
            _newName = newName;
            _objectToRename = objectToRename;
        }
コード例 #2
0
        internal EFRefactoringOperation(
            EFNormalizableItem objectToRename, string newName, EFRenameContributorInput contributorInput, IServiceProvider serviceProvider)
            : base(serviceProvider)
        {
            Debug.Assert(contributorInput != null, "contributorInput != null");

            _contributorInput = contributorInput;
            _newName          = newName;
            _objectToRename   = objectToRename;
        }
コード例 #3
0
        private static void RefactorRenameElementInDesignerOnly(EFNormalizableItem namedObject, string newName, bool showPreview)
        {
            Debug.Assert(namedObject != null, "namedObject != null");
            Debug.Assert(newName != null, "namedObject != newName");

            var input = new EFRenameContributorInput(namedObject, newName, namedObject.Name.Value);
            var refactoringOperation = new EFRefactoringOperation(
                namedObject,
                newName,
                input,
                new ServiceProviderHelper(PackageManager.Package.GetService(typeof(IServiceProvider)) as IServiceProvider));

            refactoringOperation.HasPreviewWindow = showPreview;
            refactoringOperation.DoOperation();
        }
コード例 #4
0
        private static void RefactorRenameElementInDesignerOnly(EFNormalizableItem namedObject, string newName, bool showPreview)
        {
            Debug.Assert(namedObject != null, "namedObject != null");
            Debug.Assert(newName != null, "namedObject != newName");

            var input = new EFRenameContributorInput(namedObject, newName, namedObject.Name.Value);
            var refactoringOperation = new EFRefactoringOperation(
                namedObject,
                newName,
                input,
                new ServiceProviderHelper(PackageManager.Package.GetService(typeof(IServiceProvider)) as IServiceProvider));

            refactoringOperation.HasPreviewWindow = showPreview;
            refactoringOperation.DoOperation();
        }