好像无法拦截泛型属性
hzy-6 opened this issue · 4 comments
hzy-6 commented
inversionhourglass commented
支持的,代码别用截图,用代码块,下面是测试代码,你可以复制到本地测试
internal class Program
{
static async Task Main(string[] args)
{
var y = new Y<int>();
y.Z = 0;
await Console.Out.WriteLineAsync(y.Z.ToString());
}
}
public class Y<T>
{
[X]
public T Z { get; set; }
}
public class XAttribute : MoAttribute
{
public override void OnEntry(MethodContext context)
{
Console.WriteLine($"[OnEntry] {context.Method.Name}");
}
}
hzy-6 commented
hzy-6 commented
hzy-6 commented
测试过是可以的,我没使用字段所以不进入拦截