Exemple #1
0
        private async Task <SolutionChecksumObject> CreateSolutionChecksumObjectAsync(
            Solution solution, string kind, SnapshotBuilder snapshotBuilder, AssetBuilder assetBuilder, CancellationToken cancellationToken)
        {
            var info = await assetBuilder.BuildAsync(solution, cancellationToken).ConfigureAwait(false);

            var projects = await snapshotBuilder.BuildAsync(solution, solution.Projects, cancellationToken).ConfigureAwait(false);

            return(new SolutionChecksumObject(_serializer, info.Checksum, projects));
        }
            public async Task <ChecksumScope> CreateChecksumAsync(Solution solution, CancellationToken cancellationToken)
            {
                // TODO: add logging mechanism
                var cache = _caches.CreateRootTreeNodeCache(solution);

                var builder  = new SnapshotBuilder(cache);
                var snapshot = new ChecksumScope(_caches, cache, await builder.BuildAsync(solution, cancellationToken).ConfigureAwait(false));

                return(snapshot);
            }
Exemple #3
0
            public async Task <ChecksumScope> CreateChecksumAsync(Solution solution, CancellationToken cancellationToken)
            {
                using (Logger.LogBlock(FunctionId.SolutionChecksumServiceFactory_CreateChecksumAsync, cancellationToken))
                {
                    var cache = _caches.CreateRootTreeNodeCache(solution);

                    var builder  = new SnapshotBuilder(cache);
                    var snapshot = new ChecksumScope(_caches, cache, await builder.BuildAsync(solution, cancellationToken).ConfigureAwait(false));

                    return(snapshot);
                }
            }
Exemple #4
0
        private async Task <ProjectChecksumObject> CreateProjectChecksumObjectAsync(
            Project project, string kind, SnapshotBuilder snapshotBuilder, AssetBuilder assetBuilder, CancellationToken cancellationToken)
        {
            var info = await assetBuilder.BuildAsync(project, cancellationToken).ConfigureAwait(false);

            var compilationOptions = await assetBuilder.BuildAsync(project, project.CompilationOptions, cancellationToken).ConfigureAwait(false);

            var parseOptions = await assetBuilder.BuildAsync(project, project.ParseOptions, cancellationToken).ConfigureAwait(false);

            var documents = await snapshotBuilder.BuildAsync(project, project.Documents, WellKnownChecksumObjects.Documents, cancellationToken).ConfigureAwait(false);

            var projectReferences = await snapshotBuilder.BuildAsync(project, project.ProjectReferences, cancellationToken).ConfigureAwait(false);

            var metadataReferences = await snapshotBuilder.BuildAsync(project, project.MetadataReferences, cancellationToken).ConfigureAwait(false);

            var analyzerReferences = await snapshotBuilder.BuildAsync(project, project.AnalyzerReferences, cancellationToken).ConfigureAwait(false);

            var additionalDocuments = await snapshotBuilder.BuildAsync(project, project.AdditionalDocuments, WellKnownChecksumObjects.TextDocuments, cancellationToken).ConfigureAwait(false);

            return(new ProjectChecksumObject(
                       _serializer, info.Checksum, compilationOptions.Checksum, parseOptions.Checksum,
                       documents, projectReferences, metadataReferences, analyzerReferences, additionalDocuments));
        }