コード例 #1
0
 public HomeViewModel(IUserDialogs userDialogs,
                      INavigationService navigationService,
                      IConnectionService connectionService,
                      ICredentialService credentialService,
                      ICredentialAssembler credentialAssembler,
                      IProofAssembler proofAssembler,
                      IRequestPresentationFiller requestPresentationFiller,
                      IConnectionAssembler connectionAssembler,
                      IProofService proofService,
                      IWalletRecordService recordService,
                      IAgentProvider agentContextProvider,
                      IEventAggregator eventAggregator,
                      ILifetimeScope scope) : base(AppResources.HomeTabTitle, userDialogs, navigationService)
 {
     _connectionService         = connectionService;
     _credentialService         = credentialService;
     _credentialAssembler       = credentialAssembler;
     _connectionAssembler       = connectionAssembler;
     _proofAssembler            = proofAssembler;
     _proofService              = proofService;
     _requestPresentationFiller = requestPresentationFiller;
     _recordService             = recordService;
     _agentContextProvider      = agentContextProvider;
     _eventAggregator           = eventAggregator;
     _scope             = scope;
     _userDialogs       = userDialogs;
     _navigationService = navigationService;
 }
コード例 #2
0
        public ConnectionViewModel(IUserDialogs userDialogs,
                                   INavigationService navigationService,
                                   IAgentProvider agentContextProvider,
                                   IMessageService messageService,
                                   IDiscoveryService discoveryService,
                                   IConnectionService connectionService,
                                   IEventAggregator eventAggregator,
                                   IWalletRecordService walletRecordService,
                                   ILifetimeScope scope,
                                   ConnectionRecord record) :
            base(nameof(ConnectionViewModel),
                 userDialogs,
                 navigationService)
        {
            _agentContextProvider = agentContextProvider;
            _messageService       = messageService;
            _discoveryService     = discoveryService;
            _connectionService    = connectionService;
            _eventAggregator      = eventAggregator;
            _walletRecordSevice   = walletRecordService;
            _scope = scope;

            _record               = record;
            MyDid                 = _record.MyDid;
            TheirDid              = _record.TheirDid;
            ConnectionName        = _record.Alias?.Name ?? _record.Id;
            ConnectionSubtitle    = $"{_record.State:G}";
            ConnectionImageUrl    = _record.Alias?.ImageUrl;
            ConnectionImageSource = Base64StringToImageSource.Base64StringToImage(_record.Alias?.ImageUrl);

            Messages = new ObservableCollection <RecordBase>();
        }
コード例 #3
0
ファイル: CredOfferViewModel.cs プロジェクト: phuctu1901/uID
        public CredOfferViewModel(IUserDialogs userDialogs,
                                  INavigationService navigationService,
                                  IAgentProvider agentProvider,
                                  ICredentialService credentialService,
                                  IMessageService messageService,
                                  IPoolService poolService,
                                  IWalletRecordService recordService,
                                  IConnectionService connectionService,
                                  IEventAggregator eventAggregator, CredentialRecord credentialOffer) :
            base(nameof(CredOfferViewModel), userDialogs, navigationService)
        {
            _credentialOffer = credentialOffer;

            _agentProvider     = agentProvider;
            _credentialService = credentialService;
            _connectionService = connectionService;
            _messageService    = messageService;
            _poolService       = poolService;
            _recordService     = recordService;
            _eventAggregator   = eventAggregator;
            Title          = "Offer Detail";
            CredentialName = ConvertNameFromeSchemaId(CredentialOffer.SchemaId);

            if (_credentialOffer.CreatedAtUtc != null)
            {
                IssuedDate = (DateTime)_credentialOffer.CreatedAtUtc;
            }
        }
コード例 #4
0
 public DefaultRoutingStore(
     IWalletRecordService recordService,
     IAgentProvider agentProvider)
 {
     this.recordService = recordService;
     this.agentProvider = agentProvider;
 }
