/// <summary> /// Initialize the singleton instance of the <see cref="LoLManager"/> Class /// </summary> /// <param name="key">The Api key for the application received by Riot</param> /// <param name="region">The region of the Api Key</param> public void Initialize(string key, ApiRegions region) { if (_isInitialized) { return; } if (string.IsNullOrEmpty(key)) { throw new ArgumentNullException("key"); } _configuration = new LoLManagerConfig(key, region); _isInitialized = true; }
/// <summary> /// Initialize the singleton instance of the <see cref="LoLManager"/> Class /// </summary> /// <param name="config">The configuration objects holding all the configuration properties</param> public void Initialize(LoLManagerConfig config) { if (_isInitialized) { return; } if (config == null) { throw new ArgumentNullException("config"); } _configuration = config; _isInitialized = true; }