/
aprogrammer
/
reverse-proxy-ms-yarp
Обзор
Документация
Войти
/
aprogrammer
/
reverse-proxy-ms-yarp
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/ReverseProxy/Utilities/StringSyntaxAttribute.cs
35 строк
1 KB
James Newton-King
Improve route string syntax usage (#2253)
14 сен 2023, 20:08
Не верифицирован
14 сен 2023, 20:08
44629d6
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. namespace System.Diagnostics.CodeAnalysis { #if !NET7_0_OR_GREATER /// <summary>Specifies the syntax used in a string.</summary> [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = false)] internal sealed class StringSyntaxAttribute : Attribute { /// <summary>Initializes the <see cref="StringSyntaxAttribute"/> with the identifier of the syntax used.</summary> /// <param name="syntax">The syntax identifier.</param> public StringSyntaxAttribute(string syntax) { Syntax = syntax; Arguments = Array.Empty<object?>(); } /// <summary>Initializes the <see cref="StringSyntaxAttribute"/> with the identifier of the syntax used.</summary> /// <param name="syntax">The syntax identifier.</param> /// <param name="arguments">Optional arguments associated with the specific syntax employed.</param> public StringSyntaxAttribute(string syntax, params object?[] arguments) { Syntax = syntax; Arguments = arguments; } /// <summary>Gets the identifier of the syntax used.</summary> public string Syntax { get; } /// <summary>Optional arguments associated with the specific syntax employed.</summary> public object?[] Arguments { get; } } #endif }