53 references to ChecksumAlgorithm
dotnet-format (1)
Formatters\CharsetFormatter.cs (1)
40return SourceText.From(sourceText.ToString(), encoding, sourceText.ChecksumAlgorithm);
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
507return document.WithText(SourceText.From(newText.ToString(), newText.Encoding, newText.ChecksumAlgorithm));
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
508return document.WithText(SourceText.From(newText.ToString(), newText.Encoding, newText.ChecksumAlgorithm));
Microsoft.CodeAnalysis (17)
Compilation\DeterministicKeyBuilder.cs (1)
340writer.Write("checksumAlgorithm", sourceText.ChecksumAlgorithm);
EmbeddedText.cs (2)
113return new EmbeddedText(filePath, text.GetChecksum(), text.ChecksumAlgorithm, text.PrecomputedEmbeddedTextBlob); 116return new EmbeddedText(filePath, text.GetChecksum(), text.ChecksumAlgorithm, CreateBlob(text));
SourceGeneration\GeneratorDriverOptions.cs (1)
27/// When specified, overrides the <see cref="SourceText.ChecksumAlgorithm"/> given in <see cref="SourceProductionContext.AddSource(string, SourceText)"/>.
Syntax\SyntaxTree.cs (1)
376_lazyHashAlgorithm = text.ChecksumAlgorithm;
Text\ChangedText.cs (1)
20: base(checksumAlgorithm: oldText.ChecksumAlgorithm)
Text\CompositeText.cs (4)
194return SourceText.From(string.Empty, original.Encoding, original.ChecksumAlgorithm); 202return new CompositeText(segments.ToImmutable(), original.Encoding, original.ChecksumAlgorithm); 347var algorithm = segments[i].ChecksumAlgorithm; 403var algorithm = segments[0].ChecksumAlgorithm;
Text\SourceText.cs (6)
508return SourceText.From(string.Empty, this.Encoding, this.ChecksumAlgorithm); 577/// Cryptographic checksum determined by <see cref="ChecksumAlgorithm"/>. Computed using the original bytes 823var segment = SourceText.From(change.NewText!, this.Encoding, this.ChecksumAlgorithm); 1362/// Otherwise, returns a <see cref="SourceText"/> with the same <see cref="ChecksumAlgorithm"/> as <paramref name="checksumAlgorithm"/>, potentially by wrapping this instance. 1366if (checksumAlgorithm == SourceHashAlgorithm.None || checksumAlgorithm == ChecksumAlgorithm) 1379Debug.Assert(checksumAlgorithm != underlying.ChecksumAlgorithm);
Text\SubText.cs (1)
18: base(checksumAlgorithm: text.ChecksumAlgorithm)
Microsoft.CodeAnalysis.CSharp (7)
Syntax\CSharpSyntaxTree.cs (2)
510text.ChecksumAlgorithm, 579newText.ChecksumAlgorithm,
Syntax\CSharpSyntaxTree.DebuggerSyntaxTree.cs (1)
20text.ChecksumAlgorithm,
Syntax\CSharpSyntaxTree.LazySyntaxTree.cs (3)
119_text.ChecksumAlgorithm, 140_text.ChecksumAlgorithm, 172_text.ChecksumAlgorithm,
Syntax\CSharpSyntaxTree.ParsedSyntaxTree.cs (1)
45Debug.Assert(textOpt == null || textOpt.Encoding == encodingOpt && textOpt.ChecksumAlgorithm == checksumAlgorithm);
Microsoft.CodeAnalysis.ExternalAccess.HotReload (1)
Api\HotReloadMSBuildWorkspace.cs (1)
185var newText = await GetSourceTextAsync(path, oldText.Encoding, oldText.ChecksumAlgorithm, cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features (1)
EditAndContinue\CommittedSolution.cs (1)
441=> checksumAlgorithm == sourceText.ChecksumAlgorithm && sourceText.GetChecksum().SequenceEqual(requiredChecksum);
Microsoft.CodeAnalysis.Razor.Compiler (3)
Language\DefaultRazorCSharpLoweringPhase.cs (1)
87var algorithm = _context.SourceDocument.Text.ChecksumAlgorithm;
Language\Extensions\MetadataAttributePass.cs (2)
109var checksumAlgorithm = codeDocument.Source.Text.ChecksumAlgorithm; 129checksumAlgorithm = import.Text.ChecksumAlgorithm;
Microsoft.CodeAnalysis.VisualBasic (7)
Syntax\VisualBasicSyntaxTree.DebuggerSyntaxTree.vb (1)
19text.ChecksumAlgorithm,
Syntax\VisualBasicSyntaxTree.LazySyntaxTree.vb (3)
122_text.ChecksumAlgorithm, 141_text.ChecksumAlgorithm, 167_text.ChecksumAlgorithm,
Syntax\VisualBasicSyntaxTree.ParsedSyntaxTree.vb (1)
48Debug.Assert(textOpt Is Nothing OrElse textOpt.Encoding Is encodingOpt AndAlso textOpt.ChecksumAlgorithm = checksumAlgorithm)
Syntax\VisualBasicSyntaxTree.vb (2)
141newText.ChecksumAlgorithm, 303text.ChecksumAlgorithm,
Microsoft.CodeAnalysis.Workspaces (7)
Serialization\SerializableSourceText.cs (1)
155writer.WriteInt32((int)_text.ChecksumAlgorithm);
SourceGeneration\IRemoteSourceGenerationService.cs (1)
85/// <param name="ChecksumAlgorithm">Result of <see cref="SourceText.ChecksumAlgorithm"/>.</param>
TemporaryStorage\TemporaryStorageService.cs (1)
116return new(this, memoryMappedInfo.MemoryMappedFile, identifier, text.ChecksumAlgorithm, text.Encoding, text.GetContentHash());
Workspace\Solution\SourceGeneratedDocumentState.cs (4)
90var loadTextOptions = new LoadTextOptions(generatedSourceText.ChecksumAlgorithm); 107var newTree = factory.CreateSyntaxTree(documentIdentity.FilePath, parseOptions, generatedSourceText, generatedSourceText.Encoding, generatedSourceText.ChecksumAlgorithm, syntaxNode); 160=> new(this.GetOriginalSourceTextContentHash(), this.SourceText.Encoding?.WebName, this.SourceText.ChecksumAlgorithm); 239var newTree = factory.CreateSyntaxTree(Attributes.SyntaxTreeFilePath, ParseOptions, sourceText, sourceText.Encoding, sourceText.ChecksumAlgorithm, newRoot);
Microsoft.Gen.BuildMetadata.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
549return document.WithText(SourceText.From(newText.ToString(), newText.Encoding, newText.ChecksumAlgorithm));
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
549return document.WithText(SourceText.From(newText.ToString(), newText.Encoding, newText.ChecksumAlgorithm));
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
549return document.WithText(SourceText.From(newText.ToString(), newText.Encoding, newText.ChecksumAlgorithm));
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
549return document.WithText(SourceText.From(newText.ToString(), newText.Encoding, newText.ChecksumAlgorithm));
Microsoft.Gen.MetadataExtractor.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
549return document.WithText(SourceText.From(newText.ToString(), newText.Encoding, newText.ChecksumAlgorithm));
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
549return document.WithText(SourceText.From(newText.ToString(), newText.Encoding, newText.ChecksumAlgorithm));
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
549return document.WithText(SourceText.From(newText.ToString(), newText.Encoding, newText.ChecksumAlgorithm));