Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //original:
- [Required]
- public string SomeProperty
- {
- get { return someProperty; }
- set
- {
- someProperty = value;
- if (isInSomeMode) return;
- //do some stuff
- }
- }
- //weaved:
- [Required]
- public string SomeProperty
- {
- get
- {
- return this.someProperty;
- }
- set
- {
- if (!object.Equals(this.someProperty, value))
- {
- this.someProperty= value;
- if (!this.isInSomeMode)
- {
- //do some stuff
- base.NotifyOfPropertyChange("SomeProperty");
- }
- }
- }
- }
- //what i would expect:
- [Required]
- public string SomeProperty
- {
- get
- {
- return this.someProperty;
- }
- set
- {
- if (!object.Equals(this.someProperty, value))
- {
- this.someProperty= value;
- if (!this.isInSomeMode)
- {
- //do some stuff
- }
- base.NotifyOfPropertyChange("SomeProperty");
- }
- }
- }
- //I expect the notification every time this.someProperty != value (don't care other code)
Add Comment
Please, Sign In to add comment