Initialize() public static method

public static Initialize ( ) : void
return void
Esempio n. 1
0
        /// <summary>
        /// Default constructor requires a Steam Web API key (secret to each developer) and the name for this web interface (such as "IDOTA2Match_570).
        /// </summary>
        /// <param name="steamWebApiBaseUrl">Used to override the base URL of each web request. Default is 'https://api.steampowered.com/'.</param>
        /// <param name="steamWebApiKey">Steam Web API key (secret to each developer)</param>
        /// <param name="interfaceName">Name for this web interface (such as "IDOTA2Match_570). Must match the Steam Web API interface name exactly as this value
        /// is used to construct the URL to perform the GET or POST.</param>
        public SteamWebInterface(string steamWebApiBaseUrl, string steamWebApiKey, string interfaceName)
        {
            if (String.IsNullOrEmpty(steamWebApiKey))
            {
                throw new ArgumentNullException("steamWebApiKey");
            }

            Debug.Assert(!String.IsNullOrEmpty(interfaceName));

            this.interfaceName   = interfaceName;
            this.steamWebRequest = new SteamWebRequest(steamWebApiBaseUrl, steamWebApiKey);

            AutoMapperConfiguration.Initialize();
        }
        /// <summary>
        /// Constructs and maps based on a custom Steam Store Web API URL
        /// </summary>
        /// <param name="steamStoreApiBaseUrl">Steam Store Web API URL</param>
        public SteamStoreInterface(string steamStoreApiBaseUrl)
        {
            this.steamStoreRequest = new SteamStoreRequest(steamStoreApiBaseUrl);

            AutoMapperConfiguration.Initialize();
        }
Esempio n. 3
0
        /// <summary>
        /// Constructs and maps based on a custom http client
        /// </summary>
        /// <param name="httpClient">Client to make requests with</param>
        public SteamStoreInterface(HttpClient httpClient)
        {
            this.steamStoreRequest = new SteamStoreRequest(steamStoreApiBaseUrl, httpClient);

            AutoMapperConfiguration.Initialize();
        }