public ContentFilePage()
 {
     InitializeComponent();
     _appSettingsProvider = NinjectContainer.Get<IAppSettingsProvider>();
     buildLocalizedAppbar();
     preferredFontSize = _appSettingsProvider.RetrieveSetting<double>(FontSizeSettingName, DefaultFontSize);
 }
Exemplo n.º 2
0
 public DocuSignService(ILogger logger, IRepository <DocuSignLog> repository, ITwilioApiSettingsProvider settings, IRepository <Case> caseRepository, IAppSettingsProvider appSettings) : base(logger)
 {
     this.repository     = repository;
     this.settings       = settings;
     this.caseRepository = caseRepository;
     this.appSettings    = appSettings;
 }
Exemplo n.º 3
0
        private void Initialize(IAppSettingsProvider appSettings)
        {
            AuthToken       = appSettings.Get("twilio:AuthToken");
            ApiKey          = appSettings.Get("twilio:ApiKey");
            ApiSecret       = appSettings.Get("twilio:ApiSecret");
            FromPhoneNumber = appSettings.Get("twilio:FromPhoneNumber");
            AppSid          = appSettings.Get("twilio:AppSID");

            Account = new TwilioApiSetting(appSettings.Get("twilio:AccountSID"));

            IpMessaging = new IpMessagingSettings {
                Service = new TwilioApiSetting(appSettings.Get("twilio:IpMessagingSID"))
            };

            Conversation = new TwilioConversationsSetting(appSettings.Get("twilio:ConversationsSID"));

            Docusign = new DocusignSetting(appSettings.Get("docusign:UserName"), appSettings.Get("docusign:Password"), appSettings.Get("docusign:IntegratorKey"));

            TaskRouter = new TaskRouterSettings {
                Workspace  = new TwilioApiSetting(appSettings.Get("twilio:WorkspaceSID")),
                Workflow   = new TwilioApiSetting(appSettings.Get("twilio:WorkflowSID")),
                Activities = new ActivitySettingsCollection {
                    Offline  = new ActivitySetting("Offline", appSettings.Get("twilio:OfflineActivitySID"), false),
                    Idle     = new ActivitySetting("Idle", appSettings.Get("twilio:IdleActivitySID"), false),
                    Busy     = new ActivitySetting("Busy", appSettings.Get("twilio:BusyActivitySID"), false),
                    Reserved = new ActivitySetting("Reserved", appSettings.Get("twilio:ReservedActivitySID"), false)
                }
            };
        }
Exemplo n.º 4
0
 public LetterService(IQueryProvider queryProvider, string schema) : base(queryProvider)
 {
     _hebrewDateService = NinjectBulder.Container.Get <IHebrewDateService>(new ConstructorArgument("schema", schema));
     _settingsProvider  = NinjectBulder.Container.Get <IAppSettingsProvider>(new ConstructorArgument("schema", schema));
     _schema            = schema;
     _xmlService        = new XMLService();
 }
Exemplo n.º 5
0
 public PayuService(IPaymentAuthorizeService paymentAuthorizeService, IPriceTresholdRepository pricesRepository,
                    IOrderService orderService, IAppSettingsProvider appSettingsProvider)
 {
     _paymentAuthorizeService = paymentAuthorizeService;
     _pricesRepository        = pricesRepository;
     _orderService            = orderService;
     _paymentSettings         = appSettingsProvider.GetPaymentSettings();
 }
Exemplo n.º 6
0
 public AppSettings(IAppSettingsProvider appSettingsProvider)
 {
     if (appSettingsProvider == null)
     {
         throw new ArgumentNullException(nameof(appSettingsProvider));
     }
     _appSettingsProvider = appSettingsProvider;
 }
Exemplo n.º 7
0
 public PictureServiceProxy(IAppSettingsProvider appSettingsProvider,
                            IWebClient webClient,
                            IMiniaturesCache miniaturesCache)
 {
     _appSettingsProvider = appSettingsProvider;
     _webClient           = webClient;
     _miniaturesCache     = miniaturesCache;
 }
Exemplo n.º 8
0
 public ConnectivityService(IAppSettingsProvider appSettingsProvider,
                            IWebClient webClient,
                            ILoggingService loggingService)
 {
     _appSettingsProvider = appSettingsProvider;
     _webClient           = webClient;
     _loggingService      = loggingService;
 }
 public BuildChangeRepository(
     IRestProxy restProxy,
     IAdapterResolver adapterResolver,
     IAppSettingsProvider settingsProvider)
 {
     _restProxy                = restProxy;
     _adapterResolver          = adapterResolver;
     _buildChangesFunctionPath = settingsProvider.ProvideSettings().AzureFunctionsSettings.GetBuildChangesByBuildIdPath;
 }
