You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
905 B
30 lines
905 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace Apewer
|
|
{
|
|
|
|
/// <summary>无依赖特性。</summary>
|
|
[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = false)]
|
|
public sealed class IndependentAttribute : Attribute
|
|
{
|
|
|
|
string _remark = null;
|
|
|
|
/// <summary>无依赖特性。</summary>
|
|
public IndependentAttribute(string remark = null) => _remark = remark;
|
|
|
|
/// <summary>备注。</summary>
|
|
public string Remark
|
|
{
|
|
get { return _remark; }
|
|
set { if (!string.IsNullOrEmpty(value)) _remark = value; }
|
|
}
|
|
|
|
/// <summary>从 <see cref="IndependentAttribute"/> 到 Boolean 的隐式转换,判断 <see cref="IndependentAttribute"/> 有效。</summary>
|
|
public static implicit operator bool(IndependentAttribute instance) => instance != null;
|
|
|
|
}
|
|
|
|
}
|