using NCC.Dependency; using System; namespace NCC.RemoteRequest { /// /// 配置请求报文头 /// [SuppressSniffer, AttributeUsage(AttributeTargets.Interface | AttributeTargets.Method | AttributeTargets.Parameter, AllowMultiple = true)] public class HeadersAttribute : Attribute { /// /// 构造函数 /// /// /// public HeadersAttribute(string key, object value) { Key = key; Value = value; } /// /// 构造函数 /// /// 用于将参数添加到请求报文头中,如 Token public HeadersAttribute() { } /// /// 构造函数 /// /// 用于将参数添加到请求报文头中,如 Token /// 别名 public HeadersAttribute(string alias) { Key = alias; } /// /// 键 /// public string Key { get; set; } /// /// 值 /// public object Value { get; set; } } }