Exemple #1
0
 protected override void OnSessionChanged(Session session, SessionChange change)
 {
     Send.Invoke(Interpretor.Interpretate(session));
 }
Exemple #2
0
 public Supervisor(List <Pair <Container, Info> > soliders, List <Pair <Container, Info> > spells,
                   SimpleDatabase.Database database, int startSolidersCount, int startSpellsCount)
 {
     if ((this.database = database) == null)
     {
         throw new ArgumentNullException(nameof(database));
     }
     foreach (var f in soliders)
     {
         Soliders.Add(new Pair <Container, Pair <InterpretedObject, Info> >(f.Obj1, new Pair <InterpretedObject, Info>(Interpretor.Interpretate(f.Obj1), f.Obj2)));
     }
     foreach (var f in spells)
     {
         Spells.Add(new Pair <Container, Pair <InterpretedObject, Info> >(f.Obj1, new Pair <InterpretedObject, Info>(Interpretor.Interpretate(f.Obj1), f.Obj2)));
     }
     (sessionFounder = new Task(new Action(SessionFounder))).Start();
     StartSolidersCount = startSolidersCount;
     StartSpellsCount   = startSpellsCount;
 }