Peter Gfader's brain noise

A couple of nice features in this base class for viewmodels:

  1. Strongly typed Property notification for databinding
  2. Automatic Method Execution

Code samples for #1

public string Text
{
    get { return Get(() => Text); }
    set { Set(() => Text, value); }
}

Code samples for #2

    public double Score
    {
        get { return Get(() => Score); }
        set { Set(() => Score, value); }
    }

    [DependsUpon("Score")]
    public void WhenScoreChanges()
    {
        // Handle this case
    }
Blog comments powered by Disqus