Skip to content

Instantly share code, notes, and snippets.

@JohanLarsson
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JohanLarsson/e4bcb677a339b93461b4 to your computer and use it in GitHub Desktop.
Save JohanLarsson/e4bcb677a339b93461b4 to your computer and use it in GitHub Desktop.
Task save = new Task(new Action(() => _orderService.SaveOrderParametersAsync(parameters)));
save.Start();
Task.WaitAny(new Task[] { save });
public class DoubleUpDown : CommonUpDown<double>
{
protected override object ValidateValue(object value) // yeah we use object here and duplicate it (same with a bunch of methods more)
{
double v = (double)value;
if (v > this.MaxValue)
{
v = this.MaxValue;
}
if (v < this.MinValue)
{
v = this.MinValue;
}
return v;
}
}
public event PropertyChangedEventHandler PropertyChanged
{
add { _propertyChanged += value; }
remove { _propertyChanged += value; } // += here then comment out the test that catches it!!!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment