/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/OpenApi/gen/Helpers/AddOpenApiInvocationComparer.cs
27 строк
783 B
Safia Abdalla
Populate XML doc comments into OpenAPI document (#60326)
14 фев 2025, 22:39
Не верифицирован
14 фев 2025, 22:39
0b520c3
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Generic; namespace Microsoft.AspNetCore.OpenApi.SourceGenerators; internal class AddOpenApiInvocationComparer : IEqualityComparer<AddOpenApiInvocation> { public static AddOpenApiInvocationComparer Instance { get; } = new(); public bool Equals(AddOpenApiInvocation? x, AddOpenApiInvocation? y) { if (ReferenceEquals(x, y)) { return true; } if (x is null || y is null) { return false; } return x.Variant.Equals(y.Variant); } public int GetHashCode(AddOpenApiInvocation obj) => HashCode.Combine(obj.Variant); }