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
//_fixture.Call(patient, "UpdateDemographics"); | |
//call a method with values from autofixture. | |
public static T Call<T>(this T component, Fixture fixture, string methodName) where T : class | |
{ | |
var methodInfo = typeof(T).GetMethod(methodName); | |
var fixtureCreateMethod = typeof(SpecimenFactory) | |
.GetMethods() | |
.Where(m => m.Name == "Create" && m.IsGenericMethodDefinition) |
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
# TeamCity's auto-incrementing build counter; ensures each build is unique | |
$buildNumber = "%build.number%" | |
$deploymentProject = "%deploymentTarget%" | |
# This gets the name of the current Git branch. | |
$branch = "%teamcity.build.branch%" | |
# Sometimes the branch will be a full path, e.g., 'refs/heads/master'. | |
# If so we'll base our logic just on the last part. | |
if ($branch.Contains("/")) |
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
- Overall Area (with Rating NC, M, NB, O), there should be 3-4 of these | |
- Highlights (Achievements and Outstanding) | |
- Areas for improvement (with Rating NC or M) | |
- How you are going to improve | |
- Leave out NB |
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
<Target Name="AfterBuild"> | |
<Message Text="@(Content)" Importance="high" Condition="%(Content.Extension) == '.sql'" /> | |
<Error Condition="%(Content.Extension) == '.sql'" Text="The following scripts are marked as Content and must be changed to Embedded Resource: @(Content)" /> | |
</Target> |
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
^!z:: | |
SetTitleMatchMode RegEx | |
IfWinExist, .*NextGen.*Visual Studio | |
WinKill ; use the window found above | |
Run, "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" C:\dev\Centium\nextgen\NextGen.sln ; your sln | |
return |
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
^!p:: Send {Media_Play_Pause} | |
^!]:: Send {Media_Next} | |
^![:: Send {Media_Prev} | |
^!;:: Send {Volume_Down} | |
^!':: Send {Volume_Up} | |
^!l:: Send {Volume_Mute} |
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
//via http://stackoverflow.com/questions/578967/how-can-i-write-a-unit-test-to-determine-whether-an-object-can-be-garbage-collec | |
[Test] | |
public void MyTest() | |
{ | |
WeakReference reference = null; | |
new Action(() => | |
{ | |
var service = new Service(); | |
// Do things with service that might cause a memory leak... |
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
<ControlTemplate x:Key="BusyIndicatorProgressBarControlTemplate" TargetType="telerik:RadProgressBar"> | |
<Grid> | |
<VisualStateManager.VisualStateGroups> | |
<VisualStateGroup x:Name="CommonStates"> | |
<VisualState x:Name="Determinate"/> | |
<VisualState x:Name="Indeterminate"> | |
<Storyboard RepeatBehavior="Forever"> | |
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="IndeterminateDonut" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)"> | |
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="360"/> | |
</DoubleAnimationUsingKeyFrames> |
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
void Main() | |
{ | |
var h = Compose(Domain.ToContract, Herp.FromContract); | |
var mapped = Contacts.Select(h); | |
mapped.Dump(); | |
} | |
public class Domain | |
{ | |
//maintain a mapping to our public contract classes |
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
ColumnSettings.Values.Select(c => Observable.FromEventPattern<PropertyChangedEventHandler, PropertyChangedEventArgs> | |
(h => c.PropertyChanged += h, h => c.PropertyChanged -= h)) | |
.Merge() | |
.Throttle(TimeSpan.FromMilliseconds(1000)) | |
.Subscribe(e => _updateSettingsAction.Execute(null)); |