0

I have a multitargeted domain project (SL and .Net 4.0) and with problem with Color and so on I was using #if SILVERLIGHT constructs, but now I need to have for a SL project using my domain project few classes implementing INotifyDataErrorInfo which is not implemented on .Net 4.0 site and I will never use it.

I would be gratefull for advice how to make something like this

public class MyDomainClass: INotifyPropertyChanged, #IF Silverlight INotifyDataErrorInfo
{
Aziz Shaikh
  • 16,245
  • 11
  • 62
  • 79
user278618
  • 19,306
  • 42
  • 126
  • 196

1 Answers1

1

Assuming you can use the partial keyword in silverlight:

public partial class MyDomainClass: INotifyPropertyChanged 
{
 // implement everything on INotifyPropertChanged 
}


#IF Silverlight 
public partial class MyDomainClass:INotifyDataErrorInfo 
{
     // implement everything on INotifyDataErrorInfo 
     // if needed using the stuff from the 'shared' class
}
#ENDIF
rene
  • 41,474
  • 78
  • 114
  • 152