コード例 #5
0
 public RequestPresentationFiller(IAgentProvider agentContextProvider, IWalletRecordService recordService, ICredentialService credentialService, ILifetimeScope scope)
 {
     _agentContextProvider = agentContextProvider;
     _recordService        = recordService;
     _credentialService    = credentialService;
     _scope = scope;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PaymentsAgentMiddleware" /> class.
 /// </summary>
 /// <param name="paymentService"></param>
 /// <param name="recordService"></param>
 public PaymentsAgentMiddleware(
     IPaymentService paymentService,
     IWalletRecordService recordService)
 {
     _paymentService = paymentService;
     _recordService  = recordService;
 }
コード例 #7
0
        // ReSharper restore InconsistentNaming

        /// <summary>Initializes a new instance of the <see cref="DefaultProvisioningService"/> class.</summary>
        /// <param name="walletRecord">The wallet record.</param>
        /// <param name="walletService">The wallet service.</param>
        public DefaultProvisioningService(
            IWalletRecordService walletRecord,
            IWalletService walletService)
        {
            RecordService = walletRecord;
            WalletService = walletService;
        }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultCloudRegistrationService"/> class.
 /// </summary>
 /// <param name="recordService">The record service.</param>
 /// <param name="logger">The logger.</param>
 public DefaultCloudRegistrationService(
     IWalletRecordService recordService,
     ILogger <DefaultConnectionService> logger)
 {
     Logger        = logger;
     RecordService = recordService;
 }
コード例 #9
0
        public ProofRequestsViewModel(
            IUserDialogs userDialogs,
            INavigationService navigationService,
            IProofService proofService,
            ICredentialService credentialService,
            IAgentProvider agentContextProvider,
            IWalletRecordService recordService,
            IEventAggregator eventAggregator,
            IProofAssembler proofAssembler,
            IRequestPresentationFiller requestPresentationFiller,
            ILifetimeScope scope
            ) : base(
                AppResources.ProofsPageTitle,
                userDialogs,
                navigationService
                )
        {
            _proofService         = proofService;
            _agentContextProvider = agentContextProvider;
            _scope                     = scope;
            _eventAggregator           = eventAggregator;
            _recordService             = recordService;
            _credentialService         = credentialService;
            _proofAssembler            = proofAssembler;
            _requestPresentationFiller = requestPresentationFiller;

            this.WhenAnyValue(x => x.SearchTerm)
            .Throttle(TimeSpan.FromMilliseconds(200))
            .InvokeCommand(RefreshCommand);
        }
コード例 #10
0
 public MainViewModel(
     IUserDialogs userDialogs,
     INavigationService navigationService,
     IEventAggregator eventAggregator,
     IAgentProvider agentContextProvider,
     IWalletRecordService walletRecordService,
     ILifetimeScope lifetimeScope,
     ConnectionsViewModel connectionsViewModel,
     CredentialsViewModel credentialsViewModel,
     AccountViewModel accountViewModel,
     CreateInvitationViewModel createInvitationViewModel,
     ProofRequestsViewModel proofRequestsViewModel,
     ScanQrCodeViewModel scanQrCodeViewModel
     ) : base(nameof(MainViewModel), userDialogs, navigationService)
 {
     Connections           = connectionsViewModel;
     Credentials           = credentialsViewModel;
     Account               = accountViewModel;
     CreateInvitation      = createInvitationViewModel;
     ProofRequests         = proofRequestsViewModel;
     ScanQrCode            = scanQrCodeViewModel;
     _eventAggregator      = eventAggregator;
     _walletRecordService  = walletRecordService;
     _agentContextProvider = agentContextProvider;
     _lifetimeScope        = lifetimeScope;
     //for prompting dialog on connection events
     //WalletEventService.Init(navigationService);
 }
コード例 #11
0
        public ProofRequestViewModel(IUserDialogs userDialogs,
                                     INavigationService navigationService,
                                     IProofService proofService,
                                     IAgentProvider agentContextProvider,
                                     IMessageService messageService,
                                     IConnectionService connectionService,
                                     IEventAggregator eventAggregator,
                                     IWalletRecordService recordService,
                                     IProofCredentialSelector proofCredentialSelector,
                                     ProofRecord proof) : base(AppResources.ProofRequestPageTitle, userDialogs, navigationService)
        {
            _proofRecord             = proof;
            _proofService            = proofService;
            _agentContextProvider    = agentContextProvider;
            _messageService          = messageService;
            _connectionService       = connectionService;
            _eventAggregator         = eventAggregator;
            _userDialogs             = userDialogs;
            _recordService           = recordService;
            _navigationService       = navigationService;
            _proofCredentialSelector = proofCredentialSelector;
            GetConnectionAlias();

            _proofRequest = JsonConvert.DeserializeObject <ProofRequest>(_proofRecord.RequestJson);

            ProofName = _proofRequest.Name;

            Version = _proofRequest.Version;

            State = ProofStateTranslator.Translate(_proofRecord.State);

            AreButtonsVisible = _proofRecord.State == ProofState.Requested;

            Attributes = new List <ProofAttributeViewModel>();
        }
コード例 #12
0
 /// <summary>Initializes a new instance of the <see cref="DefaultDidExchangeService"/> class.</summary>
 public DefaultDidExchangeService(ILedgerService ledgerService, IWalletRecordService recordService, IProvisioningService provisioningService, IEventAggregator eventAggregator)
 {
     _ledgerService       = ledgerService;
     _recordService       = recordService;
     _provisioningService = provisioningService;
     _eventAggregator     = eventAggregator;
 }
コード例 #13
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);
            }
        }
