Properties for CSLA
Hello,
I have been using R# to create my properties (alt+ins) and that works great. The next few projects are using CSLA as a framework and their properties are not a simple get/set like normal properties, they each call methods. Is there a way to modify the template to auto-generate the properties with the extra stuff I need?
Example of a normal property:
public string foo
{
get{ return _foo;}
set{ _foo = value;}
}
Example of CSLA property
public stirng foo
{
get
{
CanReadProperty();
return _foo;
}
set
{
CanWriteProperty();
_foo = value;
PropertyChanged();
}
}
I dont want to have to write those redundant lines of code for each property. Is there any hope for R# to do this for me? I am willing to template something out, I just don't know where to begin.
Thanks for the insight!
-Jeff
Please sign in to leave a comment.
I have found PropMan to be a helpful Visual Studio extension. Hoping Visual Studio or Resharper add this feature soon.