コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AuthenticationProvider"/> class.
        /// </summary>
        /// <param name="tokenMgmt">Provides the ability to manage access tokens.</param>
        /// <param name="customerId">Identifier for customer whose resources are being accessed.</param>
        /// <exception cref="System.ArgumentException">
        /// <paramref name="customerId"/> is empty or null.
        /// </exception>
        /// <exception cref="System.ArgumentNullException">
        /// <paramref name="tokenMgmt"/> is null.
        /// </exception>
        public AuthenticationProvider(ITokenManagement tokenMgmt, string customerId)
        {
            tokenMgmt.AssertNotNull(nameof(tokenMgmt));
            customerId.AssertNotEmpty(nameof(customerId));

            this.customerId = customerId;
            this.tokenMgmt  = tokenMgmt;
        }
コード例 #2
0
ファイル: LicenseProcessor.cs プロジェクト: codeendevor/peek
        /// <summary>
        /// Initializes a new instance of the <see cref="LicenseProcessor"/> class.
        /// </summary>
        /// <param name="tokenMgmt">Provides the ability to manage access tokens.</param>
        public LicenseProcessor(ITokenManagement tokenMgmt)
        {
            tokenMgmt.AssertNotNull(nameof(tokenMgmt));

            this.tokenMgmt = tokenMgmt;
        }