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 interface IRecordProcessor | |
{ | |
Response Process(Record[] records); | |
} | |
public class Response | |
{ | |
public bool Success { get; set; } | |
} |
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
function Install-VSCommandPrompt($version = "2013") | |
{ | |
switch ($version) | |
{ | |
2013 { $toolsVersion = "120" } | |
2012 { $toolsVersion = "110" } | |
2010 { $toolsVersion = "100" } | |
2008 { $toolsVersion = "90" } | |
2005 { $toolsVersion = "80" } |
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
ObservableProviderConfiguration.RegisterProvider("System.Data.SqlServerCe.4.0", setAsDefault:true); |
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
Hub.ConnectionOpening += (sender, args) => | |
{ | |
// your code here | |
}; | |
Hub.ConnectionClosing += (sender, args) => | |
{ | |
// your code here | |
}; |
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
<# | |
.SYNOPSIS | |
IlMerges an assembly with its dependencies. Depends on nuget being installed in the PATH. | |
.PARAMETER targetProject | |
The name of the project to be ilmerged | |
.PARAMETER outputAssembly | |
The name of the ilmerged assembly when it is created |
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 interface IRepository : IDisposable | |
{ | |
IQueryable<T> Find<T>() where T: class; | |
T Get<T>(object key) where T : class; | |
void Save(object value); | |
void Delete(object value); |
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 interface IMapper | |
{ | |
IMapperLink From<TInput>(TInput input); | |
} | |
public interface IMapperLink | |
{ | |
TOutput To<TOutput>(); | |
} |
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 interface ICommand<in TRequest, out TResponse> : IDisposable | |
{ | |
TResponse Execute(TRequest request); | |
} | |
/// <summary> | |
/// Use Request.Empty when the command doesn't need any arguments. | |
/// </summary> | |
public class Request | |
{ |
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
[Test] | |
public void ApiDocumentation() | |
{ | |
// Arrange | |
var builder = Substitute.For<IBuilder>(); | |
builder.Create<string>().From(5.0m).Returns("Five"); | |
// Act | |
var result = builder.Create<string>().From(5.0m); | |
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 InjectionBinding | |
{ | |
public Type RegistrationKey { get; set; } | |
public IList<object> Implementations { get; set; } | |
public Type[] GetImplementationTypes() | |
{ | |
return Implementations.Select(row => row.GetType()).ToArray(); | |
} | |
} | |
OlderNewer