/// <summary>
 /// Initializes a new instance of CachingDataDragonClient with the specified realm configuration.
 /// </summary>
 /// <param name="realmConfiguration">A <see cref="RealmConfiguration"/> object that specifies configuration parameters for the client.</param>
 public CachingDataDragonClient(RealmConfiguration realmConfiguration)
 {
     this.client = new DataDragonClient(realmConfiguration);
 }
Exemplo n.º 2
0
        private RealmConfiguration MergeRealmConfiguration(RealmConfiguration overrideRealmConfiguration, RealmConfiguration defaultRealmConfiguration)
        {
            RealmConfiguration result = new RealmConfiguration(overrideRealmConfiguration.Realm);

            result.Cdn          = overrideRealmConfiguration.Cdn ?? defaultRealmConfiguration.Cdn;
            result.PatchVersion = overrideRealmConfiguration.PatchVersion ?? defaultRealmConfiguration.PatchVersion;
            result.Language     = overrideRealmConfiguration.Language ?? defaultRealmConfiguration.Language;
            return(result);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of DataDragonClient with the specified realm configuration.
 /// </summary>
 /// <param name="realmConfiguration">A <see cref="RealmConfiguration"/> object that specifies configuration parameters for the client.</param>
 public DataDragonClient(RealmConfiguration realmConfiguration)
 {
     this.httpClient          = new JsonHttpClient();
     this.uriBuilderReference = new UriBuilderReference(realmConfiguration);
 }
Exemplo n.º 4
0
 internal UriBuilderReference(RealmConfiguration realmConfiguration)
 {
     this.realmConfiguration = realmConfiguration;
     this.fetchLock          = new SemaphoreSlim(1, 1);
 }
Exemplo n.º 5
0
 internal UriBuilder(RealmConfiguration realmConfiguration)
 {
     this.realmConfiguration = realmConfiguration;
 }