Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the PhoneIdService class with
 /// a configuration and a custom web requester and response parser. 
 /// You generally don't need to use this constructor.
 /// </summary>
 /// <param name="configuration">The configuration information for the service.</param>
 /// <param name="webRequester">The web requester to use.</param>
 /// <param name="responseParser">The response parser to use.</param>
 public PhoneIdService(
             TeleSignServiceConfiguration configuration, 
             IWebRequester webRequester,
             IPhoneIdResponseParser responseParser)
     : base(configuration, webRequester)
 {
     // TODO: null check and possible ifdef for JSON.Net
     this.responseParser = responseParser;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the PhoneIdService class with
 /// a configuration and a custom web requester and response parser.
 /// You generally don't need to use this constructor.
 /// </summary>
 /// <param name="configuration">The configuration information for the service.</param>
 /// <param name="webRequester">The web requester to use.</param>
 /// <param name="responseParser">The response parser to use.</param>
 public PhoneIdService(
     TeleSignServiceConfiguration configuration,
     IWebRequester webRequester,
     IPhoneIdResponseParser responseParser)
     : base(configuration, webRequester)
 {
     // TODO: null check and possible ifdef for JSON.Net
     this.responseParser = responseParser;
 }
Ejemplo n.º 3
0
        private PhoneIdService CreateService(
            IWebRequester webRequester            = null,
            IPhoneIdResponseParser responseParser = null)
        {
            if (webRequester == null)
            {
                webRequester = new FakeWebRequester();
            }

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

            return(new PhoneIdService(
                       this.GetConfiguration(),
                       webRequester,
                       responseParser));
        }
Ejemplo n.º 4
0
        private PhoneIdService CreateService(
                    IWebRequester webRequester = null, 
                    IPhoneIdResponseParser responseParser = null)
        {
            if (webRequester == null)
            {
                webRequester = new FakeWebRequester();
            }

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

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