public static WhitespaceSetting <TOption> Create <TOption>(Option2 <TOption> option, string description, AnalyzerConfigOptions editorConfigOptions, OptionSet visualStudioOptions, OptionUpdater updater, string fileName) where TOption : struct { var isDefinedInEditorConfig = editorConfigOptions.TryGetEditorConfigOption <TOption>(option, out _); var location = new SettingLocation(isDefinedInEditorConfig ? LocationKind.EditorConfig : LocationKind.VisualStudio, fileName); return(new WhitespaceSetting <TOption>(option, description, editorConfigOptions, visualStudioOptions, updater, location)); }
protected override CodeStyleOption2 <bool> GetOption() => _editorConfigOptions.TryGetEditorConfigOption(_option, out CodeStyleOption2 <bool>?value) && value is not null ? value