Example #1
0
        public MasterController()
        {
            var factory = MvcApplication.SessionFactory;

            NhSession = factory.OpenSession();
            resolver = new AttackResolver(MvcApplication.CombatantFactory);
            sender = new AttackSender(NhSession, resolver);
            sender.CheckPeriodicAttacks();

            ////using (var transaction = NhSession.BeginTransaction())
            ////{
            ////    Identity identity = new Identity() { Id = Guid.NewGuid(), Name = "René" };

            ////    NhSession.Save(identity);
            ////    transaction.Commit();
            ////}
            //factory.Close();
        }
Example #2
0
 public AttackSender(ISession nhSession, AttackResolver attackResolver)
 {
     NhSession = nhSession;
     this.attackResolver = attackResolver;
 }