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; | |
using SimpleCQRS2.Example.Domain; | |
using SimpleCQRS2.Example.Messages; | |
namespace SimpleCQRS2.Example.Handlers | |
{ | |
public class CommandHandler | |
{ | |
SomeReadModelUpdater sru; |
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 TaskWorkflow : AggregateRoot | |
{ | |
private Dictionary<Guid,ManualTask> Tasks = new Dictionary<Guid,ManualTask>(); | |
public void InitiateTaskWorkflow(Guid taskWorkflowId, Guid associatedChangeRequest, string createdBy); | |
public void CreateTask(Guid taskIdentifier, string title,string description, DateTime plannedStartDate, DateTime | |
plannedEndDate, string assignedUser, string assignedGroup, string | |
createBy, WorkflowStage requiredCompletionStage); | |
public void RejectTaskOwnerShip(long taskId, string rejectedBy) | |
; |
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
// POC CQRS bus for stateless synchronous commandhandlers | |
// and both both syncronous and asynchronous stateless eventhandlers | |
// Remarks : ToJans@twitter | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Threading; |
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
// another attempt to combine CQRS with BDD | |
// tojans@twitter | |
using System; | |
using System.Linq; | |
using System.Collections; | |
using System.Collections.Generic; | |
#region Domain commands |
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
// SoWhat.cs - An example of a possible .Net web framework looking like Sinatra | |
// tojans@twitter | |
using System; | |
using System.Collections.Generic; | |
public class ContactController | |
{ | |
public class Contact | |
{ | |
public string Name; |
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
// an example minimalistic approach to CQRS/BDD | |
// Tojans@twitter | |
// Me need a macro to convert a function call to a Command IMHO | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
#region "Old code: ordinary interface" |
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 AnotherInterfaceForCQRS | |
{ | |
public interface IConsume<TChange> | |
{ | |
void Consume(TChange change); | |
} | |
public interface IRun<THandler,TCommand> | |
{ | |
void Run(THandler handler,TCommand command); |
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
void UpdateWifiAndTime(object par) | |
{ | |
// Logger.WriteLine(()=>"Begin update wifi and time"); | |
while (true) | |
{ | |
try { | |
var store = par as VMStore; | |
var s = DateTime.Now.ToShortTimeString(); |
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
ReferenceError: session is not defined | |
at Object.<anonymous> (eval at <anonymous> (/usr/local/lib/node/.npm/coffeekup/0.2.2/package/lib/coffeekup.js:186:12)) | |
at anonymous (eval at <anonymous> (/usr/local/lib/node/.npm/coffeekup/0.2.2/package/lib/coffeekup.js:186:12)) | |
at Object.render (/usr/local/lib/node/.npm/coffeekup/0.2.2/package/lib/coffeekup.js:206:12) | |
at Object.render (/usr/local/lib/node/.npm/zappa/0.1.4/package/lib/zappa.coffee:472:26) | |
at Object.<anonymous> (eval at <anonymous> (/usr/local/lib/node/.npm/zappa/0.1.4/package/lib/zappa.coffee:626:12)) | |
at RequestHandler.anonymous [as handler] (eval at <anonymous> (/usr/local/lib/node/.npm/zappa/0.1.4/package/lib/zappa.coffee:626:12)) | |
at RequestHandler.execute (/usr/local/lib/node/.npm/zappa/0.1.4/package/lib/zappa.coffee:443:21) | |
at Object.<anonymous> (/usr/local/lib/node/.npm/zappa/0.1.4/package/lib/zappa.coffee:250:26) | |
at param (/usr/local/lib/node/.npm/connect/0.5.6/package/lib/connect/middleware/router.js:147:21) |
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 IUpdaterUI | |
{ | |
string Message {set;} | |
int Progress {set;} | |
bool AllowContinue {set;} | |
bool AllowCancel {set;} | |
void Close(); | |
} | |