Beispiel #1
0
        public static void Create <TCommand, TTarget>(this ICommandExecutionContext context, ITypedCommandHandler <TCommand, TTarget> handler)
            where TCommand : TypedCommand <TTarget>
        {
            var typeAttribute = AttributeBasedObjectTypeMapping.GetTypeAttibute(typeof(TTarget));

            context.Create(ObjectTypeId.Parse(typeAttribute.TypeIdValue));
        }
Beispiel #2
0
 public void Handle(TestingCommand command, ICommandExecutionContext context)
 {
     context.Create(this);
 }
Beispiel #3
0
 public void Handle(CreateUnitCommand command, ICommandExecutionContext context)
 {
     context.Create(this);
     context.ModifyAttribute(this, x => x.Name, command.Name);
     context.ModifyAttribute(this, x => x.Address, command.Address);
 }
Beispiel #4
0
 public void Handle(CreateHierarchyCommand command, ICommandExecutionContext context)
 {
     context.Create(this);
 }
Beispiel #5
0
 public void Handle(CreateHierarchyNodeCommand command, ICommandExecutionContext context)
 {
     context.Create(this);
     context.Attach(this, x => x.Unit, command.UnitId);
     context.Attach(this, x => x.Context, command.HierarchyId);
 }
 public void Handle(CreateObjectCommand command, ICommandExecutionContext context)
 {
     context.Create(command.ObjectTypeId);
 }