コード例 #14
0
 public DefaultSchemaService(
     IWalletRecordService recordService,
     ILedgerService ledgerService,
     ITailsService tailsService)
 {
     RecordService = recordService;
     LedgerService = ledgerService;
     TailsService  = tailsService;
 }
コード例 #15
0
 /// <summary>Initializes a new instance of the <see cref="DefaultCredentialHandler"/> class.</summary>
 /// <param name="credentialService">The credential service.</param>
 /// <param name="recordService">The wallet record service.</param>
 /// <param name="messageService">The message service.</param>
 public DefaultCredentialHandler(
     ICredentialService credentialService,
     IWalletRecordService recordService,
     IMessageService messageService)
 {
     _credentialService = credentialService;
     _recordService     = recordService;
     _messageService    = messageService;
 }
コード例 #16
0
 public EdgeClientService(
     IProvisioningService provisioningService,
     IWalletRecordService recordService,
     IMessageService messageService)
 {
     this.provisioningService = provisioningService;
     this.recordService       = recordService;
     this.messageService      = messageService;
 }
コード例 #17
0
        // ReSharper restore InconsistentNaming

        /// <summary>Initializes a new instance of the <see cref="DefaultProvisioningService"/> class.</summary>
        /// <param name="walletRecord">The wallet record.</param>
        /// <param name="walletService">The wallet service.</param>
        /// <param name="agentOptions"></param>
        public DefaultProvisioningService(
            IWalletRecordService walletRecord,
            IWalletService walletService,
            IOptions <AgentOptions> agentOptions)
        {
            RecordService = walletRecord;
            WalletService = walletService;
            AgentOptions  = agentOptions.Value;
        }
コード例 #18
0
 public ForwardMessageSubscriber(MessageQueue <InboxItemRecord> messageQueue, IEventAggregator eventAggregator, IAgentProvider agentProvider, IWalletService walletService, IWalletRecordService walletRecordService, IConnectionService connectionService, IHubContext <MediatorHub> hubContext)
 {
     _messageQueue        = messageQueue;
     observable           = eventAggregator.GetEventByType <InboxItemEvent>();
     _agentProvider       = agentProvider;
     _walletService       = walletService;
     _walletRecordService = walletRecordService;
     _connectionService   = connectionService;
     _hubContext          = hubContext;
 }
コード例 #19
0
 public EdgeConnectionService(
     IEdgeClientService edgeClientService,
     IEventAggregator eventAggregator,
     IWalletRecordService recordService,
     IProvisioningService provisioningService,
     ILogger <DefaultConnectionService> logger)
     : base(eventAggregator, recordService, provisioningService, logger)
 {
     this.edgeClientService = edgeClientService;
 }
コード例 #20
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MediatorForwardHandler"/> class.
 /// </summary>
 /// <param name="recordService"></param>
 /// <param name="walletService"></param>
 /// <param name="routingStore"></param>
 /// <param name="eventAggregator"></param>
 public MediatorForwardHandler(
     IWalletRecordService recordService,
     IWalletService walletService,
     IRoutingStore routingStore,
     IEventAggregator eventAggregator)
 {
     this.recordService   = recordService;
     this.walletService   = walletService;
     this.routingStore    = routingStore;
     this.eventAggregator = eventAggregator;
 }
コード例 #21
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultConnectionService"/> class.
 /// </summary>
 /// <param name="eventAggregator">The event aggregator.</param>
 /// <param name="recordService">The record service.</param>
 /// <param name="provisioningService">The provisioning service.</param>
 /// <param name="logger">The logger.</param>
 public DefaultConnectionService(
     IEventAggregator eventAggregator,
     IWalletRecordService recordService,
     IProvisioningService provisioningService,
     ILogger <DefaultConnectionService> logger)
 {
     EventAggregator     = eventAggregator;
     ProvisioningService = provisioningService;
     Logger        = logger;
     RecordService = recordService;
 }
コード例 #22
0
 public RoutingInboxHandler(
     IWalletRecordService recordService,
     IWalletService walletService,
     IRoutingStore routingStore,
     ILogger <RoutingInboxHandler> logger)
 {
     this.recordService = recordService;
     this.walletService = walletService;
     this.routingStore  = routingStore;
     this.logger        = logger;
 }
