3 types derived from OptionSet
Microsoft.CodeAnalysis.Workspaces (3)
Options\DocumentOptionSet.cs (1)
19
public sealed class DocumentOptionSet :
OptionSet
Options\EmptyOptionSet.cs (1)
11
private sealed class EmptyOptionSet :
OptionSet
Options\SolutionOptionSet.cs (1)
17
internal sealed class SolutionOptionSet :
OptionSet
97 references to OptionSet
dotnet-format (11)
Analyzers\Extensions.cs (2)
80
OptionSet
options,
129
OptionSet
options,
Formatters\CharsetFormatter.cs (1)
25
OptionSet
optionSet,
Formatters\DocumentFormatter.cs (2)
51
OptionSet
optionSet,
104
OptionSet
optionSet,
Formatters\EndOfLineFormatter.cs (1)
22
OptionSet
optionSet,
Formatters\FinalNewlineFormatter.cs (1)
21
OptionSet
optionSet,
Formatters\OrganizeImportsFormatter.cs (1)
26
OptionSet
optionSet,
Formatters\WhitespaceFormatter.cs (3)
25
OptionSet
optionSet,
44
private static async Task<SourceText> GetFormattedDocument(Document document,
OptionSet
optionSet, CancellationToken cancellationToken)
53
private static async Task<SourceText> GetFormattedDocumentWithDetailedChanges(Document document, SourceText sourceText,
OptionSet
optionSet, CancellationToken cancellationToken)
Microsoft.AspNetCore.App.Analyzers (2)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
51
public override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger,
OptionSet
options)
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (1)
45
public override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger,
OptionSet
options)
Microsoft.CodeAnalysis.Features (24)
Completion\CommonCompletionProvider.cs (3)
26
/// Language used to retrieve <see cref="CompletionOptions"/> from <see cref="
OptionSet
"/>.
34
public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger,
OptionSet
options)
42
internal override bool ShouldTriggerCompletion(LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options,
OptionSet
passThroughOptions)
Completion\CompletionContext.cs (5)
56
/// be overwritten during <see cref="CompletionService.GetCompletionsAsync(Document, int, CompletionTrigger, ImmutableHashSet{string},
OptionSet
, CancellationToken)"/>.
104
public
OptionSet
Options { get; }
115
OptionSet
? options,
128
Options = options ??
OptionSet
.Empty;
156
Options =
OptionSet
.Empty;
Completion\CompletionProvider.cs (2)
36
public virtual bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger,
OptionSet
options)
47
internal virtual bool ShouldTriggerCompletion(LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options,
OptionSet
passThroughOptions)
Completion\CompletionService.cs (4)
99
OptionSet
? options = null)
107
var
passThroughOptions = options ?? document?.Project.Solution.Options ??
OptionSet
.Empty;
138
OptionSet
passThroughOptions,
Completion\CompletionService_GetCompletions.cs (3)
42
OptionSet
? options = null,
48
var
passThroughOptions = options ?? document.Project.Solution.Options;
65
OptionSet
passThroughOptions,
Completion\Providers\AbstractAggregateEmbeddedLanguageCompletionProvider.cs (1)
71
internal sealed override bool ShouldTriggerCompletion(LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options,
OptionSet
passThroughOptions)
Completion\Providers\Scripting\AbstractDirectivePathCompletionProvider.cs (1)
66
public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger,
OptionSet
options)
ExternalAccess\VSTypeScript\Api\VSTypeScriptCompletionProvider.cs (2)
15
public sealed override bool ShouldTriggerCompletion(SourceText text, int caretPosition, CompletionTrigger trigger,
OptionSet
options)
21
internal sealed override bool ShouldTriggerCompletion(LanguageServices languageServices, SourceText text, int caretPosition, CompletionTrigger trigger, CompletionOptions options,
OptionSet
passThroughOptions)
ExternalAccess\VSTypeScript\Api\VSTypeScriptDocumentNavigationServiceWrapper.cs (2)
25
public bool TryNavigateToPosition(Workspace workspace, DocumentId documentId, int position, int virtualSpace = 0,
OptionSet
? options = null)
29
public bool TryNavigateToPosition(Workspace workspace, DocumentId documentId, int position, int virtualSpace,
OptionSet
? options, CancellationToken cancellationToken)
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
128
var
passThroughOptions = document.Project.Solution.Options;
Microsoft.CodeAnalysis.Workspaces (59)
Editing\ImportAdder.cs (5)
33
public static async Task<Document> AddImportsAsync(Document document,
OptionSet
? options = null, CancellationToken cancellationToken = default)
39
public static Task<Document> AddImportsAsync(Document document, TextSpan span,
OptionSet
? options = null, CancellationToken cancellationToken = default)
45
public static async Task<Document> AddImportsAsync(Document document, SyntaxAnnotation annotation,
OptionSet
? options = null, CancellationToken cancellationToken = default)
51
public static Task<Document> AddImportsAsync(Document document, IEnumerable<TextSpan> spans,
OptionSet
? options = null, CancellationToken cancellationToken = default)
54
private static async Task<Document> AddImportsFromSyntaxesAsync(Document document, IEnumerable<TextSpan> spans,
OptionSet
? _, CancellationToken cancellationToken)
Formatting\Formatter.cs (18)
47
public static Task<Document> FormatAsync(Document document,
OptionSet
? options = null, CancellationToken cancellationToken = default)
63
public static Task<Document> FormatAsync(Document document, TextSpan span,
OptionSet
? options = null, CancellationToken cancellationToken = default)
79
public static async Task<Document> FormatAsync(Document document, IEnumerable<TextSpan>? spans,
OptionSet
? options = null, CancellationToken cancellationToken = default)
107
public static Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation,
OptionSet
? options = null, CancellationToken cancellationToken = default)
122
internal static async Task<Document> FormatAsync(Document document, SyntaxAnnotation annotation,
OptionSet
? optionSet, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken)
153
public static SyntaxNode Format(SyntaxNode node, SyntaxAnnotation annotation, Workspace workspace,
OptionSet
? options = null, CancellationToken cancellationToken = default)
159
private static SyntaxNode Format(SyntaxNode node, SyntaxAnnotation annotation, Workspace workspace,
OptionSet
? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken)
190
public static SyntaxNode Format(SyntaxNode node, Workspace workspace,
OptionSet
? options = null, CancellationToken cancellationToken = default)
205
public static SyntaxNode Format(SyntaxNode node, TextSpan span, Workspace workspace,
OptionSet
? options = null, CancellationToken cancellationToken = default)
220
public static SyntaxNode Format(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace,
OptionSet
? options = null, CancellationToken cancellationToken = default)
223
private static SyntaxNode Format(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace,
OptionSet
? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken)
232
private static IFormattingResult? GetFormattingResult(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace,
OptionSet
? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken)
267
public static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, Workspace workspace,
OptionSet
? options = null, CancellationToken cancellationToken = default)
282
public static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, TextSpan span, Workspace workspace,
OptionSet
? options = null, CancellationToken cancellationToken = default)
297
public static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace,
OptionSet
? options = null, CancellationToken cancellationToken = default)
303
private static IList<TextChange> GetFormattedTextChanges(SyntaxNode node, IEnumerable<TextSpan>? spans, Workspace workspace,
OptionSet
? options, ImmutableArray<AbstractFormattingRule> rules, CancellationToken cancellationToken)
317
internal static SyntaxFormattingOptions GetFormattingOptions(Workspace workspace,
OptionSet
? optionSet, string language)
324
internal 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
21
private readonly
OptionSet
_underlyingOptions;
29
internal DocumentOptionSet(StructuredAnalyzerConfigOptions? configOptions,
OptionSet
underlyingOptions, string language)
34
private DocumentOptionSet(StructuredAnalyzerConfigOptions? configOptions,
OptionSet
underlyingOptions, string language, ImmutableDictionary<OptionKey, object?> values)
93
internal override
OptionSet
WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
Options\EmptyOptionSet.cs (1)
16
internal override
OptionSet
WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
Options\LegacyWorkspaceOptionService.cs (1)
56
Debug.Assert(internallyDefinedOptions.All(entry =>
OptionSet
.IsInternalOptionValue(entry.Value)));
Options\OptionSet.cs (8)
12
internal static readonly
OptionSet
Empty = new EmptyOptionSet();
49
/// Creates a new <see cref="
OptionSet
" /> that contains the changed value.
51
public
OptionSet
WithChangedOption<T>(Option<T> option, T value)
61
/// Creates a new <see cref="
OptionSet
" /> that contains the changed value.
63
public
OptionSet
WithChangedOption<T>(PerLanguageOption<T> option, string? language, T value)
68
/// Creates a new <see cref="
OptionSet
" /> that contains the changed value.
70
public virtual
OptionSet
WithChangedOption(OptionKey optionAndLanguage, object? value)
82
internal virtual
OptionSet
WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
Options\SolutionOptionSet.cs (1)
61
internal override
OptionSet
WithChangedOptionInternal(OptionKey optionKey, object? internalValue)
Recommendations\Recommender.cs (4)
23
OptionSet
? options = null,
39
OptionSet
? options = null,
48
OptionSet
? options = null,
58
private static RecommendationServiceOptions GetOptions(
OptionSet
? options, Project project)
Rename\Renamer.cs (4)
24
private static SymbolRenameOptions GetSymbolRenameOptions(
OptionSet
optionSet)
32
private static DocumentRenameOptions GetDocumentRenameOptions(
OptionSet
optionSet)
38
public static Task<Solution> RenameSymbolAsync(Solution solution, ISymbol symbol, string newName,
OptionSet
? optionSet, CancellationToken cancellationToken = default)
72
OptionSet
? optionSet = null,
Shared\Extensions\DocumentExtensions.cs (1)
24
internal static Document WithSolutionOptions(this Document document,
OptionSet
options)
Shared\Extensions\ProjectExtensions.cs (1)
16
internal static Project WithSolutionOptions(this Project project,
OptionSet
options)
Simplification\Simplifier.cs (5)
152
public static async Task<Document> ReduceAsync(Document document,
OptionSet
? optionSet = null, CancellationToken cancellationToken = default)
175
public static async Task<Document> ReduceAsync(Document document, SyntaxAnnotation annotation,
OptionSet
? optionSet = null, CancellationToken cancellationToken = default)
203
public static Task<Document> ReduceAsync(Document document, TextSpan span,
OptionSet
? optionSet = null, CancellationToken cancellationToken = default)
222
public static async Task<Document> ReduceAsync(Document document, IEnumerable<TextSpan> spans,
OptionSet
? optionSet = null, CancellationToken cancellationToken = default)
255
internal static async Task<SimplifierOptions> GetOptionsAsync(Document document,
OptionSet
? optionSet, CancellationToken cancellationToken)
Workspace\Solution\Document.cs (1)
600
private void InitializeCachedOptions(
OptionSet
solutionOptions)
Workspace\Solution\Solution.cs (2)
1733
public
OptionSet
Options => this.SolutionState.Options;
1751
public Solution WithOptions(
OptionSet
options)
Workspace\Workspace.cs (1)
532
public
OptionSet
Options
Microsoft.ML.InternalCodeAnalyzer (1)
NameFixProvider.cs (1)
113
var
optionSet = originalSolution.Workspace.Options;