/
TON618OFF
/
Unity-Project-RTU
Обзор
Документация
Войти
/
TON618OFF
/
Unity-Project-RTU
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Library/PackageCache/com.unity.testtools.codecoverage@1.2.6/Editor/CoverageFormats/OpenCover/Model/File.cs
68 строк
2 KB
TON618OFF
release
03 окт 2024, 22:20
03 окт 2024, 22:20
7c70e9f
Код
Авторство
О чём код?
// // OpenCover - S Wilde // // This source code is released under the MIT License; see the accompanying license file. // using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Xml.Serialization; namespace OpenCover.Framework.Model { /// <summary> /// A file reference within the coverage session and is used to point to an existing File entity /// </summary> public class FileRef { /// <summary> /// The uniqueid of a file in a coverage session /// </summary> [XmlAttribute("uid")] public UInt32 UniqueId { get; set; } } /// <summary> /// File details of a source file /// </summary> public class File : FileRef { private static int _uId; static readonly List<File> Files = new List<File>(); internal static void ResetAfterLoading() { _uId = (int)Files.Max(x => x.UniqueId); } /// <summary> /// A standard constructor /// </summary> public File() { UniqueId = (UInt32)Interlocked.Increment(ref _uId); Files.Add(this); } /// <summary> /// The path to file /// </summary> [XmlAttribute("fullPath")] public string FullPath { get; set; } } internal class FileEqualityComparer : IEqualityComparer<File> { public bool Equals(File x, File y) { return x.FullPath == y.FullPath; } public int GetHashCode(File obj) { return 0; } } }