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