コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VirgilCard"/> class.
        /// </summary>
        internal VirgilCard(VirgilApiContext context, CardModel card)
        {
            this.context = context;
            this.card    = card;

            this.PublicKey = this.context.Crypto.ImportPublicKey(this.card.SnapshotModel.PublicKeyData);
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VirgilApi"/> class.
        /// </summary>
        /// <param name="context">The configuration.</param>
        public VirgilApi(VirgilApiContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }

            this.context = context;

            this.lazyKeysManager  = new Lazy <IKeysManager>(() => new KeysManager(this.context));
            this.lazyCardsManager = new Lazy <ICardsManager>(() => new CardsManager(this.context));
        }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CardsManager"/> class.
 /// </summary>
 public CardsManager(VirgilApiContext context)
 {
     this.context = context;
 }
コード例 #4
0
ファイル: VirgilKey.cs プロジェクト: nau11713/virgil-sdk-net
 /// <summary>
 /// Prevents a default instance of the <see cref="VirgilKey"/> class from being created.
 /// </summary>
 internal VirgilKey(VirgilApiContext context, IPrivateKey privateKey)
 {
     this.context    = context;
     this.privateKey = privateKey;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IdentityVerificationAttempt"/> class.
 /// </summary>
 internal IdentityVerificationAttempt(VirgilApiContext context)
 {
     this.context = context;
 }