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
| title Command Handling, Pessimistic Concurrency | |
| actor User | |
| boundary Handler | |
| boundary Repository | |
| entity BarInstance | |
| database EventStore | |
| autonumber | |
| User -> Handler : Set Foo = 2 on Bar\nwhere version = Y | |
| Handler -> Repository : Get Bar |
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
| title Command Handling, Standard Concurrency | |
| actor User | |
| boundary Handler | |
| boundary Repository | |
| entity BarInstance | |
| database EventStore | |
| autonumber | |
| User -> Handler : Set Foo = 2 on Bar | |
| Handler -> Repository : Get Bar |
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.Threading.Tasks; | |
| using Microsoft.Owin; | |
| using AppFunc = System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>; | |
| using MidFunc = System.Func< | |
| System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>, | |
| System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>>; | |
| public static class ChaosMiddleware |
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 ClassLibrary2 | |
| { | |
| using System; | |
| using System.Reactive; | |
| using AppFunc = System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>; | |
| using MidFunc = System.Func< | |
| System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>, | |
| System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>>; | |
| public static class RebuildablePipeline |
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 Chaos | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Threading.Tasks; | |
| using Microsoft.Owin; | |
| using AppFunc = System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>; | |
| using MidFunc = System.Func< | |
| System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>, | |
| System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>>; |
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 LibLog.Logging | |
| { | |
| using System; | |
| using System.IO; | |
| using System.Runtime.CompilerServices; | |
| using YourRootNamespace.Logging; | |
| public class Foo : IDisposable | |
| { | |
| private static ILog s_logger = LogProvider.For<Foo>(); |
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
| DROP TABLE dbo.Events | |
| DROP TABLE dbo.Streams | |
| CREATE TABLE dbo.Streams( | |
| StreamId CHAR(40) NOT NULL, | |
| StreamIdOriginal NVARCHAR(1000) NOT NULL, | |
| StreamIdInternal INT IDENTITY(1,1) NOT NULL, | |
| IsDeleted BIT NOT NULL DEFAULT ((0)), | |
| CONSTRAINT PK_Streams PRIMARY KEY CLUSTERED (StreamIdInternal) | |
| ); |
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.IO; | |
| using System.Net; | |
| using System.Threading.Tasks; | |
| using Microsoft.Owin; | |
| using Nowin; | |
| using AppFunc = System.Func<System.Collections.Generic.IDictionary<string, object>, System.Threading.Tasks.Task>; | |
| internal class Program | |
| { |
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 NancyAndNowin | |
| { | |
| using System; | |
| using System.Net; | |
| using System.Threading.Tasks; | |
| using Nancy.Owin; | |
| using Nowin; | |
| public class Program | |
| { |
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 class AutoFollowRedirectHttpMessageHandler : DelegatingHandler | |
| { | |
| public AutoFollowRedirectHttpMessageHandler(HttpMessageHandler inner) : base(inner) | |
| { } | |
| protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) | |
| { | |
| var response = await base.SendAsync(request, cancellationToken); | |
| while(response.StatusCode == HttpStatusCode.Moved || response.StatusCode == HttpStatusCode.Found) |