NuGardt SoftwareSc2RanksService CreateInstance Method NuGardt
Create an instance of the SC2Ranks Service.

Namespace: NuGardt.SC2Ranks.API
Assembly: NuGardt.SC2Ranks.API (in NuGardt.SC2Ranks.API.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax

public static Exception CreateInstance(
	string ApiKey,
	out Sc2RanksService Instance,
	Stream CacheStream = null,
	ICacheConfig CacheConfig = null,
	bool IgnoreBadCacheStream = true
)

Parameters

ApiKey
Type: OnlineSystem String
Your private SC2Ranks API key.
Instance
Type: NuGardt.SC2Ranks.API Sc2RanksService 
Contains the instance if no Exception is requren otherwise is Nothing.
CacheStream (Optional)
Type: OnlineSystem.IO Stream
Optional. Default is Nothing. Stream for reading and writing cache data.
CacheConfig (Optional)
Type: NuGardt.SC2Ranks.API ICacheConfig
Optional. If Nothing then default duration will be used to each API method. Config for caching duration for each API method.
IgnoreBadCacheStream (Optional)
Type: OnlineSystem Boolean
Optional. Default is True. When set to True then all read errors are ignored and the data is discarded otherwise False to get the error messages also fails instance creation.

Return Value

Type: OnlineException
Return an System.Exception if an error occurred otherwise Nothing.
Remarks

See Also