示例#1
0
 public UserLogic()
 {
     this.userDao      = DaoProvider.UserDao;
     this.awardDao     = DaoProvider.AwardDao;
     this.userAwardDao = DaoProvider.UserAwardDao;
     this.imageDao     = DaoProvider.ImageDao;
 }
示例#2
0
 public ImageLogic()
 {
     _userDao  = DaoLinker.userDao;
     _awardDao = DaoLinker.awardDao;
     _imageDao = DaoLinker.imageDao;
     MaxID     = GetAll().Select(x => x.Id).DefaultIfEmpty().Max();
 }
示例#3
0
 public HorseAdBus(IHorseAdDao iHorseAdDao, IUserDao iAuthDao, IAppointmentDao iAppointmentDao, IMailerService iMailerService, IImageDao iImageDao)
 {
     _iHorseAdDao     = iHorseAdDao;
     _iUserDao        = iAuthDao;
     _iMailerService  = iMailerService;
     _iAppointmentDao = iAppointmentDao;
     _iImageDao       = iImageDao;
 }
示例#4
0
 public ImageController(IImageDao imageDao)
 {
     _repository = new Repository <Brand>();
     _imageDao   = imageDao;
 }
示例#5
0
 public void Initialize()
 {
     target = new ImageDao(Database);
 }
示例#6
0
 public ImageLogic(IImageDao imageDao)
 {
     this.ImageDao = imageDao;
 }
示例#7
0
 public ImageLogic(IImageDao imageDao, ICacheLogic cacheLogic)
 {
     this.imagesDao  = imageDao;
     this.cacheLogic = cacheLogic;
 }
示例#8
0
 public ImageLogic()
 {
     this.imageDao = DaoProvider.ImageDao;
 }
 public SimpleImageService(IConnectionCreater connectionCreater)
 {
     imageDao = new SimpleImageDao(connectionCreater);
 }
        static DependencyResolver()
        {
            CfgDto config = new CfgDto();

            if (File.Exists(_path))
            {
                var           openCfgStream = File.Open(_path, FileMode.Open);
                XmlSerializer xCfg          = new XmlSerializer(typeof(CfgDto));
                config = (CfgDto)xCfg.Deserialize(openCfgStream);
            }
            else
            {
                var           openCfgStream = File.Open(_path, FileMode.Create);
                XmlSerializer xCfg          = new XmlSerializer(typeof(CfgDto));
                config.UserDao      = "default";
                config.UserLogic    = "default";
                config.AwardDao     = "default";
                config.AwardLogic   = "default";
                config.WebUserDao   = "default";
                config.WebUserLogic = "default";
                config.ImageDao     = "default";
                config.ImageDao     = "default";
                xCfg.Serialize(openCfgStream, config);
                openCfgStream.Close();
            }
            switch (config.UserDao)
            {
            case "db":
                _uDao = _uDao ?? (_uDao = new DbDAL.UserDao());
                break;

            default:
                _uDao = _uDao ?? (_uDao = new DAL.UserDao());
                break;
            }
            switch (config.UserLogic)
            {
            default:
                _uLogic = _uLogic ?? (_uLogic = new UserLogic(_uDao));
                break;
            }
            switch (config.AwardDao)
            {
            case "db":
                _aDao = _aDao ?? (_aDao = new DbDAL.AwardDao());
                break;

            default:
                _aDao = _aDao ?? (_aDao = new DAL.AwardDao());
                break;
            }
            switch (config.AwardLogic)
            {
            default:
                _aLogic = _aLogic ?? (_aLogic = new AwardLogic(_aDao));
                break;
            }
            switch (config.WebUserDao)
            {
            default:
                _wuDao = _wuDao ?? (_wuDao = new DbDAL.WebUserDao());
                break;
            }
            switch (config.WebUserLogic)
            {
            default:
                _wuLogic = _wuLogic ?? (_wuLogic = new WebUserLogic(_wuDao));
                break;
            }
            switch (config.ImageDao)
            {
            default:
                _imDao = _imDao ?? (_imDao = new DbDAL.ImageDao());
                break;
            }
            switch (config.ImageLogic)
            {
            default:
                _imLogic = _imLogic ?? (_imLogic = new ImageLogic(_imDao));
                break;
            }
        }
示例#11
0
 public PhotoManager(IPhotoDao photoDao, IImageDao imageDao)
 {
     _photoDao = photoDao ?? throw new ArgumentNullException(nameof(photoDao));
     _imageDao = imageDao ?? throw new ArgumentNullException(nameof(imageDao));
 }
示例#12
0
 public ImageLogic()
 {
     this.imageDao  = DaoProvider.ImageDao;
     this.validator = new Validator();
 }
示例#13
0
 public StoriesManager(IStoriesDao storiesDao, IImageDao imageDao)
 {
     _storiesDao = storiesDao ?? throw new ArgumentNullException(nameof(storiesDao));
     _imageDao   = imageDao ?? throw new ArgumentNullException(nameof(imageDao));
 }
示例#14
0
 public ImageLogic(IImageDao imageDao)
 {
     _imageDao = imageDao;
 }
 public AnnouncementManager(IImageDao imageDao, IAnnouncementDao announcementDao)
 {
     _imageDao        = imageDao ?? throw new ArgumentNullException(nameof(imageDao));
     _announcementDao = announcementDao ?? throw new ArgumentNullException(nameof(announcementDao));
 }
示例#16
0
 public ProductLogic()
 {
     this.productDao = DaoProvider.ProductDao;
     this.imageDao   = DaoProvider.ImageDao;
     this.validator  = new Validator();
 }
示例#17
0
 public AwardLogic()
 {
     this.awardDao = DaoProvider.AwardDao;
     this.imageDao = DaoProvider.ImageDao;
 }