public OrdersController(ILogger <OrdersController> logger, BGLContext bglContext, DateTimeService dateTimeService, ILogicContext <Order, OrderReport> logicContext)
 {
     this._logger          = logger;
     this._context         = bglContext;
     this._dateTimeService = dateTimeService;
     this._logicContext    = logicContext;
 }
 public ItemsController(ILogger <ItemsController> logger, IBGLContext bglContext, DateTimeService dateTimeService, ILogicContext <Item, ItemReport> logicContext)
 {
     this._logger          = logger;
     this._context         = bglContext;
     this._dateTimeService = dateTimeService;
     this._logicContext    = logicContext;
 }
Example #3
0
        public static void Customize([NotNull] ILogicContext initialContext)
        {
            if (initialContext == null)
            {
                throw new ArgumentNullException("initialContext");
            }

            lock (sync)
            {
                if (initialized)
                {
                    throw new Exception(
                        "Context has already been initialized. Call of any method causes initialization of the context. Context can be customized only once before initialization.");
                }

                initialized = true;

                context = initialContext;
            }
        }
        public void Init()
        {
            this.logicContext = new LogicContext(this.dbOptions);

            this.underTest = new LogicRepository(this.logicContext);
        }
Example #5
0
 internal static void Reset()
 {
     initialized = false;
     context = new DefaultLogicContext();
 }
Example #6
0
 public AjaxController(ILogicContext ALogicContext, IAppLogger AAppLogger)
 {
     FLogicContext = ALogicContext;
     FAppLogger    = AAppLogger;
 }