Я хотел бы поместить атрибут аспекта PostSharp в одно свойство и знать, из какого свойства метода был получен доступ и какое значение оно имело в то время.Это возможно с PostSharp?
Пример
static MyClass
{
[PostSharpAtrribute]
public string OutputFormat { get; set; }
}
public void Method1
{
MyClass.Instance.OutputFormat = "1";
}
public void Method2
{
MyClass.Instance.OutputFormat = "2";
}
public void Method3
{
MyClass.Instance.OutputFormat = "3";
}
PostSharp Aspect должен прочитать
Method "Method1" executed, property has value OutputFormat = 1
Method "Method2" executed, property has value OutputFormat = 2
Method "Method3" executed, property has value OutputFormat = 3