Beispiel #1
0
 protected override IInstruction BuildInstruction(DuplexMessage commandMessage)
 {
     var instrSet = new InstructionSet(this);
     using (var scope = ObjectHost.Host.BeginLifetimeScope())
     {
         instrSet.AddInstruction(scope.Resolve<CheckInQueryInstruction>(
             new NamedParameter("command", this),
             new NamedParameter("parameter", commandMessage.GetContent<object>())));
         instrSet.AddInstruction(scope.Resolve<CheckInReplyInstruction>(
             new NamedParameter("parameter", commandMessage.GetContent<object>())));
     }
     return instrSet;
 }
Beispiel #2
0
 protected override Rpc.Serial.IInstruction BuildInstruction(Rpc.Net.Message.DuplexMessage commandMessage)
 {
     var instrSet = new InstructionSet(this);
     using (var scope = ObjectHost.Host.BeginLifetimeScope())
     {
         foreach(var addr in commandMessage.GetContent<TimeSync>().DestinationAddrs)
         {
             instrSet.AddInstruction(scope.Resolve<TimeSyncInstruction>(
                     new NamedParameter("command", this),
                     new NamedParameter("parameter", addr)));
         }
     }
     return instrSet;
 }
Beispiel #3
0
 protected override Rpc.Serial.IInstruction BuildInstruction(Rpc.Net.Message.DuplexMessage commandMessage)
 {
     var instrSet = new InstructionSet(this);
     var cardAssign = commandMessage.GetContent<CardAssign>();
     using (var scope = ObjectHost.Host.BeginLifetimeScope())
     {
         foreach (var card in cardAssign.Units)
         {
             instrSet.AddInstruction(scope.Resolve<CardLogoutInstruction>(
                 new NamedParameter("command", this),
                 new NamedParameter("parameter", card)));
         }
     }
     return instrSet;
 }
Beispiel #4
0
 protected override Rpc.Serial.IInstruction BuildInstruction(Rpc.Net.Message.DuplexMessage commandMessage)
 {
     var instrSet = new InstructionSet(this);
     var sizeAlloc = commandMessage.GetContent<SizeAlloc>();
     using (var scope = ObjectHost.Host.BeginLifetimeScope())
     {
         instrSet.AddInstruction(scope.Resolve<SizeAllocInstruction>(
             new NamedParameter("command", this),
             new NamedParameter("parameter", sizeAlloc)));
         foreach (var unit in sizeAlloc.GradeUnits)
         {
             instrSet.AddInstruction(scope.Resolve<ClassroomProfileSyncInstruction>(
                 new NamedParameter("command", this),
                 new NamedParameter("parameter", unit)));
         }
     }
     return instrSet;
 }