예제 #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
 /// <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;
 }