4 types derived from OptionSet
Microsoft.CodeAnalysis.Workspaces (3)
Options\DocumentOptionSet.cs (1)
19public sealed class DocumentOptionSet : OptionSet
Options\EmptyOptionSet.cs (1)
11private sealed class EmptyOptionSet : OptionSet
Options\SolutionOptionSet.cs (1)
17internal sealed class SolutionOptionSet : OptionSet
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Fakes\TestOptionSet.cs (1)
12internal class TestOptionSet : OptionSet
143 references to OptionSet
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
51public override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options)
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
45public override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (7)
Completion\CompletionProviders\LoadDirectiveCompletionProviderTests.cs (1)
87Assert.Equal(expectedResult, provider.ShouldTriggerCompletion(languageServices.LanguageServices, SourceText.From(text), position, trigger: default, CompletionOptions.Default, OptionSet.Empty));
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (1)
128Assert.Equal(expectedResult, provider.ShouldTriggerCompletion(languageServices.LanguageServices, SourceText.From(text), position, trigger: default, CompletionOptions.Default, OptionSet.Empty));
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (1)
380var completions = await service.GetCompletionsAsync(document, position, options, OptionSet.Empty);
Completion\CompletionServiceTests.cs (3)
80public override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options) 177var completionList = await completionService.GetCompletionsAsync(document, position.Value, options, OptionSet.Empty); 226var completionList = await completionService.GetCompletionsAsync(document, position.Value, options, OptionSet.Empty);
Workspaces\WorkspaceTests_EditorFeatures.cs (1)
1470var newOptions = solution.Options.WithChangedOption(optionKey, changedValue);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Completion\CompletionServiceTests.cs (3)
48var completions = await completionService.GetCompletionsAsync(document, caretPosition, CompletionOptions.Default, OptionSet.Empty); 57completions = await completionService.GetCompletionsAsync(document, caretPosition, CompletionOptions.Default, OptionSet.Empty); 101public override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (14)
IntelliSense\CompletionServiceTests.vb (4)
40document, caretPosition:=0, CompletionOptions.Default, OptionSet.Empty, CompletionTrigger.Invoke) 77Public Overrides Function ShouldTriggerCompletion(text As SourceText, position As Int32, trigger As CompletionTrigger, options As OptionSet) As [Boolean] 105document, caretPosition:=0, CompletionOptions.Default, OptionSet.Empty, CompletionTrigger.Invoke, 128Friend Overrides Function ShouldTriggerCompletion(languageServices As CodeAnalysis.Host.LanguageServices, text As SourceText, caretPosition As Integer, trigger As CompletionTrigger, options As CompletionOptions, passThroughOptions As OptionSet) As Boolean
IntelliSense\CompletionServiceTests_Exclusivitiy.vb (2)
45document, caretPosition:=0, CompletionOptions.Default, OptionSet.Empty, CompletionTrigger.Invoke) 85Public Overrides Function ShouldTriggerCompletion(text As SourceText, position As Int32, trigger As CompletionTrigger, options As OptionSet) As [Boolean]
IntelliSense\CSharpCompletionCommandHandlerTests.vb (5)
8225Public Overrides Function ShouldTriggerCompletion(text As SourceText, caretPosition As Integer, trigger As CompletionTrigger, options As OptionSet) As Boolean 8270Public Overrides Function ShouldTriggerCompletion(text As SourceText, caretPosition As Integer, trigger As CompletionTrigger, options As OptionSet) As Boolean 9612Public Overrides Function ShouldTriggerCompletion(text As SourceText, caretPosition As Integer, trigger As CompletionTrigger, options As OptionSet) As Boolean 10775Public Overrides Function ShouldTriggerCompletion(text As SourceText, caretPosition As Integer, trigger As CompletionTrigger, options As OptionSet) As Boolean 11624document, caretPosition:=cursorPosition, CompletionOptions.Default, OptionSet.Empty, CompletionTrigger.Invoke)
IntelliSense\CSharpCompletionCommandHandlerTests_DefaultsSource.vb (3)
440Public Overrides Function ShouldTriggerCompletion(text As SourceText, caretPosition As Integer, trigger As CompletionTrigger, options As OptionSet) As Boolean 665passThroughOptions As OptionSet, 692passThroughOptions As OptionSet,
Microsoft.CodeAnalysis.ExternalAccess.FSharp (4)
Completion\FSharpCompletionProviderBase.cs (2)
14public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options) 17internal sealed override bool ShouldTriggerCompletion(Host.LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passthroughOptions)
Editor\IFSharpEditorInlineRenameService.cs (2)
57Task<IFSharpInlineRenameReplacementInfo> GetReplacementsAsync(string replacementText, OptionSet optionSet, CancellationToken cancellationToken); 129Task<IFSharpInlineRenameLocationSet> FindRenameLocationsAsync(OptionSet optionSet, CancellationToken cancellationToken);
Microsoft.CodeAnalysis.Features (23)
Completion\CommonCompletionProvider.cs (3)
26/// Language used to retrieve <see cref="CompletionOptions"/> from <see cref="OptionSet"/>. 34public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options) 42internal override bool ShouldTriggerCompletion(LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions)
Completion\CompletionContext.cs (5)
59/// be overwritten during <see cref="CompletionService.GetCompletionsAsync(Document, int, CompletionTrigger, ImmutableHashSet{string}, OptionSet, CancellationToken)"/>. 107public OptionSet Options { get; } 118OptionSet? options, 131Options = options ?? OptionSet.Empty; 159Options = OptionSet.Empty;
Completion\CompletionProvider.cs (2)
36public virtual bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options) 47internal virtual bool ShouldTriggerCompletion(LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions)
Completion\CompletionService.cs (3)
99OptionSet? options = null) 107var passThroughOptions = options ?? document?.Project.Solution.Options ?? OptionSet.Empty; 138OptionSet passThroughOptions,
Completion\CompletionService_GetCompletions.cs (3)
42OptionSet? options = null, 48var passThroughOptions = options ?? document.Project.Solution.Options; 66OptionSet passThroughOptions,
Completion\Providers\AbstractAggregateEmbeddedLanguageCompletionProvider.cs (1)
73internal sealed override bool ShouldTriggerCompletion(LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions)
Completion\Providers\Scripting\AbstractDirectivePathCompletionProvider.cs (1)
66public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options)
ExternalAccess\VSTypeScript\Api\VSTypeScriptCompletionProvider.cs (2)
15public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger, OptionSet options) 21internal sealed override bool ShouldTriggerCompletion(LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options, OptionSet passThroughOptions)
ExternalAccess\VSTypeScript\Api\VSTypeScriptDocumentNavigationServiceWrapper.cs (2)
25public bool TryNavigateToPosition(Workspace workspace, DocumentId documentId, int position, int virtualSpace = 0, OptionSet? options = null) 29public bool TryNavigateToPosition(Workspace workspace, DocumentId documentId, int position, int virtualSpace, OptionSet? options, CancellationToken cancellationToken)
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
128var passThroughOptions = document.Project.Solution.Options;
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (6)
Completion\CompletionFeaturesTests.cs (4)
584CodeAnalysis.Completion.CompletionOptions options, OptionSet passThroughOptions, ImmutableHashSet<string> roles = null) 594Document document, int caretPosition, CodeAnalysis.Completion.CompletionOptions options, OptionSet passThroughOptions, 877CodeAnalysis.Completion.CompletionOptions options, OptionSet passThroughOptions, ImmutableHashSet<string> roles = null) 887Document document, int caretPosition, CodeAnalysis.Completion.CompletionOptions options, OptionSet passThroughOptions,
Completion\CompletionResolveTests.cs (2)
492OptionSet passThroughOptions, 511internal override bool ShouldTriggerCompletion(Project project, LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CodeAnalysis.Completion.CompletionOptions options, OptionSet passthroughOptions, ImmutableHashSet<string> roles = null)
Microsoft.CodeAnalysis.Workspaces (58)
Editing\ImportAdder.cs (5)
34public static async Task<Document> AddImportsAsync(Document document, OptionSet? options = null, CancellationToken cancellationToken = default) 40public static Task<Document> AddImportsAsync(Document document, TextSpan span, OptionSet? options = null, CancellationToken cancellationToken = default) 46public static async Task<Document> AddImportsAsync(Document document, SyntaxAnnotation annotation, OptionSet? options = null, CancellationToken cancellationToken = default) 52public static Task<Document> AddImportsAsync(Document document, IEnumerable<TextSpan> spans, OptionSet? options = null, CancellationToken cancellationToken = default) 55private static async Task<Document> AddImportsFromSyntaxesAsync(Document document, IEnumerable<TextSpan> spans, OptionSet? _, CancellationToken cancellationToken)
Formatting\Formatter.cs (18)
47public static Task<Document> FormatAsync(Document document, OptionSet? options = null, CancellationToken cancellationToken = default) 63public static Task<Document> FormatAsync(Document document, TextSpan span, OptionSet? options = null, CancellationToken cancellationToken = default) 79public static async Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans, OptionSet? options = null, CancellationToken cancellationToken = default) 107public static Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, OptionSet? options = null, CancellationToken cancellationToken = default) 120internal static async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation, OptionSet? optionSet, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 151public static SyntaxNode Format(SyntaxNode node, SyntaxAnnotation annotation, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 157private static SyntaxNode Format(SyntaxNode node, SyntaxAnnotation annotation, Workspace workspace, OptionSet? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 188public static SyntaxNode Format(SyntaxNode node, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 203public static SyntaxNode Format(SyntaxNode node, TextSpan span, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 218public static SyntaxNode Format(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 221private static SyntaxNode Format(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace, OptionSet? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 230private static IFormattingResult? GetFormattingResult(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace, OptionSet? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 268public static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 283public static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, TextSpan span, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 298public static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace, OptionSet? options = null, CancellationToken cancellationToken = default) 304private static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace, OptionSet? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken) 318internal static SyntaxFormattingOptions GetFormattingOptions(Workspace workspace, OptionSet? optionSet, string language) 325internal static async ValueTask<(SyntaxFormattingOptions? Syntax, LineFormattingOptions Line)> GetFormattingOptionsAsync(Document document, OptionSet? optionSet, CancellationToken cancellationToken)
Options\DocumentOptionSet.cs (6)
15/// An <see cref="OptionSet"/> that comes from <see cref="Document.GetOptionsAsync(System.Threading.CancellationToken)"/>. It behaves just like a normal 16/// <see cref="OptionSet"/> but remembers which language the <see cref="Document"/> is, so you don't have to 21private readonly OptionSet _underlyingOptions; 29internal DocumentOptionSet(StructuredAnalyzerConfigOptions? configOptions, OptionSet underlyingOptions, string language) 34private DocumentOptionSet(StructuredAnalyzerConfigOptions? configOptions, OptionSet underlyingOptions, string language, ImmutableDictionary<OptionKey, object?> values) 93internal override OptionSet WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
Options\EmptyOptionSet.cs (1)
16internal override OptionSet WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
Options\OptionSet.cs (8)
13internal static readonly OptionSet Empty = new EmptyOptionSet(); 50/// Creates a new <see cref="OptionSet" /> that contains the changed value. 52public OptionSet WithChangedOption<T>(Option<T> option, T value) 62/// Creates a new <see cref="OptionSet" /> that contains the changed value. 64public OptionSet WithChangedOption<T>(PerLanguageOption<T> option, string? language, T value) 69/// Creates a new <see cref="OptionSet" /> that contains the changed value. 71public virtual OptionSet WithChangedOption(OptionKey optionAndLanguage, object? value) 83internal virtual OptionSet WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
Options\SolutionOptionSet.cs (1)
61internal override OptionSet WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
Recommendations\Recommender.cs (4)
23OptionSet? options = null, 39OptionSet? options = null, 48OptionSet? options = null, 58private static RecommendationServiceOptions GetOptions(OptionSet? options, Project project)
Rename\Renamer.cs (4)
26private static SymbolRenameOptions GetSymbolRenameOptions(OptionSet optionSet) 34private static DocumentRenameOptions GetDocumentRenameOptions(OptionSet optionSet) 40public static Task<Solution> RenameSymbolAsync(Solution solution, ISymbol symbol, string newName, OptionSet? optionSet, CancellationToken cancellationToken = default) 74OptionSet? optionSet = null,
Shared\Extensions\DocumentExtensions.cs (1)
48internal static Document WithSolutionOptions(this Document document, OptionSet options)
Shared\Extensions\ProjectExtensions.cs (1)
16internal static Project WithSolutionOptions(this Project project, OptionSet options)
Simplification\Simplifier.cs (5)
152public static async Task<Document> ReduceAsync(Document document, OptionSet? optionSet = null, CancellationToken cancellationToken = default) 175public static async Task<Document> ReduceAsync(Document document, SyntaxAnnotation annotation, OptionSet? optionSet = null, CancellationToken cancellationToken = default) 203public static Task<Document> ReduceAsync(Document document, TextSpan span, OptionSet? optionSet = null, CancellationToken cancellationToken = default) 222public static async Task<Document> ReduceAsync(Document document, IEnumerable<TextSpan> spans, OptionSet? optionSet = null, CancellationToken cancellationToken = default) 255internal static async Task<SimplifierOptions> GetOptionsAsync(Document document, OptionSet? optionSet, CancellationToken cancellationToken)
Workspace\Solution\Document.cs (1)
545private void InitializeCachedOptions(OptionSet solutionOptions)
Workspace\Solution\Solution.cs (2)
1680public OptionSet Options => this.SolutionState.Options; 1698public Solution WithOptions(OptionSet options)
Workspace\Workspace.cs (1)
552public OptionSet Options
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (5)
Fakes\TestOptionSet.cs (1)
27internal override OptionSet WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
Options\OptionsTestHelpers.cs (3)
98public static OptionSet GetOptionSetWithChangedOptions(OptionSet options, IEnumerable<(IOption, object)> optionsWithNonDefaultValues) 100var updatedOptions = options;
OptionsCollection.cs (1)
85public OptionSet ToOptionSet()
Microsoft.CodeAnalysis.Workspaces.UnitTests (20)
Formatter\FormatterTests.cs (3)
72var solutionOptions = workspace.CurrentSolution.Options. 120var updatedOptions = OptionsTestHelpers.GetOptionSetWithChangedOptions(TestOptionSet.Empty, OptionsTestHelpers.PublicFormattingOptionsWithNonDefaultValues); 126var updatedSolutionOptions = OptionsTestHelpers.GetOptionSetWithChangedOptions(workspace.CurrentSolution.Options, OptionsTestHelpers.PublicFormattingOptionsWithNonDefaultValues);
Options\DocumentOptionSetTests.cs (4)
78var updatedSet = set.WithChangedOption(optionKey, newValue); 110var updatedSet = set.WithChangedOption(optionKey, newValue); 140var updatedSet = set.WithChangedOption(new OptionKey(CSharpFormattingOptions.NewLinesForBracesInProperties), true); 166var updatedSet = set.WithChangedOption(optionKey, newValue);
Simplifier\SimplifierTests.cs (4)
81var updatedOptions = GetOptionSetWithChangedPublicOptions(workspace.CurrentSolution.Options); 97static OptionSet GetOptionSetWithChangedPublicOptions(OptionSet options) 111var updatedOptions = options;
SolutionTests\SolutionTests.cs (2)
5393var options = s0.Options.WithChangedOption(option, LanguageNames.CSharp, changedValue); 5409void VerifyOptionSet(OptionSet optionSet)
WorkspaceServiceTests\GlobalOptionServiceTests.cs (6)
69var newSet = optionSet.WithChangedOption(optionKey, 2).WithChangedOption(perLanguageOptionKey, 3); 101var newSet = optionSet.WithChangedOption(perLanguageOptionKey, "EOLN"); 212OptionSet optionSet = new SolutionOptionSet(optionService); 248var newOptionSet = optionSet.WithChangedOption(optionKey, false); 264var newOptionSet = optionSet.WithChangedOption(optionKey, false); 306var newOptionSet = originalOptionSet.WithChangedOption(optionKey, newPublicValue);
WorkspaceTests\WorkspaceTests.cs (1)
192var newOptions = OptionsTestHelpers.GetOptionSetWithChangedOptions(solution.Options, OptionsTestHelpers.AllPublicOptionsWithNonDefaultValues);
Microsoft.ML.InternalCodeAnalyzer (1)
NameFixProvider.cs (1)
113var optionSet = originalSolution.Workspace.Options;