C# attribute 如何获取当前对象实例 在线等
[AttributeUsage(AttributeTargets.Class,AllowMultiple=false)]publicsealedclassMyInterc...
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class MyInterceptorAttribute : ContextAttribute, IContributeObjectSink
{
/// <summary>
/// 构造
/// </summary>
public MyInterceptorAttribute()
: base("MyInterceptor")
{
//获取当前调用对象实例
} 展开
public sealed class MyInterceptorAttribute : ContextAttribute, IContributeObjectSink
{
/// <summary>
/// 构造
/// </summary>
public MyInterceptorAttribute()
: base("MyInterceptor")
{
//获取当前调用对象实例
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询