DocumentOptionSet 类

定义

一个 OptionSet ,它来自 GetOptionsAsync(CancellationToken)。 它的行为就像正常 OptionSet 一样,但会记住 是哪种语言 Document ,因此在调用 GetOption<T>(PerLanguageOption<T>)时不必冗余地传递该信息。

public ref class DocumentOptionSet sealed : Microsoft::CodeAnalysis::Options::OptionSet
public sealed class DocumentOptionSet : Microsoft.CodeAnalysis.Options.OptionSet
type DocumentOptionSet = class
    inherit OptionSet
Public NotInheritable Class DocumentOptionSet
Inherits OptionSet
继承
DocumentOptionSet

方法

GetOption(OptionKey)

一个 OptionSet ,它来自 GetOptionsAsync(CancellationToken)。 它的行为就像正常 OptionSet 一样,但会记住 是哪种语言 Document ,因此在调用 GetOption<T>(PerLanguageOption<T>)时不必冗余地传递该信息。

GetOption(OptionKey)

获取 选项的值,如果未进行其他设置,则获取默认值。

(继承自 OptionSet)
GetOption<T>(Option<T>)

获取 选项的值,如果未进行其他设置,则获取默认值。

(继承自 OptionSet)
GetOption<T>(OptionKey)

获取 选项的值,如果未进行其他设置,则获取默认值。

(继承自 OptionSet)
GetOption<T>(PerLanguageOption<T>)

一个 OptionSet ,它来自 GetOptionsAsync(CancellationToken)。 它的行为就像正常 OptionSet 一样,但会记住 是哪种语言 Document ,因此在调用 GetOption<T>(PerLanguageOption<T>)时不必冗余地传递该信息。

GetOption<T>(PerLanguageOption<T>, String)

获取 选项的值,如果未进行其他设置,则获取默认值。

(继承自 OptionSet)
WithChangedOption(OptionKey, Object)

一个 OptionSet ,它来自 GetOptionsAsync(CancellationToken)。 它的行为就像正常 OptionSet 一样,但会记住 是哪种语言 Document ,因此在调用 GetOption<T>(PerLanguageOption<T>)时不必冗余地传递该信息。

WithChangedOption(OptionKey, Object)

创建一个包含更改值的新 OptionSet

(继承自 OptionSet)
WithChangedOption<T>(Option<T>, T)

创建一个包含更改值的新 OptionSet

(继承自 OptionSet)
WithChangedOption<T>(PerLanguageOption<T>, String, T)

创建一个包含更改值的新 OptionSet

(继承自 OptionSet)
WithChangedOption<T>(PerLanguageOption<T>, T)

创建一个包含更改值的新 DocumentOptionSet

适用于