Пример #1
0
        public void Init()
        {
            _catRepo     = new CategoryRepository();
            _catProvider = new CategoryProvider(_catRepo);

            _colRepo     = new CollectionRepository();
            _colProvider = new CollectionProvider(_colRepo);

            _actRepo     = new ActiveRepository();
            _actProvider = new ActiveProvider(_actRepo);
        }
        public ActiveController(IActiveRepository actRepo, IActiveProvider actProvider)
        {
            if (actRepo != null)
            {
                this._activeRepository = actRepo;
            }
            else
            {
                this._activeRepository = new ActiveRepository();
            }

            if (actProvider != null)
            {
                this._activeProvider = actProvider;
            }
            else
            {
                this._activeProvider = new ActiveProvider(this._activeRepository);
            }
        }