Exemplo n.º 10
0
 public CommandListRepository(ILoggerFactory logger, IAppSettingsProvider appSettingsProvider, IGlobalItemsProvider globalItemsProvider)
 {
     _logger = logger.CreateLogger <CommandListRepository>();
     _appSettingsProvider = appSettingsProvider;
     _globalItemsProvider = globalItemsProvider;
     CommandFile          = File.ReadAllText(_appSettingsProvider.DataFilesLocation + "\\CommandList.json");
     //gets directory from bin folder
     //CommandFile = File.ReadAllText(Environment.CurrentDirectory + "\\Game Tools\\DataFiles\\CommandList.json");
 }
Exemplo n.º 11
0
 public AccountService(
     IRepository <OwlFinanceAccount> accountRepository, IRepository <Case> caseRepository, IAppSettingsProvider appSettings, ILogger logger, IRepository <User> userRepository)
     : base(logger)
 {
     this.accountRepository = accountRepository;
     this.caseRepository    = caseRepository;
     this.appSettings       = appSettings;
     this.userRepository    = userRepository;
 }
 public WorkItemRepository(
     IRestProxy restProxy,
     IAppSettingsProvider settingsProvider,
     IAdapterResolver adapterResolver)
 {
     _restProxy       = restProxy;
     _adapterResolver = adapterResolver;
     _settings        = settingsProvider.ProvideSettings().AzureFunctionsSettings;
 }
Exemplo n.º 13
0
 public SettingsWindow(
     IAppSettingsProvider appSettingsProvider,
     IClient client)
 {
     _isVisible           = true;
     _appSettingsProvider = appSettingsProvider;
     _ultimaOnlinePath    = _appSettingsProvider.AppSettings.UltimaOnlinePath;
     _client = client;
 }
Exemplo n.º 14
0
        public ClassRepository(ILoggerFactory logger, IAppSettingsProvider appSettingsProvider)
        {
            _logger = logger.CreateLogger <ClassRepository>();
            _appSettingsProvider = appSettingsProvider;

            //Changed the way the path is constructed to ensure that this will work on any OS
            var file = Path.Combine(Environment.CurrentDirectory, _appSettingsProvider.DataFilesLocation, "ClassList.json");

            ClassFile = File.ReadAllText(file);
        }
Exemplo n.º 15
0
        public DepositService(IUnitOfWorkFactory uowfactory, 
                              IStockPositionCalculator stockPositionCalculator, 
                              IAppSettingsProvider<GlobalSettings> settingsProvider)
        {
            Guard.AgainstNull(() => uowfactory, () => stockPositionCalculator, () => settingsProvider);

            _uowFactory = uowfactory;
            _stockPositionCalculator = stockPositionCalculator;
            _settingsProvider = settingsProvider;
        }
Exemplo n.º 16
0
 public DataServiceFactory(ILocationContextFactory dataContextFactory,
                           IAppSettingsProvider appSettingsProvider,
                           IWebClient webClient,
                           IBitmapConverter bitmapConverter,
                           IMiniaturesCache miniaturesCache)
 {
     _dataContextFactory  = dataContextFactory;
     _appSettingsProvider = appSettingsProvider;
     _webClient           = webClient;
     _bitmapConverter     = bitmapConverter;
     _miniaturesCache     = miniaturesCache;
 }
Exemplo n.º 17
0
 public PropertiesViewModel(INavigationService navigationService,
                            IAppSettingsProvider appSettingsProvider,
                            IDataSourceGovernor dataSourceGovernor,
                            IConnectivityService connectivityService,
                            IDialogService dialogService)
 {
     _navigationService   = navigationService;
     _appSettingsProvider = appSettingsProvider;
     _dataSourceGovernor  = dataSourceGovernor;
     _connectivityService = connectivityService;
     _dialogService       = dialogService;
 }
Exemplo n.º 18
0
 public PdfServiceGenerator(IQueryProvider queryProvider, string schema)
     : base(queryProvider)
 {
     _settingsProvider   = NinjectBulder.Container.Get <IAppSettingsProvider>(new ConstructorArgument("schema", schema));
     _schema             = schema;
     _pdfTemplate        = NinjectBulder.Container.Get <IPdfTemplateFunctionality>();
     _transactionService =
         NinjectBulder.Container.Get <ITransactionService>(new ConstructorArgument("schema", schema));
     _letterService     = NinjectBulder.Container.Get <ILetterService>(new ConstructorArgument("schema", schema));
     _departmentService = NinjectBulder.Container.Get <IDepartmentService>(new ConstructorArgument("schema", schema));
     _templatesProvider = NinjectBulder.Container.Get <CustomTemplatesProvider>();
     _addressService    = NinjectBulder.Container.Get <IAddressService>(new ConstructorArgument("schema", schema));
 }
        public SmtpHostSettingsProvider(IAppSettingsProvider appSettingsProvider)
        {
            if (appSettingsProvider == null)
            {
                throw new ArgumentNullException("appSettingsProvider");
            }

            string host = appSettingsProvider.GetSetting(SmtpHostKey);
            int port = int.Parse(appSettingsProvider.GetSetting(SmtpPortKey));
            string username = appSettingsProvider.GetSetting(SmtpUsernameKey);
            string password = appSettingsProvider.GetSetting(SmtpPasswordKey);
            smtpHostSettings = new SmtpHostSettings(host, port, username, password);
        }
