Last active
August 29, 2015 14:09
-
-
Save JohanLarsson/e4bcb677a339b93461b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task save = new Task(new Action(() => _orderService.SaveOrderParametersAsync(parameters))); | |
save.Start(); | |
Task.WaitAny(new Task[] { save }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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