コード例 #1
0
ファイル: CheckInQueryCommand.cs プロジェクト: zesus19/c5.v1
 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;
 }
コード例 #2
0
ファイル: TimeSyncCommand.cs プロジェクト: zesus19/c5.v1
 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;
 }
コード例 #3
0
ファイル: CardLogoutCommand.cs プロジェクト: zesus19/c5.v1
 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;
 }
コード例 #4
0
ファイル: SizeAllocCommand.cs プロジェクト: zesus19/c5.v1
 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;
 }