예제 #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));
        }
예제 #2
0
 public void Handle(TestingCommand command, ICommandExecutionContext context)
 {
     context.Create(this);
 }
예제 #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);
 }
예제 #4
0
 public void Handle(CreateHierarchyCommand command, ICommandExecutionContext context)
 {
     context.Create(this);
 }
예제 #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);
 }