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
| db.Commits.aggregate([ | |
| {$sort: {_id:1}}, | |
| {$unwind : "$Events"}, | |
| {$project : { _id:1, StreamId:1, event: '$Events.Payload.Body._t', body : '$Events.Payload.Body'}}, | |
| ]) |
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.Linq; | |
| using System.Reflection; | |
| using MongoDB.Bson.Serialization; | |
| namespace CQRS.Tests.DomainTests | |
| { | |
| public static class BsonClassMapHelper | |
| { |
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.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using Newtonsoft.Json; | |
| namespace James.Kernel.Model.Converters | |
| { | |
| public class TimeSpanJsonConverter : JsonConverter |
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 void On(ReminderSet e) | |
| { | |
| var utc = e.DueDate.ToUniversalTime().Add(-e.TimeBefore); | |
| var span = utc - DateTime.UtcNow; | |
| var cmd = new NotifyReminder(new ReminderId(e.AggregateId), e.MessageId); | |
| cmd.SetContextData("user.id", e.IssuedBy); | |
| _commandBus.Defer(span, cmd); | |
| } |
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 class NullDispatchSchedulerWireupExtensions | |
| { | |
| public static NullDispatchSchedulerWireup DoNotDispatchCommits(this Wireup wireup) | |
| { | |
| return new NullDispatchSchedulerWireup(wireup); | |
| } | |
| } | |
| public class NullDispatchSchedulerWireup : Wireup | |
| { |
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.Linq; | |
| using System.Reflection; | |
| using System.Web; | |
| using Elmah; | |
| using Microsoft.AspNet.SignalR.Hubs; | |
| namespace App.Website.Support.SignalrPipelineExtensions | |
| { |
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 ResponseContentMd5Handler : DelegatingHandler | |
| { | |
| protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, | |
| System.Threading.CancellationToken cancellationToken) | |
| { | |
| HttpResponseMessage response = await base.SendAsync(request, cancellationToken); | |
| if (response.IsSuccessStatusCode && response.Content != null) | |
| { | |
| response.Content.Headers.ContentMD5 = await MD5Helper.ComputeHash(response.Content); |
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
| [TestFixture] | |
| public class DynamicTest | |
| { | |
| public class Dto | |
| { | |
| public string Value { get; set; } | |
| } | |
| public Dto ToDto(dynamic d) | |
| { |
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 APP.Domain | |
| { | |
| public class FactoryClassMap : BsonClassMap | |
| { | |
| public FactoryClassMap(Type classType, IDeserializationFactory factory) : base(classType) | |
| { | |
| Func<object> factoryDelegate = factory.Create; | |
| MapCreator(factoryDelegate); | |
| AutoMap(); | |
| } |
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
| traceroute to 216.81.59.173 (216.81.59.173), 100 hops max, 60 byte packets | |
| 1 router1-dal.linode.com (67.18.7.161) 0.698 ms 0.685 ms 0.756 ms | |
| 2 xe-2-0-0.car03.dllstx2.networklayer.com (67.18.7.89) 0.341 ms 0.326 ms 0.311 ms | |
| 3 po101.dsr02.dllstx2.networklayer.com (70.87.254.77) 0.584 ms 0.663 ms 0.665 ms | |
| 4 po22.dsr02.dllstx3.networklayer.com (70.87.255.69) 0.809 ms 0.861 ms 0.947 ms | |
| 5 ae17.bbr02.eq01.dal03.networklayer.com (173.192.18.230) 0.501 ms 0.478 ms 0.451 ms | |
| 6 ae7.bbr01.eq01.dal03.networklayer.com (173.192.18.208) 0.475 ms 0.653 ms 10gigabitethernet3-1.core1.dal1.he.net (206.223.118.37) 6.020 ms | |
| 7 10gigabitethernet3-1.core1.dal1.he.net (206.223.118.37) 1.455 ms 1.581 ms 10gigabitethernet5-4.core1.atl1.he.net (184.105.213.114) 21.941 ms | |
| 8 10gigabitethernet5-4.core1.atl1.he.net (184.105.213.114) 22.013 ms 216.66.0.26 (216.66.0.26) 20.970 ms 21.238 ms | |
| 9 10.26.26.102 (10.26.26.102) 58.340 ms 56.423 ms 216.66.0.26 (216.66.0.26) 20.832 ms |