我有NPC类的层次结构(由PostSharp实现)
[NotifyPropertyChanged]
class A
{
}
[NotifyPropertyChanged]
class B
{
[Child]
public AdvisableCollection<A> Childs { get;set; }
}
[NotifyPropertyChanged]
class C
{
[Child]
public A PropertyA { get; set; }
[Child]
public B PropertyB { get; set; }
}如何订阅C类的对象以检测任何嵌套对象的属性是否发生了更改(包括对Childs集合的更改)?当我的模型变脏时,我需要得到通知
发布于 2016-01-18 23:42:52
看看http://doc.postsharp.net/aggregatable-adding或http://doc.postsharp.net/advisable-collections,我会说,您的类中缺少[Aggregatable]-Attributes。
https://stackoverflow.com/questions/32079234
复制相似问题