Inheritance: AppActs.Model.Settings
Ejemplo n.º 1
0
 public DeviceService(IDeviceRepository deviceRepository, IErrorRepository errorRepository,
                      IEventRepository eventRepository, ICrashRepository crashRepository, IFeedbackRepository feedbackRepository,
                      ISystemErrorRepository systemErrorRepository, IAppUserRepository appUserRepository,
                      AppActs.Repository.Interface.IApplicationRepository applicationRepository, AppActs.API.Model.Settings settings)
 {
     this.deviceRepository      = deviceRepository;
     this.errorRepository       = errorRepository;
     this.eventRepository       = eventRepository;
     this.crashRepository       = crashRepository;
     this.feedbackRepository    = feedbackRepository;
     this.systemErrorRepository = systemErrorRepository;
     this.appUserRepository     = appUserRepository;
     this.applicationRepository = applicationRepository;
     this.settings = settings;
 }
 public DeviceService(IDeviceRepository deviceRepository, IErrorRepository errorRepository,
     IEventRepository eventRepository, ICrashRepository crashRepository, IFeedbackRepository feedbackRepository,
     ISystemErrorRepository systemErrorRepository, IAppUserRepository appUserRepository,
      AppActs.Repository.Interface.IApplicationRepository applicationRepository, AppActs.API.Model.Settings settings)
 {
     this.deviceRepository = deviceRepository;
     this.errorRepository = errorRepository;
     this.eventRepository = eventRepository;
     this.crashRepository = crashRepository;
     this.feedbackRepository = feedbackRepository;
     this.systemErrorRepository = systemErrorRepository;
     this.appUserRepository = appUserRepository;
     this.applicationRepository = applicationRepository;
     this.settings = settings;
 }
Ejemplo n.º 3
0
        protected void Application_Start(object sender, EventArgs e)
        {
            string connectionString = ConfigurationManager.ConnectionStrings["connectionString"].ConnectionString;
            string database = ConfigurationManager.AppSettings["database"];

            IServiceLocator serviceLocator = new ServiceLocatorCastle(
                new InstallRepository(connectionString, database),
                new InstallService()
            );

            Settings settings = new Settings();
            settings.DataLoggingRecordRaw = Boolean.Parse(ConfigurationManager.AppSettings["data.logging.record.rawData"]);
            settings.DataLoggingRecordSystemErrors = Boolean.Parse(ConfigurationManager.AppSettings["data.logging.record.systemErrors"]);

            serviceLocator.Register<Settings>(settings);

            this.Application.Add(ContainerKeys.APPLICATION, serviceLocator);
        }