Exemplo n.º 1
0
 public VaultWallet(IVaultService vaultService, string vaultId, ILogManager logManager)
 {
     _logger       = logManager.GetClassLogger() ?? throw new ArgumentNullException(nameof(logManager));
     _vaultService = vaultService;
     _vaultId      = Guid.Parse(vaultId ?? throw new ArgumentNullException(nameof(vaultId)));
     _accounts     = new ConcurrentDictionary <Address, Guid>();
 }
Exemplo n.º 2
0
        public WalletService(IVaultService vaultService, IConfiguration configuration)
        {
            this.vaultService = vaultService;

            apiNetworkSection = configuration.GetSection(Constant.ApiNetwork);
            environment       = apiNetworkSection.GetValue <string>(Constant.Environment);
        }
Exemplo n.º 3
0
 public BusinessTests()
 {
     savedVault = new Vault();
     config     = ServiceMock.GetConfiguration();
     vault      = ServiceMock.GetVaultService(savedVault);
     TestHelper.CleanTestFolders(config);
     business = new GrimoireBusiness(new GrimoireService(config, new LogService(config)), vault);
 }
        public WalletReceivePaymentCommand(IServiceProvider serviceProvider)
        {
            actorService  = serviceProvider.GetService <IActorService>();
            console       = serviceProvider.GetService <IConsole>();
            vaultService  = serviceProvider.GetService <IVaultService>();
            walletService = serviceProvider.GetService <IWalletService>();

            actorService.MessagePump += ActorService_MessagePump;
        }
Exemplo n.º 5
0
        /// <summary>
        /// Initializes an instance of the <see cref="StorageService" /> class.
        /// </summary>
        /// <param name="keyVaultEndpoint">The Azure Key Vault endpoint address.</param>
        /// <param name="connectionString">Name of the secret that contains the Azure Storage connection string.</param>
        /// <returns>An instance of the <see cref="Task" /> class that represents the asynchronous operation.</returns>
        public async Task InitializeAsync(string keyVaultEndpoint, string connectionString)
        {
            vaultSerivce = new KeyVaultService(keyVaultEndpoint);

            if (!CloudStorageAccount.TryParse(
                    await vaultSerivce.GetSecretAsync(connectionString).ConfigureAwait(false),
                    out storageAccount))
            {
                throw new Exception("Unable to intialize the storage account. Please check the connection string setting.");
            }
        }
Exemplo n.º 6
0
 public OrdersController(IOrdersRepository ordersRepository,
                         ILogger <OrdersController> logger,
                         IConfiguration configuration,
                         ITelemetryClientFactory telemetryClientFactory,
                         IVaultService vaultService)
 {
     _ordersRepository       = ordersRepository;
     _logger                 = logger;
     _configuration          = configuration;
     _telemetryClientFactory = telemetryClientFactory;
     _vaultService           = vaultService;
 }
Exemplo n.º 7
0
 public FidectusManager(IFidectusAuthenticationService fidectusAuthenticationService, IFidectusService fidectusService, ITradeService tradeService,
                        ITradeSummaryService tradeSummaryService, IProfileService profileService, ISettingService settingService, IVaultService vaultService,
                        IFidectusMappingService fidectusMappingService, ILogger <FidectusManager> logger)
 {
     this.fidectusAuthenticationService = fidectusAuthenticationService;
     this.fidectusService        = fidectusService;
     this.tradeService           = tradeService;
     this.tradeSummaryService    = tradeSummaryService;
     this.profileService         = profileService;
     this.settingService         = settingService;
     this.vaultService           = vaultService;
     this.fidectusMappingService = fidectusMappingService;
     this.logger = logger;
 }
Exemplo n.º 8
0
 public EquiasManager(IEquiasAuthenticationService equiasAuthenticationService, IEquiasService equiasService, ITradeService tradeService, ITradeSummaryService tradeSummaryService,
                      ICashflowService cashflowService, IProfileService profileService, ISettingService settingService, IVaultService vaultService, IEquiasMappingService equiasMappingService,
                      ILogger <EquiasManager> logger)
 {
     this.equiasAuthenticationService = equiasAuthenticationService;
     this.equiasService        = equiasService;
     this.tradeService         = tradeService;
     this.equiasMappingService = equiasMappingService;
     this.vaultService         = vaultService;
     this.settingService       = settingService;
     this.logger = logger;
     this.tradeSummaryService = tradeSummaryService;
     this.cashflowService     = cashflowService;
     this.profileService      = profileService;
 }
Exemplo n.º 9
0
 public PartnerServiceConverter(IOptions <SmartOfficeOptions> options, IVaultService vault)
 {
     this.options = options.Value;
     this.vault   = vault;
 }
