我有一个Application
需要用 INotifyPropertyChanged 事件覆盖的类。我已经编写了覆盖原始类并最终创建的逻辑SuperApplication
我正在从库中提取数据,并且无法更改加载逻辑。我只需要一种方法将原始类中的数据获取到我的超类中。我已经尝试过类似的东西,superClass = (SuperApplication)standardClass;
但它没有奏效。
我该怎么做呢?
如果有帮助,这是我用来覆盖原始类的代码:
public class SuperCreditApplication : CreditApplication
{
public SuperCreditApplicant Applicant { get; set; }
public SuperCreditApplicant CoApplicant { get; set; }
}
public class SuperCreditApplicant : CreditApplicant
{
public SuperProspect Prospect { get; set; }
}
public class SuperProspect : Prospect, INotifyPropertyChanged
{
public State DriverLicenseState
{
get
{
return DriverLicenseState;
}
set
{
DriverLicenseState = value;
OnPropertyChanged("DriverLicenseState");
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}