10 instantiations of SumType
Microsoft.CodeAnalysis.LanguageServer.Protocol (10)
Handler\Diagnostics\Public\PublicDocumentPullDiagnosticsHandler.cs (2)
43=> new(new RelatedFullDocumentDiagnosticReport 50=> new(new RelatedFullDocumentDiagnosticReport
Protocol\SumType.cs (8)
273public static implicit operator SumType<T1, T2, T3>(T1 val) => new SumType<T1, T2, T3>(val); 279public static implicit operator SumType<T1, T2, T3>?(T1? val) => val is null ? null : new SumType<T1, T2, T3>(val); 285public static implicit operator SumType<T1, T2, T3>(T2 val) => new SumType<T1, T2, T3>(val); 291public static implicit operator SumType<T1, T2, T3>?(T2? val) => val is null ? null : new SumType<T1, T2, T3>(val); 297public static implicit operator SumType<T1, T2, T3>(T3 val) => new SumType<T1, T2, T3>(val); 303public static implicit operator SumType<T1, T2, T3>?(T3? val) => val is null ? null : new SumType<T1, T2, T3>(val); 311(v) => new SumType<T1, T2, T3>(v), 312(v) => new SumType<T1, T2, T3>(v));
72 references to SumType
Microsoft.CodeAnalysis.LanguageServer.Protocol (69)
Handler\Diagnostics\Public\PublicDocumentPullDiagnosticsHandler.cs (6)
17using DocumentDiagnosticPartialReport = SumType<RelatedFullDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReportPartialResult>; 21internal sealed partial class PublicDocumentPullDiagnosticsHandler : AbstractDocumentPullDiagnosticHandler<DocumentDiagnosticParams, DocumentDiagnosticPartialReport, DocumentDiagnosticReport?> 42protected override DocumentDiagnosticPartialReport CreateReport(TextDocumentIdentifier identifier, Roslyn.LanguageServer.Protocol.Diagnostic[] diagnostics, string resultId) 49protected override DocumentDiagnosticPartialReport CreateRemovedReport(TextDocumentIdentifier identifier) 56protected override bool TryCreateUnchangedReport(TextDocumentIdentifier identifier, string resultId, out DocumentDiagnosticPartialReport report) 65protected override DocumentDiagnosticReport? CreateReturn(BufferedProgress<DocumentDiagnosticPartialReport> progress)
Protocol\Converters\FormattingOptionsConverter.cs (2)
48Dictionary<string, SumType<bool, int, string>>? otherOptions = null; 102SumType<bool, int, string> value = reader.TokenType switch
Protocol\DocumentDiagnosticParams.cs (2)
17internal class DocumentDiagnosticParams : ITextDocumentParams, IWorkDoneProgressParams, IPartialResultParams<SumType<RelatedFullDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReportPartialResult>> 26public IProgress<SumType<RelatedFullDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReportPartialResult>>? PartialResultToken
Protocol\FormattingOptions.cs (1)
63public Dictionary<string, SumType<bool, int, string>>? OtherOptions { get; set; }
Protocol\Internal\VSInternalCompletionList.cs (1)
35public SumType<VSInternalContinueCharacterSingle, VSInternalContinueCharacterRange, VSInternalContinueCharacterClass>[]? ContinueCharacters
Protocol\Methods.Document.cs (2)
326public static readonly LspRequest<InlineValueParams, SumType<InlineValueText, InlineValueVariableLookup, InlineValueEvaluatableExpression>[]?> TextDocumentInlineValue = new(TextDocumentInlineValueName); 600public static readonly LspRequest<PrepareRenameParams, SumType<RenameRange, DefaultBehaviorPrepareRename, Range>?> TextDocumentPrepareRename = new(TextDocumentPrepareRenameName);
Protocol\Methods.Navigation.cs (4)
31public static readonly LspRequest<DeclarationParams, SumType<Location, Location[], LocationLink[]>?> TextDocumentDeclaration = new(TextDocumentDeclarationName); 50public static readonly LspRequest<DefinitionParams, SumType<Location, Location[], LocationLink[]>?> TextDocumentDefinition = new(TextDocumentDefinitionName); 69public static readonly LspRequest<TypeDefinitionParams, SumType<Location, Location[], LocationLink[]>?> TextDocumentTypeDefinition = new(TextDocumentTypeDefinitionName); 88public static readonly LspRequest<ImplementationParams, SumType<Location, Location[], LocationLink[]>?> TextDocumentImplementation = new(TextDocumentImplementationName);
Protocol\ServerCapabilities.cs (10)
90public SumType<bool, DeclarationOptions, DeclarationRegistrationOptions>? DeclarationProvider { get; init; } 105public SumType<bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions>? TypeDefinitionProvider { get; set; } 113public SumType<bool, ImplementationOptions, ImplementationRegistrationOptions>? ImplementationProvider { get; set; } 165public SumType<bool, DocumentColorOptions, DocumentColorRegistrationOptions>? DocumentColorProvider { get; set; } 216public SumType<bool, SelectionRangeOptions, SelectionRangeRegistrationOptions>? SelectionRangeProvider { get; init; } 232public SumType<bool, CallHierarchyOptions, CallHierarchyRegistrationOptions>? CallHierarchyProvider { get; init; } 248public SumType<bool, MonikerOptions, MonikerRegistrationOptions>? MonikerProvider { get; init; } 256public SumType<bool, TypeHierarchyOptions, TypeHierarchyRegistrationOptions>? TypeHierarchyProvider { get; init; } 264public SumType<bool, InlineValueOptions, InlineValueRegistrationOptions>? InlineValueProvider { get; init; } 272public SumType<bool, InlayHintOptions, InlayHintRegistrationOptions>? InlayHintOptions { get; set; }
Protocol\SumType.cs (41)
212internal struct SumType<T1, T2, T3> : ISumType, IEquatable<SumType<T1, T2, T3>> 225/// Initializes a new instance of the <see cref="SumType{T1, T2, T3}"/> struct containing a <typeparamref name="T1"/>. 227/// <param name="val">The value to store in the <see cref="SumType{T1, T2, T3}"/>.</param> 234/// Initializes a new instance of the <see cref="SumType{T1, T2, T3}"/> struct containing a <typeparamref name="T2"/>. 236/// <param name="val">The value to store in the <see cref="SumType{T1, T2, T3}"/>.</param> 243/// Initializes a new instance of the <see cref="SumType{T1, T2, T3}"/> struct containing a <typeparamref name="T3"/>. 245/// <param name="val">The value to store in the <see cref="SumType{T1, T2, T3}"/>.</param> 270/// Implicitly wraps a value of type <typeparamref name="T1"/> with a <see cref="SumType{T1, T2, T3}"/>. 273public static implicit operator SumType<T1, T2, T3>(T1 val) => new SumType<T1, T2, T3>(val); 276/// Implicitly wraps a value of type <typeparamref name="T1?"/> with a <see cref="SumType{T1, T2, T3}"/>. 279public static implicit operator SumType<T1, T2, T3>?(T1? val) => val is null ? null : new SumType<T1, T2, T3>(val); 282/// Implicitly wraps a value of type <typeparamref name="T2"/> with a <see cref="SumType{T1, T2, T3}"/>. 285public static implicit operator SumType<T1, T2, T3>(T2 val) => new SumType<T1, T2, T3>(val); 288/// Implicitly wraps a value of type <typeparamref name="T2?"/> with a <see cref="SumType{T1, T2, T3}"/>. 291public static implicit operator SumType<T1, T2, T3>?(T2? val) => val is null ? null : new SumType<T1, T2, T3>(val); 294/// Implicitly wraps a value of type <typeparamref name="T3"/> with a <see cref="SumType{T1, T2, T3}"/>. 297public static implicit operator SumType<T1, T2, T3>(T3 val) => new SumType<T1, T2, T3>(val); 300/// Implicitly wraps a value of type <typeparamref name="T3?"/> with a <see cref="SumType{T1, T2, T3}"/>. 303public static implicit operator SumType<T1, T2, T3>?(T3? val) => val is null ? null : new SumType<T1, T2, T3>(val); 306/// Implicitly wraps an instance of <see cref="SumType{T1, T2}"/> with a <see cref="SumType{T1, T2, T3}"/>. 309public static implicit operator SumType<T1, T2, T3>(SumType<T1, T2> sum) 315/// Attempts to cast an instance of <see cref="SumType{T1, T2, T3}"/> into a <see cref="SumType{T1, T2}"/>. 318public static explicit operator SumType<T1, T2>(SumType<T1, T2, T3> sum) 334/// Attempts to cast an instance of <see cref="SumType{T1, T2, T3}"/> to an instance of <typeparamref name="T1"/>. 336/// <exception cref="InvalidCastException">Thrown if this instance of <see cref="SumType{T1, T2, T3}"/> does not contain an instance of <typeparamref name="T1"/>.</exception> 338public static explicit operator T1(SumType<T1, T2, T3> sum) => sum.Value is T1 tVal ? tVal : throw new InvalidCastException(); 343/// <exception cref="InvalidCastException">Thrown if this instance of <see cref="SumType{T1, T2, T3}"/> does not contain an instance of <typeparamref name="T2"/>.</exception> 345public static explicit operator T2(SumType<T1, T2, T3> sum) => sum.Value is T2 tVal ? tVal : throw new InvalidCastException(); 348/// Attempts to cast an instance of <see cref="SumType{T1, T2, T3}"/> to an instance of <typeparamref name="T3"/>. 350/// <exception cref="InvalidCastException">Thrown if this instance of <see cref="SumType{T1, T2, T3}"/> does not contain an instance of <typeparamref name="T3"/>.</exception> 352public static explicit operator T3(SumType<T1, T2, T3> sum) => sum.Value is T3 tVal ? tVal : throw new InvalidCastException(); 354public static bool operator ==(SumType<T1, T2, T3> left, SumType<T1, T2, T3> right) 359public static bool operator !=(SumType<T1, T2, T3> left, SumType<T1, T2, T3> right) 472return obj is SumType<T1, T2, T3> type && this.Equals(type); 476public bool Equals(SumType<T1, T2, T3> other) 627/// Implicitly wraps an instance of <see cref="SumType{T1, T2, T3}"/> with a <see cref="SumType{T1, T2, T3, T4}"/>. 630public static implicit operator SumType<T1, T2, T3, T4>(SumType<T1, T2, T3> sum) 656/// Attempts to cast an instance of <see cref="SumType{T1, T2, T3, T4}"/> into a <see cref="SumType{T1, T2, T3}"/>. 659public static explicit operator SumType<T1, T2, T3>(SumType<T1, T2, T3, T4> sum)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (3)
272BufferedProgress<DocumentDiagnosticPartialReport>? progress = useProgress ? BufferedProgress.Create<DocumentDiagnosticPartialReport>(null) : null; 303IProgress<DocumentDiagnosticPartialReport>? progress)