Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:Osma.Mobile.App.Services.AgentContextProvider" /> class.
        /// </summary>
        /// <param name="walletService">Wallet service.</param>
        /// <param name="poolService">The pool service.</param>
        /// <param name="provisioningService">The provisioning service.</param>
        /// <param name="keyValueStoreService">Key value store.</param>
        public AgentContextProvider(IWalletService walletService,
                                    IPoolService poolService,
                                    IProvisioningService provisioningService,
                                    IKeyValueStoreService keyValueStoreService,
                                    IEdgeClientService edgeClientService,
                                    IConnectionService connectionService,
                                    IMessageService messageService,
                                    IWalletRecordService recordService
                                    //IAgentProvider agentProvider
                                    )
        {
            _poolService          = poolService;
            _provisioningService  = provisioningService;
            _walletService        = walletService;
            _keyValueStoreService = keyValueStoreService;
            _edgeClientService    = edgeClientService;
            _connectionService    = connectionService;
            _messageService       = messageService;
            _recordService        = recordService;
            //_agentProvider = agentProvider;

            if (_keyValueStoreService.KeyExists(AgentOptionsKey))
            {
                _options = _keyValueStoreService.GetData <AgentOptions>(AgentOptionsKey);
            }
        }
 public CloudWalletService(
     IAgentProvider agentProvider,
     IEdgeClientService cloudServiceClient,
     ILogger <CloudWalletService> logger)
 {
     this.agentProvider = agentProvider;
     this.logger        = logger;
     this.serviceClient = cloudServiceClient;
 }
Example #3
0
 public EdgeConnectionService(
     IEdgeClientService edgeClientService,
     IEventAggregator eventAggregator,
     IWalletRecordService recordService,
     IProvisioningService provisioningService,
     ILogger <DefaultConnectionService> logger)
     : base(eventAggregator, recordService, provisioningService, logger)
 {
     this.edgeClientService = edgeClientService;
 }
 public InboxController(
     IAgentLoader agentLoader,
     IEdgeClientService edgeClientService,
     IMessageService messageService
     )
 {
     _agentLoader           = agentLoader;
     this.edgeClientService = edgeClientService;
     this.messageService    = messageService;
 }
Example #5
0
        public async Task StartHost()
        {
            Host = CreateHostBuilder(walletId, agentName, imageUrl, endpointUri).Build();
            try
            {
                await Host.StartAsync();

                agentContext = await Host.Services.GetRequiredService <IAgentProvider>().GetContextAsync();

                connectionService = Host.Services.GetRequiredService <IConnectionService>();
                edgeClientService = Host.Services.GetRequiredService <IEdgeClientService>();
                messageService    = Host.Services.GetRequiredService <IMessageService>();
            }
            catch (Exception ex) { Console.WriteLine(ex.Message); }
        }
 public EdgeProvisioningService(
     IProvisioningService provisioningService,
     IConnectionService connectionService,
     IMessageService messageService,
     IEdgeClientService edgeClientService,
     IWalletRecordService recordService,
     IAgentProvider agentProvider,
     IOptions <AgentOptions> options)
 {
     this.provisioningService = provisioningService;
     this.connectionService   = connectionService;
     this.messageService      = messageService;
     this.edgeClientService   = edgeClientService;
     this.recordService       = recordService;
     this.agentProvider       = agentProvider;
     this.options             = options.Value;
 }
 public AcceptInviteViewModel(IUserDialogs userDialogs,
                              INavigationService navigationService,
                              IProvisioningService provisioningService,
                              IConnectionService connectionService,
                              IMessageService messageService,
                              ICustomAgentContextProvider contextProvider,
                              IEventAggregator eventAggregator,
                              IEdgeClientService edgeClientService
                              )
     : base("Accept Invitiation", userDialogs, navigationService)
 {
     _provisioningService = provisioningService;
     _connectionService   = connectionService;
     _contextProvider     = contextProvider;
     _messageService      = messageService;
     _contextProvider     = contextProvider;
     _eventAggregator     = eventAggregator;
     _edgeClientService   = edgeClientService;
 }
Example #8
0
 public EntryHubPageViewModel(
     INavigationService navigationService,
     IConnectionService connectionService,
     ICredentialService credentialService,
     IEdgeClientService edgeClientService,
     IAgentProvider contextProvider,
     IEventAggregator eventAggregator,
     IUserDialogs userDialogs
     )
     : base("Hub Page", navigationService)
 {
     _connectionService = connectionService;
     _contextProvider   = contextProvider;
     _contextProvider   = contextProvider;
     _credentialService = credentialService;
     _eventAggregator   = eventAggregator;
     _edgeClientService = edgeClientService;
     _userDialogs       = userDialogs;
 }
Example #9
0
 public WalletPageViewModel(
     INavigationService navigationService,
     IConnectionService connectionService,
     ICredentialService credentialService,
     IEdgeClientService edgeClientService,
     IAgentProvider agentContextProvider,
     IEventAggregator eventAggregator,
     IUserDialogs dialogService,
     ILifetimeScope scope) :
     base("Wallet Page", navigationService)
 {
     _credentialService    = credentialService;
     _agentContextProvider = agentContextProvider;
     _connectionService    = connectionService;
     _eventAggregator      = eventAggregator;
     _edgeClientService    = edgeClientService;
     _dialogService        = dialogService;
     _scope         = scope;
     _mediatorTimer = new MediatorTimerService(this.CheckMediator);
 }