Exemplo n.º 10
0
        public MainForm(
            IServiceProvider serviceProvider             // TODO Refactor : injecting service factory is anti pattern
            , ILogger <MainForm> log
            , SessionContext sessionContext
            , IPlayerService playerService
            , IVaultService vaultService
            , IStashService stashService
            , IFontService fontService
            ) : base(serviceProvider)
        {
            this.userContext   = sessionContext;
            this.playerService = playerService;
            this.vaultService  = vaultService;
            this.stashService  = stashService;

            Log = log;
            Log.LogInformation("TQVaultAE Initialization !");

            InitForm();

            #region Apply custom font & scaling

            this.exitButton.Font = FontService.GetFontLight(12F, UIService.Scale);
            ScaleControl(this.UIService, this.exitButton);
            this.characterComboBox.Font = FontService.GetFontLight(13F, UIService.Scale);
            ScaleControl(this.UIService, this.characterComboBox, false);
            this.characterLabel.Font = FontService.GetFontLight(11F, UIService.Scale);
            ScaleControl(this.UIService, this.characterLabel, false);

            this.itemText.Font = FontService.GetFontLight(11F, FontStyle.Bold, UIService.Scale);

            this.vaultListComboBox.Font = FontService.GetFontLight(13F, UIService.Scale);
            ScaleControl(this.UIService, this.vaultListComboBox, false);
            this.vaultLabel.Font = FontService.GetFontLight(11F, UIService.Scale);
            ScaleControl(this.UIService, this.vaultLabel, false);
            this.configureButton.Font = FontService.GetFontLight(12F, UIService.Scale);
            ScaleControl(this.UIService, this.configureButton);
            this.customMapText.Font = FontService.GetFont(11.25F, UIService.Scale);
            ScaleControl(this.UIService, this.customMapText, false);
            this.showVaulButton.Font = FontService.GetFontLight(12F, UIService.Scale);
            ScaleControl(this.UIService, this.showVaulButton);
            this.secondaryVaultListComboBox.Font = FontService.GetFontLight(11F, UIService.Scale);
            ScaleControl(this.UIService, this.secondaryVaultListComboBox, false);
            this.aboutButton.Font = FontService.GetFontLight(8.25F, UIService.Scale);
            ScaleControl(this.UIService, this.aboutButton);
            this.titleLabel.Font = FontService.GetFontLight(24F, UIService.Scale);
            ScaleControl(this.UIService, this.titleLabel);
            this.searchButton.Font = FontService.GetFontLight(12F, UIService.Scale);
            ScaleControl(this.UIService, this.searchButton);
            ScaleControl(this.UIService, this.tableLayoutPanelMain);

            #endregion

            if (TQDebug.DebugEnabled)
            {
                // Write this version into the debug file.
                Log.LogDebug(
                    $@"Current TQVault Version: {this.currentVersion}
Debug Levels
{nameof(TQDebug.ArcFileDebugLevel)}: {TQDebug.ArcFileDebugLevel}
{nameof(TQDebug.DatabaseDebugLevel)}: {TQDebug.DatabaseDebugLevel}
{nameof(TQDebug.ItemAttributesDebugLevel)}: {TQDebug.ItemAttributesDebugLevel}
{nameof(TQDebug.ItemDebugLevel)}: {TQDebug.ItemDebugLevel}
");
            }

            // Process the mouse scroll wheel to cycle through the vaults.
            this.MouseWheel += new MouseEventHandler(this.MainFormMouseWheel);
        }
Exemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HomeController" /> class.
 /// </summary>
 /// <param name="repository">Data repository used to manage envrionment details.</param>
 /// <param name="vault">Provides access to an instance of Azure Key Vault.</param>
 public HomeController(IDocumentRepository <EnvironmentDetail> repository, IVaultService vault)
 {
     this.repository = repository;
     this.vault      = vault;
 }
Exemplo n.º 12
0
 public LdapAuthentication(IVaultService vaultService)
 {
     VaultService = vaultService ?? throw new ArgumentNullException(nameof(vaultService));
 }
Exemplo n.º 13
0
 public CsvImporterService(IVaultService vaultService)
 {
   this.VaultService = vaultService;
 }
Exemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AccountInfoStorage"/> class.
 /// </summary>
 public AccountInfoStorage(IVaultService vaultService, IFileStorageService fileStorageService)
 {
     _vaultService       = vaultService;
     _fileStorageService = fileStorageService;
 }
Exemplo n.º 15
0
 public ObjectTypeService(IVaultService vaultService)
 {
   this.VaultService = vaultService;
 }
Exemplo n.º 16
0
 public SecureScoreConverter(ILoggerFactory loggerFactory, IOptions <SmartOfficeOptions> options, IVaultService vault)
 {
     log          = loggerFactory?.CreateLogger("Host.Bindings.SecureScoreConverter");
     this.options = options.Value;
     this.vault   = vault;
 }
 public VaultConfigurationProvider(IVaultService vaultService, string prefix)
 {
     Service = vaultService ?? throw new ArgumentNullException(nameof(vaultService));
     Prefix  = prefix ?? throw new ArgumentNullException(nameof(prefix));
 }
Exemplo n.º 18
0
 public StorageService(IVaultService vaultService, IAccountInfoStorage accountInfoStorage)
 {
     VaultService       = vaultService;
     AccountInfoStorage = accountInfoStorage;
 }
Exemplo n.º 19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SmartOfficeExtensionConfig" /> class.
        /// </summary>
        /// <param name="nameResolver">Provides the ability to resolve settings.</param>
        /// <param name="options">The options available for Partner Smart Office.</param>
        public SmartOfficeExtensionConfig(ILoggerFactory loggerFactory, INameResolver nameResolver, IOptions <SmartOfficeOptions> options, IVaultService vault)
        {
            this.loggerFactory = loggerFactory;
            this.options       = options.Value;
            this.options.SetAppSettings(nameResolver);

            dataRepoConverter       = new DataRepositoryConverter(loggerFactory, options, vault);
            partnerServiceConverter = new PartnerServiceConverter(options, vault);
            secureScoreConverter    = new SecureScoreConverter(loggerFactory, options, vault);
            securityAlertConverter  = new SecurityAlertConverter(loggerFactory, options, vault);
        }
Exemplo n.º 20
0
 public ConnectionTestService(IVaultService vaultService)
 {
   this.VaultService = vaultService;
 }
Exemplo n.º 21
0
        public MainForm(
            IServiceProvider serviceProvider
            , ILogger <MainForm> log
            , SessionContext sessionContext
            , IPlayerService playerService
            , IVaultService vaultService
            , ISearchService searchService
            , IStashService stashService
            , IFontService fontService
            ) : base(serviceProvider)
        {
            this.userContext   = sessionContext;
            this.playerService = playerService;
            this.vaultService  = vaultService;
            this.searchService = searchService;
            this.stashService  = stashService;

            Log = log.Logger;
            Log.Info("TQVaultAE Initialization !");

            InitForm();

            #region Apply custom font & scaling

            this.exitButton.Font = FontService.GetFontAlbertusMTLight(12F, UIService.Scale);
            ScaleControl(this.UIService, this.exitButton);
            this.characterComboBox.Font = FontService.GetFontAlbertusMTLight(13F, UIService.Scale);
            ScaleControl(this.UIService, this.characterComboBox);
            this.characterLabel.Font = FontService.GetFontAlbertusMTLight(11F, UIService.Scale);
            ScaleControl(this.UIService, this.characterLabel);
            ScaleControl(this.UIService, this.itemTextPanel);

            ScaleControl(this.UIService, this.itemText);
            this.vaultListComboBox.Font = FontService.GetFontAlbertusMTLight(13F, UIService.Scale);
            ScaleControl(this.UIService, this.vaultListComboBox);
            this.vaultLabel.Font = FontService.GetFontAlbertusMTLight(11F, UIService.Scale);
            ScaleControl(this.UIService, this.vaultLabel);
            this.configureButton.Font = FontService.GetFontAlbertusMTLight(12F, UIService.Scale);
            ScaleControl(this.UIService, this.configureButton);
            this.customMapText.Font = FontService.GetFontAlbertusMT(11.25F, UIService.Scale);
            ScaleControl(this.UIService, this.customMapText);
            this.panelSelectButton.Font = FontService.GetFontAlbertusMTLight(12F, UIService.Scale);
            ScaleControl(this.UIService, this.panelSelectButton);
            this.secondaryVaultListComboBox.Font = FontService.GetFontAlbertusMTLight(11F, UIService.Scale);
            ScaleControl(this.UIService, this.secondaryVaultListComboBox);
            this.aboutButton.Font = FontService.GetFontAlbertusMTLight(8.25F, UIService.Scale);
            ScaleControl(this.UIService, this.aboutButton);
            this.titleLabel.Font = FontService.GetFontAlbertusMTLight(24F, UIService.Scale);
            ScaleControl(this.UIService, this.titleLabel);
            this.searchButton.Font = FontService.GetFontAlbertusMTLight(12F, UIService.Scale);
            ScaleControl(this.UIService, this.searchButton);

            #endregion

            if (TQDebug.DebugEnabled)
            {
                // Write this version into the debug file.
                Log.DebugFormat(CultureInfo.InvariantCulture, "Current TQVault Version: {0}", this.currentVersion);
                Log.Debug(string.Empty);
                Log.Debug("Debug Levels");
                Log.DebugFormat(CultureInfo.InvariantCulture, "ARCFileDebugLevel: {0}", TQDebug.ArcFileDebugLevel);
                Log.DebugFormat(CultureInfo.InvariantCulture, "DatabaseDebugLevel: {0}", TQDebug.DatabaseDebugLevel);
                Log.DebugFormat(CultureInfo.InvariantCulture, "ItemAttributesDebugLevel: {0}", TQDebug.ItemAttributesDebugLevel);
                Log.DebugFormat(CultureInfo.InvariantCulture, "ItemDebugLevel: {0}", TQDebug.ItemDebugLevel);
                Log.Debug(string.Empty);
            }

            // Set up Item strings
            Item.ItemWith           = Resources.ItemWith;
            Item.ItemRelicBonus     = Resources.ItemRelicBonus;
            Item.ItemRelicCompleted = Resources.ItemRelicCompleted;
            Item.ItemQuest          = Resources.ItemQuest;
            Item.ItemSeed           = Resources.ItemSeed;
            Item.ItemIT             = Resources.ItemIT;
            Item.ItemRagnarok       = Resources.ItemRagnarok;
            Item.ItemAtlantis       = Resources.ItemAtlantis;
            Item.ShowSkillLevel     = Config.Settings.Default.ShowSkillLevel;

            // Process the mouse scroll wheel to cycle through the vaults.
            this.MouseWheel += new MouseEventHandler(this.MainFormMouseWheel);
        }
Exemplo n.º 22
0
 public EntryDetailQueryHandler(PasswordManagerContext context, IVaultService vaultService) : base(context)
 {
     VaultService = vaultService;
 }
Exemplo n.º 23
0
 public FindObjectsService(IVaultService vaultService)
 {
     this.VaultService = vaultService;
 }
 public VaultConfigurationSource(IVaultService vaultService, string prefix)
 {
     _vaultService = vaultService ?? throw new ArgumentNullException(nameof(vaultService));
     _prefix       = prefix ?? throw new ArgumentNullException(nameof(prefix));
 }
 public CreateEntryCommandHandler(PasswordManagerContext context, UserResolverService userResolverService, IVaultService vaultService) : base(context)
 {
     UserResolverService = userResolverService;
     VaultService        = vaultService;
 }
Exemplo n.º 26
0
 public DestroyObjectService(IVaultService vaultService,
                             IFindObjectsService findObjectsService)
 {
     this.VaultService      = vaultService;
     this.FindObjectService = findObjectsService;
 }
Exemplo n.º 27
0
 public FindObjectsService(IVaultService vaultService)
 {
     this.VaultService = vaultService;
 }
Exemplo n.º 28
0
 public VaultConfigurationProviderTests(VaultServerFixture vaultFixture)
 {
     m_vault      = new VaultService(new Uri(vaultFixture.Address)).AuthenticateUsingToken(vaultFixture.Token);
     m_vaultUtils = new VaultUtils(vaultFixture.Token, vaultFixture.Address);
 }
Exemplo n.º 29
0
 public DestroyObjectService(IVaultService vaultService,
                             IFindObjectsService findObjectsService)
 {
   this.VaultService = vaultService;
   this.FindObjectService = findObjectsService;
 }
 public DeleteEntryCommandHandler(PasswordManagerContext context, IVaultService vaultService) : base(context)
 {
     VaultService = vaultService;
 }
Exemplo n.º 31
0
 public VaultModule(IVaultService vaultService, ILogManager logManager)
 {
     _vaultService = vaultService ?? throw new ArgumentNullException(nameof(vaultService));
     _logger       = logManager?.GetClassLogger() ?? throw new ArgumentNullException(nameof(logManager));
 }
Exemplo n.º 32
0
 public WalletCreateCommand(IServiceProvider serviceProvider)
 {
     console       = serviceProvider.GetService <IConsole>();
     walletService = serviceProvider.GetService <IWalletService>();
     vaultService  = serviceProvider.GetService <IVaultService>();
 }
 public EntriesListQueryHandler(PasswordManagerContext context, UserResolverService userResolverService, ICryptoService cryptoService, IVaultService vaultService) : base(context)
 {
     UserResolverService = userResolverService;
     CryptoService       = cryptoService;
     VaultService        = vaultService;
 }
Exemplo n.º 34
0
 public VaultUnsealCommand(IServiceProvider serviceProvider)
 {
     vaultService = serviceProvider.GetService <IVaultService>();
 }
Exemplo n.º 35
0
 public ClassesService(IVaultService vaultService)
 {
     this.VaultService = vaultService;
 }