Example #1
0
		public BREFactory(DispatchException exceptionHandler,
	                    DispatchLog logHandler,
	                    DispatchRuleResult resultHandler) {
			this.exceptionHandler = exceptionHandler;
			this.logHandler = logHandler;
		  this.resultHandler = resultHandler;
		}
Example #2
0
 public BREFactory(DispatchException exceptionHandler,
                   DispatchLog logHandler,
                   DispatchRuleResult resultHandler)
 {
     this.exceptionHandler = exceptionHandler;
     this.logHandler       = logHandler;
     this.resultHandler    = resultHandler;
 }
Example #3
0
		public BRECloneFactory(IRulesDriver rulesDriver,
	                         DispatchException exceptionHandler,
	                         DispatchLog logHandler,
	                         DispatchRuleResult resultHandler)
		{
			if (rulesDriver == null)
				throw new BREException("A non-null IRulesDriver must be passed to BRECloneFactory");

			this.rulesDriver = rulesDriver;
			
			if (bref == null)
				bref = new BREFactory(exceptionHandler, logHandler, resultHandler);
		}
Example #4
0
        public void LogDispatch(DiscordMember requestor, DiscordMember acceptor = null)
        {
            try
            {
                var newLog = new DispatchLog();
                newLog.RequestorName = requestor.Username;
                newLog.RequestorOrg  = requestor.Guild.Name;
                newLog.AcceptorName  = acceptor.Username;
                newLog.AcceptorOrg   = acceptor.Guild.Name;

                MultiBotDb.DispatchLog.Add(newLog);
                MultiBotDb.SaveChanges();
            } catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Example #5
0
        public BRECloneFactory(IRulesDriver rulesDriver,
                               DispatchException exceptionHandler,
                               DispatchLog logHandler,
                               DispatchRuleResult resultHandler)
        {
            if (rulesDriver == null)
            {
                throw new BREException("A non-null IRulesDriver must be passed to BRECloneFactory");
            }

            this.rulesDriver = rulesDriver;

            if (bref == null)
            {
                bref = new BREFactory(exceptionHandler, logHandler, resultHandler);
            }
        }
Example #6
0
 public BRECloneFactory(IRulesDriver rulesDriver,
                        DispatchException exceptionHandler,
                        DispatchLog logHandler) : this(rulesDriver, exceptionHandler, logHandler, null)
 {
 }
Example #7
0
		public BREFactory(DispatchException exceptionHandler,
		                  DispatchLog logHandler):	this(exceptionHandler, logHandler, null) {}
Example #8
0
 public BREFactory(DispatchException exceptionHandler,
                   DispatchLog logHandler) :      this(exceptionHandler, logHandler, null)
 {
 }
Example #9
0
		public BRECloneFactory(IRulesDriver rulesDriver,
	                         DispatchException exceptionHandler,
	                  			 DispatchLog logHandler):this(rulesDriver, exceptionHandler, logHandler, null) {}