示例#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);
 }