उदाहरण के लिए मैंक्या मैं समय कोड पुनर्लेखन संकलन के लिए Roslyn का उपयोग कर सकता हूं?
public string Bar
{
get { return this.bar; }
set
{
if (value != this.bar)
{
this.phoneNumberValue = value;
PropertyChanged(this, new PropertyChangedEventArgs("Bar"));
}
}
}
को,
class Foo: INotifyPropertyChanged {
public event PropertyChangedEventHandler PropertyChanged;
public int Bar {get;set;}
}
मैं फू वर्ग एएसटी हो और बार फिर से लिखने, संकलन समय में समय होता है।
एफवाईआई आप आज इस https://github.com/SimonCropp/Fody – Simon
के साथ ऐसा कर सकते हैं उस कोड का स्थान ले जाया गया था। यह अब [github.com/Fody/Fody] (http://github.com/Fody/Fody) पर है – JKor