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.Collections; | |
// ReSharper disable UnusedMember.Local | |
#pragma warning disable S1172 // Unused method parameters should be removed | |
#pragma warning disable S1144 // Unused private types or members should be removed | |
namespace NStore.Domain.Tests.ProcessManagerTests | |
{ | |
public class CheckoutState | |
{ | |
public bool PaymentReceived { get; private 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
var admin = db.getSiblingDB('admin'); | |
var dbs = db.adminCommand( { listDatabases: 1 } ); | |
dbs.databases.forEach(function(db){ | |
if(db.name !== 'admin' && db.name !== 'local'){ | |
admin.getSiblingDB(db.name).dropDatabase(); | |
} | |
}) |
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
KBD ITDev "Italian - Developer (backtick & tilde)" | |
COPYRIGHT "(c) 2017 Company" | |
COMPANY "Company" | |
LOCALENAME "it-IT" | |
LOCALEID "00000410" |
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
// http://channel9.msdn.com/events/Build/2015/3-644 | |
function sortByName(a){ | |
var result = a.slice(0); | |
result.sort(function(x,y){ | |
return x.name.localCompare(y.name); | |
}) | |
} | |
sortByName(5); |
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
{ | |
swagger: "2.0", | |
info: { | |
version: "v1", | |
title: "Documenstore api", | |
description: null, | |
termsOfService: null, | |
contact: null, | |
license: null, | |
vendorExtensions: {} |
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.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using James.Kernel.Model.Jobs; | |
using James.Tests.Support; | |
using James.Tests.Support.SampleData; | |
using log4net; |
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 Jarvis.DocumentStore.Core.CommandHandlers.HandleHandlers; | |
using Jarvis.DocumentStore.Core.Domain.Document.Commands; | |
using Jarvis.DocumentStore.Core.Domain.Handle; | |
using Jarvis.DocumentStore.Core.ReadModel; | |
namespace Jarvis.DocumentStore.Core.CommandHandlers.DocumentHandlers | |
{ | |
public class CreateDocumentCommandHandler : DocumentCommandHandler<CreateDocument> | |
{ | |
readonly IHandleMapper _mapper; |
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
db.halloween.drop() | |
tags = []; | |
[1,2,3,4].forEach(function(num){ | |
tags.push(''+num); | |
db.halloween.insert({ | |
num: NumberInt(num), | |
tags:tags | |
}) | |
}) |
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
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 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 | |
{ |
NewerOlder