Exemplo n.º 20
0
 public AdminService(
     IRepository <User> userRepository,
     IAppSettingsProvider appSettings,
     OwlFinanceDbContext context,
     Auth0Service auth0,
     ILogger logger)
     : base(logger)
 {
     this.userRepository = userRepository;
     this.appSettings    = appSettings;
     this.context        = context;
     this.auth0          = auth0;
 }
Exemplo n.º 21
0
        public OpenFolderViewModel(IWindowService windowService, IDialogService dialogService, IFileSystem fileSystem,
                                   IPhotoDirectoryCreator photoDirectoryCreator, IPhotoDirectoryLoader photoDirectoryLoader, IRegionManager regionManager, IAppSettingsProvider appSettingsProvider)
        {
            _windowService         = windowService;
            _fileSystem            = fileSystem;
            _dialogService         = dialogService;
            _photoDirectoryCreator = photoDirectoryCreator;
            _photoDirectoryLoader  = photoDirectoryLoader;
            _regionManager         = regionManager;
            _appSettingsProvider   = appSettingsProvider;

            _folderPath = _appSettingsProvider.Current.LatestPhotoFolder ?? string.Empty;
        }
Exemplo n.º 22
0
 public LoggingInitializer(
     ILoggingConfigurationProvider loggingConfigurationProvider,
     IAppSettingsProvider appSettingsProvider,
     IAppIdProvider appIdProvider,
     ITempDirectorySettings tempDirectorySettings,
     ILogger logger)
 {
     this.loggingConfigurationProvider = loggingConfigurationProvider;
     this.appSettingsProvider          = appSettingsProvider;
     this.appIdProvider         = appIdProvider;
     this.tempDirectorySettings = tempDirectorySettings;
     this.logger = logger;
 }
Exemplo n.º 23
0
 public AgentService(
     IRepository <Agent> agentRepository,
     IRepository <Case> caseRepository,
     ITaskRouterManager taskRouter,
     IAppSettingsProvider appSettings,
     ILogger logger, AccountMatcher accountMatcher)
     : base(logger)
 {
     this.agentRepository = agentRepository;
     this.caseRepository  = caseRepository;
     this.taskRouter      = taskRouter;
     this.appSettings     = appSettings;
     this.accountMatcher  = accountMatcher;
 }
Exemplo n.º 24
0
        public SmtpHostSettingsProvider(IAppSettingsProvider appSettingsProvider)
        {
            if (appSettingsProvider == null)
            {
                throw new ArgumentNullException("appSettingsProvider");
            }

            string host     = appSettingsProvider.GetSetting(SmtpHostKey);
            int    port     = int.Parse(appSettingsProvider.GetSetting(SmtpPortKey));
            string username = appSettingsProvider.GetSetting(SmtpUsernameKey);
            string password = appSettingsProvider.GetSetting(SmtpPasswordKey);

            smtpHostSettings = new SmtpHostSettings(host, port, username, password);
        }
Exemplo n.º 25
0
 public CaseService(
     IRepository <Agent> agentRepository,
     IRepository <Case> caseRepository,
     IRepository <Transaction> transactionRepository,
     ITaskRouterManager taskRouter,
     IAppSettingsProvider appSettings,
     ILogger logger)
     : base(logger)
 {
     this.agentRepository       = agentRepository;
     this.caseRepository        = caseRepository;
     this.transactionRepository = transactionRepository;
     this.taskRouter            = taskRouter;
     this.appSettings           = appSettings;
 }
Exemplo n.º 26
0
        public MessageService(IUnitOfWork unitOfWork, ISmtpClient smtpClient, IAppSettingsProvider appSettingsProvider,
                              IEmailContentProvider emailContentProvider, IMessageRepository messageRepository, ITokenService tokenService, IMapper mapper)
            : base(messageRepository, unitOfWork, mapper)
        {
            _smtpSettings = appSettingsProvider.GetSmtpSettings();
            _smtpClient   = smtpClient;
            _mapper       = mapper;
            _smtpClient   = _mapper.Map <System.Net.Mail.Abstractions.SmtpClient>(_smtpSettings);

            _emailContentProvider = emailContentProvider;
            _messageRepository    = messageRepository;
            _tokenService         = tokenService;
            _unitOfWork           = unitOfWork;

            appSettingsProvider.GetAppSettings(AppSettingsType.DefaultSettings, AppSettingsType.Resources);
        }
