85 references to 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 (14)
Compilation\DeterministicKeyBuilder.cs (1)
279writer.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));
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 (3)
506return SourceText.From(string.Empty, this.Encoding, this.ChecksumAlgorithm); 575/// Cryptographic checksum determined by <see cref="ChecksumAlgorithm"/>. Computed using the original bytes 804var segment = SourceText.From(change.NewText!, this.Encoding, this.ChecksumAlgorithm);
Text\SourceTextComparer.cs (1)
41Hash.Combine(encodingHash, ((int)obj.ChecksumAlgorithm).GetHashCode())));
Text\SubText.cs (1)
18: base(checksumAlgorithm: text.ChecksumAlgorithm)
Microsoft.CodeAnalysis.CSharp (7)
Syntax\CSharpSyntaxTree.cs (2)
511text.ChecksumAlgorithm, 578newText.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.CSharp.Syntax.UnitTests (8)
Syntax\SyntaxFactoryTests.cs (2)
47Assert.Equal(SourceHashAlgorithm.Sha1, text.ChecksumAlgorithm); 55Assert.Equal(SourceHashAlgorithm.Sha1, text.ChecksumAlgorithm);
Syntax\SyntaxTreeTests.cs (6)
122Assert.Equal(SourceHashAlgorithm.Sha1, tree.GetText().ChecksumAlgorithm); 134Assert.Equal(SourceHashAlgorithm.Sha1, tree.GetText().ChecksumAlgorithm); 253Assert.Equal(SourceHashAlgorithm.Sha1, newText.ChecksumAlgorithm); 270Assert.Equal(SourceHashAlgorithms.Default, newText.ChecksumAlgorithm); 295Assert.Equal(SourceHashAlgorithm.Sha1, newText.ChecksumAlgorithm); 311Assert.Equal(SourceHashAlgorithms.Default, newText.ChecksumAlgorithm);
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.SnapshotSourceText.cs (1)
282: base(textBufferCloneService, currentSnapshot, baseText.Encoding, baseText.ChecksumAlgorithm, container: TextBufferContainer.From(currentSnapshot.TextBuffer))
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Workspaces\TextFactoryTests.cs (1)
123Assert.Equal(SourceHashAlgorithms.Default, text.ChecksumAlgorithm);
Microsoft.CodeAnalysis.Features (1)
EditAndContinue\CommittedSolution.cs (1)
437=> checksumAlgorithm == sourceText.ChecksumAlgorithm && sourceText.GetChecksum().SequenceEqual(requiredChecksum);
Microsoft.CodeAnalysis.Features.UnitTests (4)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (4)
114Assert.Equal(SourceHashAlgorithm.Sha1, solution.GetDocument(documentIdA).GetTextSynchronously(default).ChecksumAlgorithm); 115Assert.Equal(SourceHashAlgorithm.Sha1, solution.GetDocument(documentIdB).GetTextSynchronously(default).ChecksumAlgorithm); 116Assert.Equal(SourceHashAlgorithm.Sha1, solution.GetDocument(documentIdC).GetTextSynchronously(default).ChecksumAlgorithm); 117Assert.Equal(SourceHashAlgorithm.Sha1, solution.GetDocument(documentIdE).GetTextSynchronously(default).ChecksumAlgorithm);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Workspaces\LspMiscellaneousFilesWorkspace.cs (1)
63this, documentFilePath, sourceTextLoader, languageInformation, documentText.ChecksumAlgorithm, Services.SolutionServices, []);
Microsoft.CodeAnalysis.UnitTests (10)
Text\SourceTextTests.cs (6)
85Assert.Equal(SourceHashAlgorithm.Sha1, SourceText.From(HelloWorld).ChecksumAlgorithm); 88Assert.Equal(SourceHashAlgorithm.Sha1, SourceText.From(bytes, bytes.Length).ChecksumAlgorithm); 91Assert.Equal(SourceHashAlgorithm.Sha1, SourceText.From(stream).ChecksumAlgorithm); 99Assert.Equal(algorithm, SourceText.From(HelloWorld, checksumAlgorithm: algorithm).ChecksumAlgorithm); 102Assert.Equal(algorithm, SourceText.From(bytes, bytes.Length, checksumAlgorithm: algorithm).ChecksumAlgorithm); 105Assert.Equal(algorithm, SourceText.From(stream, checksumAlgorithm: algorithm).ChecksumAlgorithm);
Text\TextChangeTests.cs (4)
197Assert.Equal(SourceHashAlgorithms.Default, subText.ChecksumAlgorithm); 240Assert.Equal(SourceHashAlgorithms.Default, newText.ChecksumAlgorithm); 578var writer = new LargeTextWriter(largeText.Encoding, largeText.ChecksumAlgorithm, 10); 615var writer = new LargeTextWriter(largeText.Encoding, largeText.ChecksumAlgorithm, chunk1.Length * 4);
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)
138newText.ChecksumAlgorithm, 300text.ChecksumAlgorithm,
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (1)
Compilation\MyTemplateTests.vb (1)
53Assert.Equal(SourceHashAlgorithms.Default, sourceText.ChecksumAlgorithm)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (7)
Syntax\SyntaxFactoryTests.vb (2)
16Assert.Equal(SourceHashAlgorithm.Sha1, text.ChecksumAlgorithm) 23Assert.Equal(SourceHashAlgorithm.Sha1, text.ChecksumAlgorithm)
Syntax\SyntaxTreeTests.vb (5)
18Assert.Equal(SourceHashAlgorithm.Sha1, tree.GetText().ChecksumAlgorithm) 120Assert.Equal(SourceHashAlgorithm.Sha1, newText.ChecksumAlgorithm) 137Assert.Equal(SourceHashAlgorithms.Default, newText.ChecksumAlgorithm) 160Assert.Equal(SourceHashAlgorithm.Sha1, newText.ChecksumAlgorithm) 174Assert.Equal(SourceHashAlgorithms.Default, newText.ChecksumAlgorithm)
Microsoft.CodeAnalysis.Workspaces (5)
Serialization\SerializableSourceText.cs (1)
159writer.WriteInt32((int)_text.ChecksumAlgorithm);
SourceGeneration\IRemoteSourceGenerationService.cs (1)
78/// <param name="ChecksumAlgorithm">Result of <see cref="SourceText.ChecksumAlgorithm"/>.</param>
TemporaryStorage\TemporaryStorageService.cs (1)
106return new(this, memoryMappedInfo.MemoryMappedFile, identifier, text.ChecksumAlgorithm, text.Encoding, text.GetContentHash());
Workspace\Solution\SourceGeneratedDocumentState.cs (2)
69var loadTextOptions = new LoadTextOptions(generatedSourceText.ChecksumAlgorithm); 128=> new(this.GetOriginalSourceTextContentHash(), this.SourceText.Encoding?.WebName, this.SourceText.ChecksumAlgorithm);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
VisualStudioMSBuildWorkspaceTests.cs (3)
283Assert.All(project.Documents, d => Assert.Equal(SourceHashAlgorithm.Sha1, d.GetTextSynchronously(default).ChecksumAlgorithm)); 284Assert.All(project.AdditionalDocuments, d => Assert.Equal(SourceHashAlgorithm.Sha1, d.GetTextSynchronously(default).ChecksumAlgorithm)); 301Assert.All(project.Documents, d => Assert.Equal(SourceHashAlgorithms.Default, d.GetTextSynchronously(default).ChecksumAlgorithm));
Microsoft.CodeAnalysis.Workspaces.UnitTests (6)
SolutionTests\SolutionTests.cs (5)
305Assert.Equal(SourceHashAlgorithm.Sha1, tree.GetText().ChecksumAlgorithm); 1652Assert.Equal(expectedAlgorithm, (await document.GetTextAsync(default)).ChecksumAlgorithm); 1653Assert.Equal(expectedAlgorithm, document.GetTextSynchronously(default).ChecksumAlgorithm); 2484Assert.Equal(SourceHashAlgorithm.Sha1, root.SyntaxTree.GetText().ChecksumAlgorithm); 2513Assert.Equal(SourceHashAlgorithm.Sha1, root.SyntaxTree.GetText().ChecksumAlgorithm);
UtilityTest\SourceTextSerializationTests.cs (1)
44var recovered = SourceTextExtensions.ReadFrom(textService, reader, originalText.Encoding, originalText.ChecksumAlgorithm, CancellationToken.None);
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.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));
Roslyn.VisualStudio.Next.UnitTests (2)
Services\ServiceHubServicesTests.cs (2)
491Assert.Equal(localText.ChecksumAlgorithm, remoteText.ChecksumAlgorithm);