This file contains hidden or 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
| Windows Registry Editor Version 5.00 | |
| [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Windows] | |
| "ErrorMode"="2" | |
| [HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting] | |
| "DontShowUI"="1" |
This file contains hidden or 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() | |
| { | |
| DoShiz(); | |
| } | |
| public async void DoShiz() | |
| { | |
| var worker = new Worker(); | |
| var ex = await ThrowsExceptionAsync<ArgumentException>(async () => await worker.GetMessage(" ")); | |
| var ex2 = await ThrowsExceptionAsync<ArgumentException>(() => worker.GetMessage(" ")); |
This file contains hidden or 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 abstract class nsw_police_files : IntegrationTestBase | |
| { | |
| protected abstract void RunTests(); | |
| [Fact] | |
| public void Automate() | |
| { | |
| RunTest(Setup, Jurisdictions.NSW); | |
| RunTests(); | |
| } |
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Net.Http; | |
| using System.Threading.Tasks; | |
| using Xunit; | |
| public class Fixture | |
| { | |
| [Fact] | |
| public void Should_FactMethodName() |
This file contains hidden or 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 SomeScreen | |
| { | |
| public string Text {get;set;} // Will look for a UI element called Text and return it's value | |
| public void Ok() { } // Finds a control called ok, and clicks it | |
| // Other conventions | |
| public string Text2 | |
| { |
This file contains hidden or 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 static void ReturnsValueAsTask<T>(this Task<T> value, T returnThis, params T[] returnThese) | |
| { | |
| Returns(MatchArgs.AsSpecifiedInCall, ToCompletedTask(returnThis), returnThese.Select(ToCompletedTask).ToArray()); | |
| } | |
| public static void ReturnsValueAsTask<T>(this Task<T> value, Func<CallInfo, T> returnThis) | |
| { | |
| Returns(MatchArgs.AsSpecifiedInCall, c => ToCompletedTask(returnThis(c))); | |
| } |
This file contains hidden or 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
| <Window.InputBindings> | |
| <KeyBinding Modifiers="Ctrl" Key="S" Command="{Binding SaveDocumentCommand}" /> | |
| <KeyBinding Modifiers="Ctrl+Shift" Key="S" Command="{Binding SaveAllDocumentsCommand}" /> | |
| <KeyBinding Modifiers="Ctrl" Key="N" Command="{Binding NewDocumentCommand}" /> | |
| <KeyBinding Modifiers="Ctrl+Shift" Key="P" Command="{Binding PublishDocumentCommand}" /> | |
| <KeyBinding Modifiers="Ctrl" Key="O" Command="{Binding OpenDocumentCommand}" /> | |
| <KeyBinding Modifiers="Ctrl+Shift" Key="O" Command="{Binding OpenFromWebCommand}" /> | |
| <KeyBinding Modifiers="Ctrl" Key="W" Command="{Binding CloseDocumentCommand}" /> | |
| <KeyBinding Key="Escape" Command="commands:ShellCommands.Esc" /> |
This file contains hidden or 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 async void SaveDocument() | |
| { | |
| if (IsWorking) return; | |
| var doc = MDI.ActiveItem as DocumentViewModel; | |
| if (doc != null) | |
| { | |
| using (DoingWork(string.Format("Saving {0}", doc.MarkpadDocument.Title))) | |
| { | |
| await doc.Save(); | |
| await TaskEx.Delay(5000); |
This file contains hidden or 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
| //Need http://nuget.org/packages/Microsoft.Bcl.Async | |
| internal static class WebRequestExtensions | |
| { | |
| internal static Task<WebResponse> GetResponseAsync(this WebRequest request, TimeSpan timeout) | |
| { | |
| var asyncTask = Task.Factory.FromAsync<WebResponse>(request.BeginGetResponse, request.EndGetResponse, null); | |
| var timeoutTask = TaskEx.Delay(timeout); | |
| return TaskEx.WhenAny(asyncTask, timeoutTask) |
This file contains hidden or 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
| # Auto detect text files and perform LF normalization | |
| * text=auto | |
| # Custom for Visual Studio | |
| *.cs diff=csharp | |
| *.sln merge=union | |
| *.csproj merge=union | |
| *.vbproj merge=union | |
| *.fsproj merge=union | |
| *.dbproj merge=union |