コード例 #23
0
        // ReSharper restore InconsistentNaming

        /// <summary>
        /// Initializes a new instance of the <see cref="DefaultSchemaService"/> class.
        /// </summary>
        /// <param name="provisioningService">Provisioning service.</param>
        /// <param name="recordService">Record service.</param>
        /// <param name="ledgerService">Ledger service.</param>
        /// <param name="tailsService">Tails service.</param>
        public DefaultSchemaService(
            IProvisioningService provisioningService,
            IWalletRecordService recordService,
            ILedgerService ledgerService,
            ITailsService tailsService)
        {
            ProvisioningService = provisioningService;
            RecordService       = recordService;
            LedgerService       = ledgerService;
            TailsService        = tailsService;
        }
コード例 #24
0
 /// <summary>Initializes a new instance of the <see cref="DefaultCredentialHandler"/> class.</summary>
 /// <param name="agentOptions">The agent options.</param>
 /// <param name="credentialService">The credential service.</param>
 /// <param name="recordService">The wallet record service.</param>
 /// <param name="messageService">The message service.</param>
 public DefaultCredentialHandler(
     IOptions <AgentOptions> agentOptions,
     ICredentialService credentialService,
     IWalletRecordService recordService,
     IMessageService messageService)
 {
     _agentOptions      = agentOptions.Value;
     _credentialService = credentialService;
     _recordService     = recordService;
     _messageService    = messageService;
 }
コード例 #25
0
 public MediatorProvisioningService(
     IConnectionService connectionService,
     IProvisioningService provisioningService,
     IWalletRecordService recordService,
     IAgentProvider agentProvider)
 {
     this.connectionService   = connectionService;
     this.provisioningService = provisioningService;
     this.recordService       = recordService;
     this.agentProvider       = agentProvider;
 }
コード例 #26
0
 /// <summary>Initializes a new instance of the <see cref="DefaultCredentialHandler"/> class.</summary>
 /// <param name="eventAggregator">The event aggregator.</param>
 /// <param name="credentialService">The credential service.</param>
 /// <param name="recordService">The wallet record service.</param>
 /// <param name="messageService">The message service.</param>
 /// <param name="memoryCache">The memory cache</param>
 public AATHCredentialHandler(
     IEventAggregator eventAggregator,
     ICredentialService credentialService,
     IWalletRecordService recordService,
     IMessageService messageService,
     IMemoryCache memoryCache)
 {
     _eventAggregator   = eventAggregator;
     _credentialService = credentialService;
     _recordService     = recordService;
     _messageService    = messageService;
     _credentialCache   = memoryCache;
 }
コード例 #27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DefaultEphemeralChallengeService"/> class.
 /// </summary>
 /// <param name="eventAggregator">The event aggregator.</param>
 /// <param name="proofService">The proof service.</param>
 /// <param name="recordService">The record service.</param>
 /// <param name="provisioningService">The provisioning service.</param>
 /// <param name="logger">The logger.</param>
 public DefaultEphemeralChallengeService(
     IEventAggregator eventAggregator,
     IProofService proofService,
     IWalletRecordService recordService,
     IProvisioningService provisioningService,
     ILogger <DefaultEphemeralChallengeService> logger)
 {
     EventAggregator     = eventAggregator;
     ProofService        = proofService;
     RecordService       = recordService;
     ProvisioningService = provisioningService;
     Logger = logger;
 }
 /// <inheritdoc />
 public DefaultProvisioningHostedService(
     IProvisioningService provisioningService,
     IWalletService walletService,
     IWalletRecordService recordService,
     IOptions <AgentOptions> agentOptions,
     IOptions <WalletOptions> walletOptions)
 {
     _provisioningService = provisioningService;
     _walletService       = walletService;
     _recordService       = recordService;
     _walletOptions       = walletOptions.Value;
     _agentOptions        = agentOptions.Value;
 }
コード例 #29
0
 public RoutingInboxHandler(
     IWalletRecordService recordService,
     IWalletService walletService,
     IRoutingStore routingStore,
     IOptions <AgentOptions> options,
     ILogger <RoutingInboxHandler> logger)
 {
     this.recordService = recordService;
     this.walletService = walletService;
     this.routingStore  = routingStore;
     this.options       = options.Value;
     this.logger        = logger;
 }
コード例 #30
0
 public SovrinPaymentService(
     IWalletRecordService recordService,
     IPoolService poolService,
     ILedgerService ledgerService,
     IProvisioningService provisioningService,
     ILogger <SovrinPaymentService> logger)
 {
     this.recordService       = recordService;
     this.poolService         = poolService;
     this.ledgerService       = ledgerService;
     this.provisioningService = provisioningService;
     this.logger = logger;
 }