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
this.unityContainer | |
.RegisterAutoFactoryFor<ICustomer, Customer>() | |
.WithoutParameters(); | |
this.unityContainer | |
.RegisterAutoFactoryFor<ICustomerViewModel, CustomerViewModel>() | |
.WithParam<ICustomer>(); |
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 void Main() | |
{ | |
var unityContainer = new UnityContainer(); | |
unityContainer | |
.RegisterTypedFactory<IFooFactory>() | |
.ForConcreteType<Foo>(); | |
} |
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 interface IFooFactory | |
{ | |
#region Public Methods and Operators | |
IFoo Create(int id); | |
#endregion | |
} |
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 abstract class DataSegmentSpecs | |
{ | |
[TriangulatedFixture] | |
public class after_instantiating_Sut_with_triangulated_values : SubjectInstantiationContextSpecification<DataSegment> | |
{ | |
#region Context | |
[TriangulationValues(0x00001000u, 0x80100000)] | |
private uint InjectedAddress { get; set; } |
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
/// <summary> | |
/// Deserializes a file from within a ZIP archive using the <see cref="BinaryFormatter"/> and passing a specified context object. | |
/// </summary> | |
/// <param name="zipFilePath"> | |
/// The ZIP file path. | |
/// </param> | |
/// <param name="entryPath"> | |
/// The path of the file to deserialize within the ZIP file. | |
/// </param> | |
/// <param name="deserializationContext"> |
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
RequestInterceptor requestInterceptor = new RequestInterceptor() { | |
@Override | |
public void intercept(RequestFacade request) { | |
String authenticationToken = ...; | |
if (authenticationToken != "") | |
request.addHeader("Authorization", String.format("Bearer %s", authenticationToken)); | |
} | |
}; | |
RestAdapter restAdapter = new RestAdapter.Builder() |
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
# Boxstarter options | |
$Boxstarter.RebootOk=$true # Allow reboots? | |
$Boxstarter.NoPassword=$false # Is this a machine with no login password? | |
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot | |
# Basic setup | |
Update-ExecutionPolicy RemoteSigned | |
Set-CornerNavigationOptions -EnableUsePowerShellOnWinX | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Enable-MicrosoftUpdate |
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
# Boxstarter options | |
$Boxstarter.RebootOk=$true # Allow reboots? | |
$Boxstarter.NoPassword=$false # Is this a machine with no login password? | |
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot | |
# Basic setup | |
Update-ExecutionPolicy RemoteSigned | |
Set-CornerNavigationOptions -EnableUsePowerShellOnWinX | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Enable-MicrosoftUpdate |
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
$queriesPath = "$linqpadDir\Queries" | |
$snippetsPath = "$linqpadDir\Snippets" | |
if (-not (Test-Path "$env:APPDATA\LINQPad")) { | |
[Void] (mkdir "$env:APPDATA\LINQPad") | |
} | |
$linqpadDir = "$HOME\Dropbox\Briefcase\Personal\Code\LINQPad" | |
$queriesPath | Out-File "$env:APPDATA\LINQPad\querypath.txt" -Encoding ASCII | |
$queriesPath | Out-File "$env:APPDATA\LINQPad\QueryLocations.txt" -Encoding ASCII | |
$snippetsPath | Out-File "$env:APPDATA\LINQPad\SnippetLocations.txt" -Encoding ASCII |
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
using System; | |
using System.Runtime.CompilerServices; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace DeveloperOnTheFlow | |
{ | |
public struct DispatcherSwitchTaskAwaitable | |
{ | |
readonly ConfiguredTaskAwaiter configuredTaskAwaiter; |
OlderNewer