106 references to WellKnownSynchronizationKind
Microsoft.CodeAnalysis.Remote.Workspaces (7)
RemoteHostAssetSerialization.cs (3)
71
Debug.Assert(asset.Kind !=
WellKnownSynchronizationKind
.Null, "We should not be sending null assets");
111
var
kind = (
WellKnownSynchronizationKind
)reader.ReadInt32();
SolutionAsset.cs (4)
15
public static readonly SolutionAsset Null = new(value: null, Checksum.Null,
WellKnownSynchronizationKind
.Null);
23
public readonly
WellKnownSynchronizationKind
Kind;
32
public SolutionAsset(object? value, Checksum checksum,
WellKnownSynchronizationKind
kind)
38
Contract.ThrowIfTrue(kind is
WellKnownSynchronizationKind
.SourceText);
Microsoft.CodeAnalysis.Workspaces (68)
Remote\ISerializerService.cs (1)
31
T? Deserialize<T>(
WellKnownSynchronizationKind
kind, ObjectReader reader, CancellationToken cancellationToken);
Serialization\SerializationExtensions.cs (16)
16
public static
WellKnownSynchronizationKind
GetWellKnownSynchronizationKind(this object value)
19
SolutionStateChecksums _ =>
WellKnownSynchronizationKind
.SolutionState,
20
ProjectStateChecksums _ =>
WellKnownSynchronizationKind
.ProjectState,
21
DocumentStateChecksums _ =>
WellKnownSynchronizationKind
.DocumentState,
22
ChecksumCollection _ =>
WellKnownSynchronizationKind
.ChecksumCollection,
23
SolutionInfo.SolutionAttributes _ =>
WellKnownSynchronizationKind
.SolutionAttributes,
24
ProjectInfo.ProjectAttributes _ =>
WellKnownSynchronizationKind
.ProjectAttributes,
25
DocumentInfo.DocumentAttributes _ =>
WellKnownSynchronizationKind
.DocumentAttributes,
26
CompilationOptions _ =>
WellKnownSynchronizationKind
.CompilationOptions,
27
ParseOptions _ =>
WellKnownSynchronizationKind
.ParseOptions,
28
ProjectReference _ =>
WellKnownSynchronizationKind
.ProjectReference,
29
MetadataReference _ =>
WellKnownSynchronizationKind
.MetadataReference,
30
AnalyzerReference _ =>
WellKnownSynchronizationKind
.AnalyzerReference,
31
SerializableSourceText _ =>
WellKnownSynchronizationKind
.SerializableSourceText,
32
SourceText _ =>
WellKnownSynchronizationKind
.SourceText,
33
SourceGeneratedDocumentIdentity _ =>
WellKnownSynchronizationKind
.SourceGeneratedDocumentIdentity,
Serialization\SerializerService.cs (41)
36
private static readonly Func<
WellKnownSynchronizationKind
, string> s_logKind = k => k.ToString();
62
var
kind = value.GetWellKnownSynchronizationKind();
75
case
WellKnownSynchronizationKind
.Null:
78
case
WellKnownSynchronizationKind
.CompilationOptions:
79
case
WellKnownSynchronizationKind
.ParseOptions:
80
case
WellKnownSynchronizationKind
.ProjectReference:
81
case
WellKnownSynchronizationKind
.SourceGeneratedDocumentIdentity:
84
case
WellKnownSynchronizationKind
.MetadataReference:
87
case
WellKnownSynchronizationKind
.AnalyzerReference:
90
case
WellKnownSynchronizationKind
.SerializableSourceText:
93
case
WellKnownSynchronizationKind
.SourceText:
106
var
kind = value.GetWellKnownSynchronizationKind();
120
case
WellKnownSynchronizationKind
.Null:
124
case
WellKnownSynchronizationKind
.SolutionAttributes:
125
case
WellKnownSynchronizationKind
.ProjectAttributes:
126
case
WellKnownSynchronizationKind
.DocumentAttributes:
127
case
WellKnownSynchronizationKind
.SourceGeneratedDocumentIdentity:
131
case
WellKnownSynchronizationKind
.CompilationOptions:
135
case
WellKnownSynchronizationKind
.ParseOptions:
140
case
WellKnownSynchronizationKind
.ProjectReference:
144
case
WellKnownSynchronizationKind
.MetadataReference:
148
case
WellKnownSynchronizationKind
.AnalyzerReference:
152
case
WellKnownSynchronizationKind
.SerializableSourceText:
156
case
WellKnownSynchronizationKind
.SourceText:
168
public T? Deserialize<T>(
WellKnownSynchronizationKind
kind, ObjectReader reader, CancellationToken cancellationToken)
176
case
WellKnownSynchronizationKind
.Null:
179
case
WellKnownSynchronizationKind
.SolutionState:
180
case
WellKnownSynchronizationKind
.ProjectState:
181
case
WellKnownSynchronizationKind
.DocumentState:
182
case
WellKnownSynchronizationKind
.ChecksumCollection:
185
case
WellKnownSynchronizationKind
.SolutionAttributes:
187
case
WellKnownSynchronizationKind
.ProjectAttributes:
189
case
WellKnownSynchronizationKind
.DocumentAttributes:
191
case
WellKnownSynchronizationKind
.SourceGeneratedDocumentIdentity:
193
case
WellKnownSynchronizationKind
.CompilationOptions:
195
case
WellKnownSynchronizationKind
.ParseOptions:
197
case
WellKnownSynchronizationKind
.ProjectReference:
199
case
WellKnownSynchronizationKind
.MetadataReference:
201
case
WellKnownSynchronizationKind
.AnalyzerReference:
203
case
WellKnownSynchronizationKind
.SerializableSourceText:
205
case
WellKnownSynchronizationKind
.SourceText:
Serialization\SerializerService_ChecksumWithChildren.cs (10)
22
private static readonly ImmutableDictionary<
WellKnownSynchronizationKind
, Func<ImmutableArray<object>, ChecksumWithChildren>> s_creatorMap = CreateCreatorMap();
28
var
kind = checksums.GetWellKnownSynchronizationKind();
55
var
kind = (
WellKnownSynchronizationKind
)reader.ReadInt32();
84
private static ImmutableDictionary<
WellKnownSynchronizationKind
, Func<ImmutableArray<object>, ChecksumWithChildren>> CreateCreatorMap()
86
return ImmutableDictionary<
WellKnownSynchronizationKind
, Func<ImmutableArray<object>, ChecksumWithChildren>>.Empty
87
.Add(
WellKnownSynchronizationKind
.SolutionState, children => new SolutionStateChecksums(children))
88
.Add(
WellKnownSynchronizationKind
.ProjectState, children => new ProjectStateChecksums(children))
89
.Add(
WellKnownSynchronizationKind
.DocumentState, children => new DocumentStateChecksums(children))
90
.Add(
WellKnownSynchronizationKind
.ChecksumCollection, children => new ChecksumCollection(children));
Roslyn.VisualStudio.Next.UnitTests (31)
Remote\SerializationValidator.cs (25)
41
/// <see cref="
WellKnownSynchronizationKind
"/> for examples.
46
public readonly
WellKnownSynchronizationKind
Kind;
118
solutionObject.Attributes,
WellKnownSynchronizationKind
.SolutionAttributes,
131
projectObject.Info,
WellKnownSynchronizationKind
.ProjectAttributes,
135
projectObject.CompilationOptions,
WellKnownSynchronizationKind
.CompilationOptions,
139
projectObject.ParseOptions,
WellKnownSynchronizationKind
.ParseOptions,
151
checksum,
WellKnownSynchronizationKind
.ProjectReference,
158
checksum,
WellKnownSynchronizationKind
.MetadataReference,
165
checksum,
WellKnownSynchronizationKind
.AnalyzerReference,
185
documentObject.Info,
WellKnownSynchronizationKind
.DocumentAttributes,
189
documentObject.Text,
WellKnownSynchronizationKind
.SerializableSourceText,
195
WellKnownSynchronizationKind
kind,
196
Func<T,
WellKnownSynchronizationKind
, ISerializerService, SolutionAsset> assetGetter)
289
await VerifyChecksumInServiceAsync(projectObject.Info,
WellKnownSynchronizationKind
.ProjectAttributes).ConfigureAwait(false);
290
await VerifyChecksumInServiceAsync(projectObject.CompilationOptions,
WellKnownSynchronizationKind
.CompilationOptions).ConfigureAwait(false);
291
await VerifyChecksumInServiceAsync(projectObject.ParseOptions,
WellKnownSynchronizationKind
.ParseOptions).ConfigureAwait(false);
295
await VerifyCollectionInService(projectObject.ProjectReferences, expectedProjectReferenceCount,
WellKnownSynchronizationKind
.ProjectReference).ConfigureAwait(false);
296
await VerifyCollectionInService(projectObject.MetadataReferences, expectedMetadataReferenceCount,
WellKnownSynchronizationKind
.MetadataReference).ConfigureAwait(false);
297
await VerifyCollectionInService(projectObject.AnalyzerReferences, expectedAnalyzerReferenceCount,
WellKnownSynchronizationKind
.AnalyzerReference).ConfigureAwait(false);
302
internal async Task VerifyCollectionInService(ChecksumCollection checksums, int expectedCount,
WellKnownSynchronizationKind
expectedItemKind)
327
await VerifyChecksumInServiceAsync(documentObject.Info,
WellKnownSynchronizationKind
.DocumentAttributes).ConfigureAwait(false);
328
await VerifyChecksumInServiceAsync(documentObject.Text,
WellKnownSynchronizationKind
.SerializableSourceText).ConfigureAwait(false);
337
internal async Task VerifyChecksumInServiceAsync(Checksum checksum,
WellKnownSynchronizationKind
kind)
354
internal static void ChecksumEqual(Checksum checksum1,
WellKnownSynchronizationKind
kind1, Checksum checksum2,
WellKnownSynchronizationKind
kind2)
Remote\SnapshotSerializationTests.cs (6)
96
await validator.VerifyChecksumInServiceAsync(solutionObject.Attributes,
WellKnownSynchronizationKind
.SolutionAttributes).ConfigureAwait(false);
132
await validator.VerifyChecksumInServiceAsync(solutionObject.Attributes,
WellKnownSynchronizationKind
.SolutionAttributes);
168
await validator.VerifyChecksumInServiceAsync(solutionObject.Attributes,
WellKnownSynchronizationKind
.SolutionAttributes).ConfigureAwait(false);
169
await validator.VerifyChecksumInServiceAsync(solutionObject.Projects.Checksum,
WellKnownSynchronizationKind
.ChecksumCollection).ConfigureAwait(false);
206
await validator.VerifyChecksumInServiceAsync(solutionObject.Attributes,
WellKnownSynchronizationKind
.SolutionAttributes).ConfigureAwait(false);
207
await validator.VerifyChecksumInServiceAsync(solutionObject.Projects.Checksum,
WellKnownSynchronizationKind
.ChecksumCollection).ConfigureAwait(false);