92 references to CacheFormat
Microsoft.NET.ProjectData.Tasks (92)
ForwardCompat.cs (17)
37 private static readonly HashSet<string> KnownSections = new HashSet<string>(CacheFormat.Sections.All, StringComparer.Ordinal); 53 foreach (KeyValuePair<string, string[]> entry in CacheFormat.Sections.MetadataBySection) 202 if (line[0] != CacheFormat.CommentChar) 338 if (line[0] != (byte)CacheFormat.CommentChar) 448 pendingUnknownSections.Add(CacheFormat.SectionHeader(section.Name)); 501 Section? existingProps = existing.Sections.FirstOrDefault(s => s.Name == CacheFormat.Sections.Properties); 516 Section? candidateProps = candidate.Sections.FirstOrDefault(s => s.Name == CacheFormat.Sections.Properties); 521 Section? anchorSection = candidate.Sections.FirstOrDefault(s => s.Name == CacheFormat.Sections.SliceDimensions) 522 ?? candidate.Sections.FirstOrDefault(s => s.Name == CacheFormat.Sections.Project) 525 var block = new List<string> { string.Empty, CacheFormat.SectionHeader(CacheFormat.Sections.Properties) }; 576 if (existingSection.Name is CacheFormat.Sections.Project 577 or CacheFormat.Sections.SliceDimensions 578 or CacheFormat.Sections.Properties) 655 bool atSeparator = i < lines.Length && Trim(lines[i]) == CacheFormat.SliceSeparator; 686 if (raw[0] == CacheFormat.CommentChar) 707 if (current.Name == CacheFormat.Sections.SliceDimensions)
ProjectDataMerger.cs (31)
22 ForwardCompat.TryReadVersionHeader(CacheFormat.VersionHeader, out int major, out _) ? major : 2; 198 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.Properties)); 209 writer.WriteLine(CacheFormat.SectionHeader(section)); 219 writer.WriteLine(CacheFormat.SliceSeparator); 228 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.SliceDimensions)); 238 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.Properties)); 266 writer.WriteLine(CacheFormat.SectionHeader(section)); 289 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.Properties)); 299 writer.WriteLine(CacheFormat.SectionHeader(section)); 309 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.Project)); 310 foreach (string line in lines.Where(static l => l.StartsWith(CacheFormat.ProjectHeaderPrefix, StringComparison.Ordinal))) 312 writer.Write(CacheFormat.LanguagePrefix); writer.WriteLine("C#"); 314 writer.WriteLine(CacheFormat.PrimaryMarker); 315 foreach (string line in lines.Where(static l => !l.StartsWith(CacheFormat.ProjectHeaderPrefix, StringComparison.Ordinal))) 403 if (line[0] == CacheFormat.CommentChar) continue; 409 if (currentSection != CacheFormat.Sections.Project && currentSection != CacheFormat.Sections.SliceDimensions && currentSection != CacheFormat.Sections.Properties) 419 case CacheFormat.Sections.Project: 420 if (string.Equals(line, CacheFormat.PrimaryMarker, StringComparison.Ordinal)) 422 else if (!line.StartsWith(CacheFormat.LanguagePrefix, StringComparison.Ordinal)) 425 case CacheFormat.Sections.SliceDimensions: 428 case CacheFormat.Sections.Properties: 432 currentList?.Add(string.Equals(currentSection, CacheFormat.Sections.SdkAnalyzerConfigPolicy, StringComparison.Ordinal) 476 if (string.Equals(line.TrimEnd('\r'), CacheFormat.SliceSeparator, StringComparison.Ordinal)) 593 writer.WriteLine(CacheFormat.VersionHeader);
ProjectDataWriter.cs (44)
170 writer.WriteLine(CacheFormat.VersionHeader); 182 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.Project)); 183 writer.Write(CacheFormat.ProjectHeaderPrefix); writer.WriteLine(resolver.ToPortable(projectFilePath)); 184 writer.Write(CacheFormat.LanguagePrefix); writer.WriteLine("C#"); 185 if (isPrimary) writer.WriteLine(CacheFormat.PrimaryMarker); 186 if (lastDtbSucceeded) writer.WriteLine(CacheFormat.LastDtbSucceededMarker); 193 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.SliceDimensions)); 220 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.Properties)); 255 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.CommandLineArguments)); 290 CacheFormat.Sections.AnalyzerConfigFiles, 298 EmitSimplePathSectionRequired(writer, CacheFormat.SectionHeader(CacheFormat.Sections.AnalyzerReferences), preparedAnalyzerRefs); 300 EmitSimplePathSection(writer, CacheFormat.SectionHeader(CacheFormat.Sections.AnalyzerConfigFiles), preparedAnalyzerConfigFiles); 303 CacheFormat.SectionHeader(CacheFormat.Sections.AdditionalFiles), 304 PrepareDistinctPortablePaths(additionalFiles, resolver, CacheFormat.Sections.AdditionalFiles, projectFilePath, duplicateItemReporter), 325 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.Capabilities)); 334 private static readonly int CurrentMajorVersion = ForwardCompat.TryParseVersion(CacheFormat.VersionHeader, out int major, out _) 336 : throw new InvalidOperationException($"CacheFormat.VersionHeader '{CacheFormat.VersionHeader}' is not a valid 'version=<major>[.<minor>]' header."); 853 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.SourceFiles)); 878 duplicateItemReporter(new ProjectDataDuplicateItemDiagnostic(projectFilePath, CacheFormat.Sections.SourceFiles, portable)); 886 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.SourceFiles)); 898 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.ProjectReferences)); 916 duplicateItemReporter?.Invoke(new ProjectDataDuplicateItemDiagnostic(projectFilePath, CacheFormat.Sections.ProjectReferences, portable)); 1052 AddDistinctPortablePath(result, seenResult, portable, CacheFormat.Sections.AnalyzerReferences, projectFilePath, duplicateItemReporter); 1141 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.FrameworkPacks)); 1149 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.SdkAnalyzerPacks)); 1157 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.SdkAnalyzerConfigPolicy)); 1803 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.MetadataReferences)); 2042 writer.WriteLine(CacheFormat.SectionHeader(CacheFormat.Sections.EmbeddedResources));