2011-05-05 132 views
0

喜,SQLMetal产生这样的代码:C#SQLMetal生成的代码

[Column(Storage = "_specimen", DbType = "VarChar(100)")] 
    public string Specimen 
    { 
     get 
     { 
      return this._specimen; 
     } 
     set 
     { 
      if ((this._specimen != value)) 
      { 
       this.OnSpecimenChanging(value); 
       this.SendPropertyChanging(); 
       this._specimen = value; 
       this.SendPropertyChanged("specimen"); 
       this.OnSpecimenChanged(); 
      } 
     } 
    } 

什么OnSpecimenChanging,所有这些方法呢?并且this.SendPropertyChanged("specimen");的样本是否必须全部大写或不区分大小写?

回答

0

很难说没有看到任何源代码就能完成它们。 SendPropertyChanged最有可能用于引发PropertyChanged事件,该事件将通知任何订阅者事件特定属性已更改。 PropertyChangedEventArgs中的PropertyName字符串区分大小写,因此S需要大写。

欲了解更多信息:

http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged.aspx

http://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanging.aspx