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 Paramol.SqlClient; | |
using Projac; | |
namespace Sample | |
{ | |
public static class PortfolioProjectionUsingBuilder | |
{ | |
public static readonly AnonymousSqlProjection Instance = new AnonymousSqlProjectionBuilder(). | |
When<PortfolioAdded>(@event => | |
TSql.NonQueryStatement( |
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
param ( | |
[Int] | |
$clusterSize, | |
[string] | |
$VMName, | |
[Int] | |
$nodeNumber, | |
[Int] | |
$IntIp, | |
[Int] |
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 static class PipingExtensions | |
{ | |
/// <summary> | |
/// Take an object, pipe it into a function, and return the result. | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <typeparam name="T2"></typeparam> | |
/// <param name="obj"></param> | |
/// <param name="f"></param> | |
/// <returns></returns> |
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
/// Code to bind mailbox processors to azure storage queues. | |
module AzureMailboxProcessor | |
open System | |
module private Async = | |
let AwaitTaskEmpty = Async.AwaitIAsyncResult >> Async.Ignore | |
module private Option = | |
let fromNullable (nullable:Nullable<_>) = if nullable.HasValue then Some nullable.Value else None | |
let toNullable = function |
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
; Reverse Scrolling Script by How-To Geek | |
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
#SingleInstance off | |
#MaxHotkeysPerInterval 1000 | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
WheelUp:: | |
Send {WheelDown} |
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
@ECHO OFF | |
SETLOCAL | |
SET VERSION=%1 | |
SET NUGET=buildsupport\nuget.exe | |
FOR %%G IN (packaging\nuget\*.nuspec) DO ( | |
%NUGET% pack %%G -Version %VERSION% -Symbols -o artifacts | |
) |
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 MethodInfo GetMethodInfo<TSource>(Expression<Action<TSource>> methodLambda) | |
{ | |
Type type = typeof(TSource); | |
var member = methodLambda.Body as MethodCallExpression; | |
if (member == null) | |
throw new ArgumentException(string.Format( | |
"Expression '{0}' does not refer to a method.", | |
methodLambda)); |
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 static class ContainerExtensions | |
{ | |
public static Delegate GetMessageHandlerForMessage(this ILifetimeScope lifetimeScope, object message) | |
{ | |
MethodInfo methodInfo = typeof(ContainerExtensions) | |
.GetMethods(BindingFlags.Static | BindingFlags.NonPublic) | |
.Single(m => m.Name == "GetMessageHandlerForMessageInternal"); | |
var methodInfo2 = methodInfo.MakeGenericMethod(new[] { message.GetType() }); |
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 class RelayAutofacInitializer : IAutofacInitializer | |
{ | |
private readonly IAutofacInitializer _autofacInitializer; | |
private readonly Action<ContainerBuilder> _init; | |
public RelayAutofacInitializer(IAutofacInitializer autofacInitializer, Action<ContainerBuilder> init) | |
{ | |
_autofacInitializer = autofacInitializer; | |
_init = init; | |
} |
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
[Test] | |
public void Assert_that_view_can_respond_to_events_via_bus_and_make_dto() | |
{ | |
var myRepo = _container.Resolve<IRepository<AllProductsViewDto>>(); | |
_bus.PublishEvents(new[] | |
{ | |
new ProductCreated("Bingo",100) | |
}); |
NewerOlder