/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Tools/BuildBoss/ProjectKey.cs
30 строк
1 KB
Cyrus Najmabadi
Remove unused usings
18 июн 2025, 22:17
18 июн 2025, 22:17
481c36c
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #nullable disable using System; using System.IO; namespace BuildBoss { internal readonly struct ProjectKey : IEquatable<ProjectKey> { internal string FilePath { get; } internal string FileName => FilePath != null ? Path.GetFileName(FilePath) : ""; internal ProjectKey(string filePath) { FilePath = Path.GetFullPath(filePath); } public static bool operator ==(ProjectKey left, ProjectKey right) => StringComparer.OrdinalIgnoreCase.Equals(left.FilePath, right.FilePath); public static bool operator !=(ProjectKey left, ProjectKey right) => !(left == right); public bool Equals(ProjectKey other) => other == this; public override bool Equals(object obj) => obj is ProjectKey && Equals((ProjectKey)obj); public override int GetHashCode() => FilePath?.GetHashCode() ?? 0; public override string ToString() => FileName; } }