/
aprogrammer
/
reverse-proxy-ms-yarp
Обзор
Документация
Войти
/
aprogrammer
/
reverse-proxy-ms-yarp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/ReverseProxy/Model/RouteState.cs
46 строк
1 KB
Kahbazi
File Scoped Namespaces (#1352)
12 ноя 2021, 21:53
Не верифицирован
12 ноя 2021, 21:53
44f13d9
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System; using Microsoft.AspNetCore.Http; namespace Yarp.ReverseProxy.Model; /// <summary> /// Representation of a route for use at runtime. /// </summary> internal sealed class RouteState { private volatile RouteModel _model = default!; public RouteState(string routeId) { if (string.IsNullOrEmpty(routeId)) { throw new ArgumentNullException(nameof(routeId)); } RouteId = routeId; } public string RouteId { get; } /// <summary> /// Encapsulates parts of a route that can change atomically /// in reaction to config changes. /// </summary> internal RouteModel Model { get => _model; set => _model = value ?? throw new ArgumentNullException(nameof(value)); } /// <summary> /// Tracks changes to the cluster configuration for use with rebuilding the route endpoint. /// </summary> internal int? ClusterRevision { get; set; } /// <summary> /// A cached Endpoint that will be cleared and rebuilt if the RouteConfig or cluster config change. /// </summary> internal Endpoint? CachedEndpoint { get; set; } }