Exemplo n.º 27
0
 public TransactionService(
     IRepository <Transaction> repository,
     IAppSettingsProvider appSettings,
     ILogger logger,
     IRepository <Customer> customerRepository,
     AccountMatcher accountMatcher,
     ISmsManager smsManager,
     IRepository <OwlFinanceAccount> accountRepository, IVoiceManager voiceManager)
     : base(logger)
 {
     this.appSettings        = appSettings;
     this.customerRepository = customerRepository;
     this.accountMatcher     = accountMatcher;
     this.smsManager         = smsManager;
     this.accountRepository  = accountRepository;
     this.voiceManager       = voiceManager;
     this.repository         = repository;
 }
Exemplo n.º 28
0
        public PlayerRepository(ILoggerFactory logger, IAppSettingsProvider appSettingsProvider)
        {
            _logger = logger.CreateLogger <PlayerRepository>();
            _appSettingsProvider = appSettingsProvider;
            //PlayerFilePath = $"{_appSettingsProvider.DataFilesLocation}\\PlayerList.json";
            PlayerFilePath = $"{Environment.CurrentDirectory}\\Game Tools\\DataFiles\\PlayerList.json";

            Settings = new JsonSerializerSettings()
            {
                TypeNameHandling    = TypeNameHandling.All,
                ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor
            };
            Players = loadPlayers();
            if (Players == null)
            {
                Players = new List <Player>();
            }
        }
Exemplo n.º 29
0
        public PlayerRepository(ILoggerFactory logger, IAppSettingsProvider appSettingsProvider)
        {
            _logger = logger.CreateLogger <PlayerRepository>();
            _appSettingsProvider = appSettingsProvider;
            var file = Path.Combine(_appSettingsProvider.DataFilesLocation, "PlayerList.json");

            //PlayerFilePath = $"{_appSettingsProvider.DataFilesLocation}\\PlayerList.json";
            PlayerFilePath = file;

            Settings = new JsonSerializerSettings()
            {
                TypeNameHandling    = TypeNameHandling.All,
                ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor
            };
            Players = loadPlayers();
            if (Players == null)
            {
                Players = new List <Player>();
            }
        }
Exemplo n.º 30
0
        public MainGame(ILogger logger, IAppSettingsProvider appSettingsProvider, IWindowService windowService)
        {
            _logger = logger;
            _appSettingsProvider = appSettingsProvider;
            _windowService       = windowService;

            _appSettingsProvider.Load();

            Content.RootDirectory    = "Content";
            Window.AllowUserResizing = true;
            //Window.IsBorderless = true;

            _graphics = new GraphicsDeviceManager(this)
            {
                PreferredBackBufferWidth  = 1200,
                PreferredBackBufferHeight = 768,
                PreferMultiSampling       = true,
                IsFullScreen          = false,
                SupportedOrientations = DisplayOrientation.LandscapeLeft | DisplayOrientation.LandscapeRight,
                GraphicsProfile       = GraphicsProfile.HiDef,
            };

            IsMouseVisible = true;
        }
Exemplo n.º 31
0
 public MerchantService(IRepository <Merchant> repository, IAppSettingsProvider appSettings, ILogger logger)
     : base(logger)
 {
     this.appSettings = appSettings;
     this.repository  = repository;
 }
 public LocationSnapshotDataServiceProxy(IAppSettingsProvider appSettingsProvider,
                                         IWebClient webClient)
 {
     _appSettingsProvider = appSettingsProvider;
     _webClient           = webClient;
 }
Exemplo n.º 33
0
 /// <summary>
 /// Initializes the <see cref="Sharpend.Configuration.ConfigurationManager"/> class.
 /// </summary>
 static ConfigurationManager()
 {
     appSettings = new StandardAppSettings();
 }
Exemplo n.º 34
0
 public BranchesProvider(IAppSettingsProvider appSettingsProvider)
 {
     _appSettingsProvider = appSettingsProvider;
     _cachedResult = _appSettingsProvider.RetrieveSetting<Dictionary<string, string>>(BranchesKey, new Dictionary<string, string>());
 }
Exemplo n.º 35
0
 public TempDirectorySettings(IAppSettingsProvider applicationSettings, ILogger logger)
 {
     this.applicationSettings = applicationSettings;
     this.logger      = logger;
     tmpRootDirectory = new Lazy <string>(CalculateTmpRootPath);
 }
 public CommitDetailsPage()
 {
     InitializeComponent();
     _appSettingsProvider = NinjectContainer.Get<IAppSettingsProvider>();
 }
Exemplo n.º 37
0
 public WebConfigSettings(IAppSettingsProvider settingsProvider)
 {
     this.settingsProvider = settingsProvider;
 }