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)
273
public static implicit operator SumType<T1, T2, T3>(T1 val) => new
SumType
<T1, T2, T3>(val);
279
public static implicit operator SumType<T1, T2, T3>?(T1? val) => val is null ? null : new
SumType
<T1, T2, T3>(val);
285
public static implicit operator SumType<T1, T2, T3>(T2 val) => new
SumType
<T1, T2, T3>(val);
291
public static implicit operator SumType<T1, T2, T3>?(T2? val) => val is null ? null : new
SumType
<T1, T2, T3>(val);
297
public static implicit operator SumType<T1, T2, T3>(T3 val) => new
SumType
<T1, T2, T3>(val);
303
public 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)
17
using DocumentDiagnosticPartialReport =
SumType
<RelatedFullDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReportPartialResult>;
21
internal sealed partial class PublicDocumentPullDiagnosticsHandler : AbstractDocumentPullDiagnosticHandler<DocumentDiagnosticParams,
DocumentDiagnosticPartialReport
, DocumentDiagnosticReport?>
42
protected override
DocumentDiagnosticPartialReport
CreateReport(TextDocumentIdentifier identifier, Roslyn.LanguageServer.Protocol.Diagnostic[] diagnostics, string resultId)
49
protected override
DocumentDiagnosticPartialReport
CreateRemovedReport(TextDocumentIdentifier identifier)
56
protected override bool TryCreateUnchangedReport(TextDocumentIdentifier identifier, string resultId, out
DocumentDiagnosticPartialReport
report)
65
protected override DocumentDiagnosticReport? CreateReturn(BufferedProgress<
DocumentDiagnosticPartialReport
> progress)
Protocol\Converters\FormattingOptionsConverter.cs (2)
48
Dictionary<string,
SumType
<bool, int, string>>? otherOptions = null;
102
SumType
<bool, int, string> value = reader.TokenType switch
Protocol\DocumentDiagnosticParams.cs (2)
17
internal class DocumentDiagnosticParams : ITextDocumentParams, IWorkDoneProgressParams, IPartialResultParams<
SumType
<RelatedFullDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReportPartialResult>>
26
public IProgress<
SumType
<RelatedFullDocumentDiagnosticReport, RelatedUnchangedDocumentDiagnosticReport, DocumentDiagnosticReportPartialResult>>? PartialResultToken
Protocol\FormattingOptions.cs (1)
63
public Dictionary<string,
SumType
<bool, int, string>>? OtherOptions { get; set; }
Protocol\Internal\VSInternalCompletionList.cs (1)
35
public
SumType
<VSInternalContinueCharacterSingle, VSInternalContinueCharacterRange, VSInternalContinueCharacterClass>[]? ContinueCharacters
Protocol\Methods.Document.cs (2)
326
public static readonly LspRequest<InlineValueParams,
SumType
<InlineValueText, InlineValueVariableLookup, InlineValueEvaluatableExpression>[]?> TextDocumentInlineValue = new(TextDocumentInlineValueName);
600
public static readonly LspRequest<PrepareRenameParams,
SumType
<RenameRange, DefaultBehaviorPrepareRename, Range>?> TextDocumentPrepareRename = new(TextDocumentPrepareRenameName);
Protocol\Methods.Navigation.cs (4)
31
public static readonly LspRequest<DeclarationParams,
SumType
<Location, Location[], LocationLink[]>?> TextDocumentDeclaration = new(TextDocumentDeclarationName);
50
public static readonly LspRequest<DefinitionParams,
SumType
<Location, Location[], LocationLink[]>?> TextDocumentDefinition = new(TextDocumentDefinitionName);
69
public static readonly LspRequest<TypeDefinitionParams,
SumType
<Location, Location[], LocationLink[]>?> TextDocumentTypeDefinition = new(TextDocumentTypeDefinitionName);
88
public static readonly LspRequest<ImplementationParams,
SumType
<Location, Location[], LocationLink[]>?> TextDocumentImplementation = new(TextDocumentImplementationName);
Protocol\ServerCapabilities.cs (10)
90
public
SumType
<bool, DeclarationOptions, DeclarationRegistrationOptions>? DeclarationProvider { get; init; }
105
public
SumType
<bool, TypeDefinitionOptions, TypeDefinitionRegistrationOptions>? TypeDefinitionProvider { get; set; }
113
public
SumType
<bool, ImplementationOptions, ImplementationRegistrationOptions>? ImplementationProvider { get; set; }
165
public
SumType
<bool, DocumentColorOptions, DocumentColorRegistrationOptions>? DocumentColorProvider { get; set; }
216
public
SumType
<bool, SelectionRangeOptions, SelectionRangeRegistrationOptions>? SelectionRangeProvider { get; init; }
232
public
SumType
<bool, CallHierarchyOptions, CallHierarchyRegistrationOptions>? CallHierarchyProvider { get; init; }
248
public
SumType
<bool, MonikerOptions, MonikerRegistrationOptions>? MonikerProvider { get; init; }
256
public
SumType
<bool, TypeHierarchyOptions, TypeHierarchyRegistrationOptions>? TypeHierarchyProvider { get; init; }
264
public
SumType
<bool, InlineValueOptions, InlineValueRegistrationOptions>? InlineValueProvider { get; init; }
272
public
SumType
<bool, InlayHintOptions, InlayHintRegistrationOptions>? InlayHintOptions { get; set; }
Protocol\SumType.cs (41)
212
internal 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}"/>.
273
public 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}"/>.
279
public 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}"/>.
285
public 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}"/>.
291
public 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}"/>.
297
public 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}"/>.
303
public 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}"/>.
309
public 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}"/>.
318
public 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>
338
public 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>
345
public 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>
352
public static explicit operator T3(
SumType
<T1, T2, T3> sum) => sum.Value is T3 tVal ? tVal : throw new InvalidCastException();
354
public static bool operator ==(
SumType
<T1, T2, T3> left,
SumType
<T1, T2, T3> right)
359
public static bool operator !=(
SumType
<T1, T2, T3> left,
SumType
<T1, T2, T3> right)
472
return obj is
SumType
<T1, T2, T3> type && this.Equals(type);
476
public 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}"/>.
630
public 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}"/>.
659
public static explicit operator
SumType
<T1, T2, T3>(SumType<T1, T2, T3, T4> sum)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Diagnostics\AbstractPullDiagnosticTestsBase.cs (3)
272
BufferedProgress<
DocumentDiagnosticPartialReport
>? progress = useProgress ? BufferedProgress.Create<
DocumentDiagnosticPartialReport
>(null) : null;
303
IProgress<
DocumentDiagnosticPartialReport
>? progress)