Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the VerifyService class with a supplied credential and uri and
 /// a web requester. In general you do not need to use this constructor unless you want to intercept
 /// the web requests for logging/debugging/testing purposes.
 /// </summary>
 /// <param name="configuration">The configuration information for the service.</param>
 /// <param name="webRequester">The web requester to use.</param>
 /// <param name="responseParser">The parse to use for parsing JSON responses.</param>
 public VerifyService(
     TeleSignServiceConfiguration configuration,
     IWebRequester webRequester,
     IVerifyResponseParser responseParser)
     : base(configuration, webRequester)
 {
     this.parser = responseParser;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the VerifyService class with a supplied credential and uri and
 /// a web requester. In general you do not need to use this constructor unless you want to intercept
 /// the web requests for logging/debugging/testing purposes.
 /// </summary>
 /// <param name="configuration">The configuration information for the service.</param>
 /// <param name="webRequester">The web requester to use.</param>
 /// <param name="responseParser">The parse to use for parsing JSON responses.</param>
 public VerifyService(
             TeleSignServiceConfiguration configuration, 
             IWebRequester webRequester,
             IVerifyResponseParser responseParser)
     : base(configuration, webRequester)
 {
     this.parser = responseParser;
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the VerifyService class with a supplied credential and uri and
 /// a web requester. In general you do not need to use this constructor unless you want to intercept
 /// the web requests for logging/debugging/testing purposes.
 /// </summary>
 /// <param name="configuration">The configuration information for the service.</param>
 /// <param name="webRequester">The web requester to use.</param>
 /// <param name="responseParser">The parse to use for parsing JSON responses.</param>
 public VerifyService(
             TeleSignServiceConfiguration configuration, 
             IWebRequester webRequester,
             IVerifyResponseParser responseParser, string senderID = null)
     : base(configuration, webRequester)
 {
     this.parser = responseParser;
     this.senderID = senderID;
 }
Esempio n. 4
0
        private VerifyService CreateService(
                    IWebRequester webRequester = null, 
                    IVerifyResponseParser responseParser = null)
        {
            if (webRequester == null)
            {
                webRequester = new FakeWebRequester();
            }

            if (responseParser == null)
            {
                responseParser = new FakeResponseParser();
            }

            return new VerifyService(
                        this.GetConfiguration(), 
                        webRequester, 
                        responseParser);
        }
        private VerifyService CreateService(
            IWebRequester webRequester           = null,
            IVerifyResponseParser responseParser = null)
        {
            if (webRequester == null)
            {
                webRequester = new FakeWebRequester();
            }

            if (responseParser == null)
            {
                responseParser = new FakeResponseParser();
            }

            return(new VerifyService(
                       this.GetConfiguration(),
                       webRequester,
                       responseParser));
        }