Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceBase{TService, TModel}"/> class.
 /// </summary>
 /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param>
 /// <param name="version">The version of the API (currently only 1 version.)</param>
 /// <param name="endpoint">The end point of the service.</param>
 /// <param name="rateLimitOn">Turn the rate limit on or off.</param>
 public ServiceBase(IMtgApiServiceAdapter serviceAdapter, ApiVersion version, ApiEndPoint endpoint, bool rateLimitOn)
 {
     Adapter        = serviceAdapter;
     Version        = version;
     EndPoint       = endpoint;
     _isRateLimitOn = rateLimitOn;
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceBase{TService, TModel}"/> class.
 /// </summary>
 /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param>
 /// <param name="version">The version of the API (currently only 1 version.)</param>
 /// <param name="endpoint">The end point of the service.</param>
 /// <param name="rateLimitOn">Turn the rate limit on or off.</param>
 public ServiceBase(IMtgApiServiceAdapter serviceAdapter, ApiVersion version, ApiEndPoint endpoint, bool rateLimitOn)
 {
     Adapter        = serviceAdapter;
     Version        = version;
     EndPoint       = endpoint;
     _isRateLimitOn = rateLimitOn;
     WhereQueries   = new Dictionary <string, string>();
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CardService"/> class.
 /// </summary>
 /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param>
 /// <param name="version">The version of the API</param>
 public CardService(IMtgApiServiceAdapter serviceAdapter, ApiVersion version)
     : base(serviceAdapter, version, ApiEndPoint.Cards)
 {
     this._whereQueries = new NameValueCollection();
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CardService"/> class. Defaults to version 1.0 of the API.
 /// </summary>
 /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param>
 public CardService(IMtgApiServiceAdapter serviceAdapter)
     : this(serviceAdapter, ApiVersion.V1_0)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceBaseObjectService"/> class. Defaults to version 1.0 of the API.
 /// </summary>
 /// <param name="adapter">The adapter to use.</param>
 public ServiceBaseObjectService(IMtgApiServiceAdapter adapter)
     : base(adapter, ApiVersion.V1_0, ApiEndPoint.Cards)
 {
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SetService"/> class.
 /// </summary>
 /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param>
 /// <param name="version">The version of the API</param>
 /// <param name="rateLimitOn">Turn the rate limit on or off.</param>
 public SetService(IMtgApiServiceAdapter serviceAdapter, ApiVersion version, bool rateLimitOn = true)
     : base(serviceAdapter, version, ApiEndPoint.Sets, rateLimitOn)
 {
     _whereQueries = new NameValueCollection();
 }
Esempio n. 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SetService"/> class.
 /// </summary>
 /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param>
 /// <param name="version">The version of the API</param>
 public SetService(IMtgApiServiceAdapter serviceAdapter, ApiVersion version)
     : base(serviceAdapter, version, ApiEndPoint.Sets)
 {
     _whereQueries = new NameValueCollection();
 }
Esempio n. 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SetService"/> class.
 /// </summary>
 /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param>
 /// <param name="version">The version of the API</param>
 /// <param name="rateLimitOn">Turn the rate limit on or off.</param>
 public SetService(IMtgApiServiceAdapter serviceAdapter, ApiVersion version, bool rateLimitOn = true)
     : base(serviceAdapter, version, ApiEndPoint.Sets, rateLimitOn)
 {
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceBase{TService, TModel}"/> class.
 /// </summary>
 /// <param name="serviceAdapter">The service adapter used to interact with the MTG API.</param>
 /// <param name="version">The version of the API (currently only 1 version.)</param>
 /// <param name="endpoint">The end point of the service.</param>
 public ServiceBase(IMtgApiServiceAdapter serviceAdapter, ApiVersion version, ApiEndPoint endpoint)
 {
     this._adapter  = serviceAdapter;
     this._version  = version;
     this._endpoint = endpoint;
 }