public Example(IProjectionContext projectionContext, MeasurementReadByDeviceTypePartitionerProjection projection, EventReader eventReader, DeviceSimulator deviceSimulator, IConsole console) { _projectionContext = projectionContext; _projection = projection; _eventReader = eventReader; _deviceSimulator = deviceSimulator; _console = console; }
public Server(IProjectionContext projectionContext, EventReader eventReader, IConsole console, Projections.OrderHandler orderHandler, WebServer webServer) { _projectionContext = projectionContext; _eventReader = eventReader; _console = console; _orderHandler = orderHandler; _webServer = webServer; }
public ProjectionContext(T data, IProjectionContext projectionContext) : base(projectionContext) { Contract.Requires(projectionContext != null); Contract.Requires(data != null); Data = data; }
public Example(IProjectionContext projectionContext, MeasurementReadAveragePerDayProjection projection, EventReader eventReader, DeviceSimulator deviceSimulator, IConsole console, MeasurementReadAveragePerDayQuery query) { _projectionContext = projectionContext; _projection = projection; _eventReader = eventReader; _deviceSimulator = deviceSimulator; _console = console; _query = query; }
public MeasurementReadAveragePerDayProjection(IProjectionContext projectionsContext) { if (projectionsContext == null) { throw new ArgumentNullException("projectionsContext"); } _projectionsContext = projectionsContext; }
public IrresponsibleGamblingDetectorProjection(IProjectionContext projectionsContext) { if (projectionsContext == null) { throw new ArgumentNullException("projectionsContext"); } _projectionsContext = projectionsContext; }
public MeasurementReadByDeviceTypePartitionerProjection(IProjectionContext projectionsContext) { if (projectionsContext == null) { throw new ArgumentNullException("projectionsContext"); } _projectionsContext = projectionsContext; }
public void Write(IProjectionContext <TParent> context, IMediaNode node) { var value = context.ValueFor(_accessor); if (value != null) { _projector.Project(AttributeName, (T)value, node); } }
public void Project(IProjectionContext <DebitApplied> context) { if (_state == null) { throw new ApplicationException("Account has not been created"); } _state.Balance = context.Data.NewBalance; }
public OrderHandler(IProjectionContext projectionsContext) { if (projectionsContext == null) { throw new ArgumentNullException("projectionsContext"); } _projectionsContext = projectionsContext; }
public GameOverToPlayerDistributorProjection(IProjectionContext projectionsContext) { if (projectionsContext == null) { throw new ArgumentNullException("projectionsContext"); } _projectionsContext = projectionsContext; }
public MeasurementReadCounterQuery(IEventStoreConnection connection, IProjectionContext projectionContext, IConsole console) { if (connection == null) throw new ArgumentNullException("connection"); if (console == null) throw new ArgumentNullException("console"); _connection = connection; _projectionContext = projectionContext; _console = console; }
public Example(IProjectionContext projectionContext, EventReader eventReader, GameSimulator simulator, IConsole console, GameOverToPlayerDistributorProjection distributorProjection, IrresponsibleGamblingDetectorProjection detectorProjection, IrresponsibleGamblerAlarmPublisher irresponsibleGamblerAlarmPublisher) { _projectionContext = projectionContext; _eventReader = eventReader; _simulator = simulator; _console = console; _distributorProjection = distributorProjection; _detectorProjection = detectorProjection; _irresponsibleGamblerAlarmPublisher = irresponsibleGamblerAlarmPublisher; }
public void Project(IProjectionContext <Created> context) { if (_state == null) { _state = new Account(context.Data.AccountId, context.Data.Balance); } else { throw new ApplicationException("Account already created"); } }
public void Write(IProjectionContext <T> context, IMediaNode node) { var value = context.Values.ValueFor(_accessor); if (value == null) { return; } var childNode = node.AddChild(_name); var runner = typeof(ChildRunner <>).CloseAndBuildAs <IChildRunner>(value, value.GetType()); runner.Project(context, childNode, node, _name); }
public void Write(IProjectionContext <TParent> context, IMediaNode node) { var list = node.AddList(NodeName, LeafName ?? NodeName); var elements = ElementSource(context); var projection = ProjectionSource(context); elements.Each(element => { var childNode = list.Add(); var childContext = context.ContextFor(element); projection.Write(childContext, childNode); }); }
void IProjection <TParent> .Write(IProjectionContext <TParent> context, IMediaNode node) { var value = _source(context); if (value == null) { return; } var childNode = node.AddChild(_name); var childContext = context.ContextFor(value); write(childContext, childNode); }
public MeasurementReadCounterQuery(IEventStoreConnection connection, IProjectionContext projectionContext, IConsole console) { if (connection == null) { throw new ArgumentNullException("connection"); } if (console == null) { throw new ArgumentNullException("console"); } _connection = connection; _projectionContext = projectionContext; _console = console; }
void IProjection <TParent> .Write(IProjectionContext <TParent> context, IMediaNode node) { var value = context.ValueFor(_accessor) as TChild; if (value == null) { return; } var childNode = node.AddChild(_name); var childContext = context.ContextFor(value); write(childContext, childNode); }
public void Project <T>(IProjectionContext <T> context, IMediaNode childNode, IMediaNode parentNode, string nodeName) { var connegGraph = context.Service <ConnegSettings>().Graph; var projectionType = connegGraph.WriterTypesFor(typeof(TValue)) .FirstOrDefault(x => x.CanBeCastTo <IProjection <TValue> >() && x.IsConcreteWithDefaultCtor()); var childContext = context.ContextFor(_value); if (projectionType == null) { parentNode.SetAttribute(nodeName, _value); } else { var projection = Activator.CreateInstance(projectionType).As <IProjection <TValue> >(); projection.Write(childContext, childNode); } }
public void Project(IProjectionContext context) { var genericContextType = CreateGenericType(typeof(IProjectionContext <>), context.Data.GetType()); var genericContext = Activator.CreateInstance(CreateGenericType(typeof(ProjectionContext <>), context.Data.GetType()), new object[] { context.Data, context }); foreach (var m in GetType().GetMethods()) { if (m.Name == "Project") { foreach (var p in m.GetParameters()) { Contract.Assume(p != null); if (p.ParameterType == genericContextType) { m.Invoke(this, new object[] { genericContext }); return; } } } } }
public void Project(IProjectionContext context) { Contract.Requires(context != null); throw new NotImplementedException(); }
public void Write(IProjectionContext <T> context, IMediaNode node) { new TProjection().Write(context, node); }
public IrresponsibleGamblingDetectorProjection(IProjectionContext projectionsContext) { if (projectionsContext == null) throw new ArgumentNullException("projectionsContext"); _projectionsContext = projectionsContext; }
public void Write(IProjectionContext <Target> context, IMediaNode node) { TheTarget = context.Subject; TheNode = node; }
public void Write(IProjectionContext <ProjectionModel> context, IMediaNode node) { theTarget = context; theNode = node; }
public void Write(IProjectionContext <T> context, IMediaNode node) { _writer(context, node); }
public GameOverToPlayerDistributorProjection(IProjectionContext projectionsContext) { if (projectionsContext == null) throw new ArgumentNullException("projectionsContext"); _projectionsContext = projectionsContext; }
public static string FormattedValueOf <T>(this IProjectionContext <T> context, Accessor accessor) { return(context.Formatter.GetDisplayForValue(accessor, context.ValueFor(accessor))); }
public OrderHandler(IProjectionContext projectionsContext) { if (projectionsContext == null) throw new ArgumentNullException("projectionsContext"); _projectionsContext = projectionsContext; }
public static string FormattedValueOf <T>(this IProjectionContext <T> context, Expression <Func <T, object> > expression) { return(context.FormattedValueOf(expression.ToAccessor())); }
public MeasurementReadByDeviceTypePartitionerProjection(IProjectionContext projectionsContext) { if (projectionsContext == null) throw new ArgumentNullException("projectionsContext"); _projectionsContext = projectionsContext; }
void IProjection <T> .Write(IProjectionContext <T> context, IMediaNode node) { write(context, node); }
protected void write(IProjectionContext <T> context, IMediaNode node) { _values.Each(x => x.Write(context, node)); }
public void Write(IProjectionContext <T> context, IMediaNode node) { context.Service <TProjection>().Write(context, node); }
public MeasurementReadAveragePerDayProjection(IProjectionContext projectionsContext) { if (projectionsContext == null) throw new ArgumentNullException("projectionsContext"); _projectionsContext = projectionsContext; }