public SymbolInlineRenameInfo(
                IEnumerable <IRefactorNotifyService> refactorNotifyServices,
                Document document,
                TextSpan triggerSpan,
                string triggerText,
                ISymbol renameSymbol,
                bool forceRenameOverloads,
                ImmutableArray <DocumentSpan> definitionLocations,
                CodeCleanupOptionsProvider fallbackOptions,
                CancellationToken cancellationToken)
            {
                this.CanRename = true;

                _refactorNotifyServices = refactorNotifyServices;
                _document         = document;
                _fallbackOptions  = fallbackOptions;
                this.RenameSymbol = renameSymbol;

                this.HasOverloads        = RenameLocations.GetOverloadedSymbols(this.RenameSymbol).Any();
                this.MustRenameOverloads = forceRenameOverloads;

                _isRenamingAttributePrefix = CanRenameAttributePrefix(triggerText);
                this.TriggerSpan           = GetReferenceEditSpan(new InlineRenameLocation(document, triggerSpan), triggerText, cancellationToken);

                this.DefinitionLocations = definitionLocations;
            }
Beispiel #2
0
            public SymbolInlineRenameInfo(
                IEnumerable <IRefactorNotifyService> refactorNotifyServices,
                Document document,
                TextSpan triggerSpan,
                SymbolAndProjectId renameSymbolAndProjectId,
                bool forceRenameOverloads,
                CancellationToken cancellationToken)
            {
                this.CanRename = true;

                _refactorNotifyServices = refactorNotifyServices;
                _document = document;
                this.RenameSymbolAndProjectId = renameSymbolAndProjectId;

                this.HasOverloads         = RenameLocations.GetOverloadedSymbols(this.RenameSymbolAndProjectId).Any();
                this.ForceRenameOverloads = forceRenameOverloads;

                _isRenamingAttributePrefix = CanRenameAttributePrefix(document, triggerSpan, cancellationToken);
                this.TriggerSpan           = GetReferenceEditSpan(new InlineRenameLocation(document, triggerSpan), cancellationToken);

                _shortenedTriggerSpan = this.TriggerSpan != triggerSpan;
            }