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.Diagnostics.Contracts; | |
| public struct NonNullable<T> where T : class | |
| { | |
| private readonly T data; | |
| public NonNullable(T data) | |
| { | |
| if (data == null) |
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
| // New interface... | |
| using System.Threading.Tasks; | |
| public interface IAsyncSaver<T> | |
| { | |
| Task<T> Save(T item); | |
| } | |
| // Old way... |
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; | |
| using System.Collections.Generic; | |
| using System.Data.Common; | |
| using System.Data.Linq; | |
| using System.Data.Linq.SqlClient; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| using System.Reflection; |
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
| namespace ApprovalTests.Persistence.EntityFramework.Version6 | |
| { | |
| using System; | |
| using System.Data.Common; | |
| using System.Data.Entity; | |
| using System.Data.Entity.Core.EntityClient; | |
| using System.Data.Entity.Core.Objects; | |
| using System.Data.Entity.Infrastructure; | |
| using System.Linq; | |
| using System.Reflection; |
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.Text; | |
| using System.Web.Http; | |
| using ApprovalTests; | |
| using ApprovalUtilities.Utilities; |
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
| @powershell -ExecutionPolicy unrestricted .\bootmq.ps1 |
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 VerifyLog(Action code) | |
| { | |
| var memoryAppender = new MemoryAppender(); | |
| BasicConfigurator.Configure(memoryAppender); | |
| code.Invoke(); | |
| var aggregate = memoryAppender.GetEvents().Aggregate( | |
| string.Empty, | |
| (s, @event) => s + Environment.NewLine + @event.RenderedMessage); | |
| Approvals.Verify(aggregate); |
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
| // Note: Connection string must include the following option: Allow User Variables=True | |
| using System; | |
| using System.Data.Common; | |
| using System.Linq; | |
| using ApprovalUtilities.Persistence.Database; | |
| using MySql.Data.MySqlClient; | |
| public class MySqlCommandAdapter : IDatabaseToExecuteableQueryAdaptor |
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
| private static void VerifyConfig(string path, Action<Configuration> action) | |
| { | |
| using (var t = new TempFile(Path.GetRandomFileName())) | |
| { | |
| File.Copy(path, t.File.FullName, true); | |
| var fileMap = new ExeConfigurationFileMap { ExeConfigFilename = t.File.FullName }; | |
| var exeConfig = ConfigurationManager.OpenMappedExeConfiguration(fileMap, ConfigurationUserLevel.None); | |
| action.Invoke(exeConfig); | |
| var config = File.ReadAllText(exeConfig.FilePath); | |
| Approvals.Verify(config); |
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
| Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions | |
| choco install VisualStudio2013Ultimate | |
| choco install googlechrome | |
| choco install sublimetext2 | |
| choco install console2 | |
| choco install sourcecodepro | |
| choco install resharper | |
| choco install stylecop | |
| choco install git-credential-winstore |