Create an instance of the SC2Ranks Service.
Namespace: NuGardt.SC2Ranks.APIAssembly: NuGardt.SC2Ranks.API (in NuGardt.SC2Ranks.API.dll) Version: 2.0.0.0 (2.0.0.0)
public static Exception CreateInstance(
string ApiKey,
out Sc2RanksService Instance,
Stream CacheStream = null,
ICacheConfig CacheConfig = null,
bool IgnoreBadCacheStream = true
)
public static Exception CreateInstance(
string ApiKey,
out Sc2RanksService Instance,
Stream CacheStream = null,
ICacheConfig CacheConfig = null,
bool IgnoreBadCacheStream = true
)
Public Shared Function CreateInstance (
ApiKey As String,
<OutAttribute> ByRef Instance As Sc2RanksService,
Optional CacheStream As Stream = Nothing,
Optional CacheConfig As ICacheConfig = Nothing,
Optional IgnoreBadCacheStream As Boolean = true
) As Exception
Public Shared Function CreateInstance (
ApiKey As String,
<OutAttribute> ByRef Instance As Sc2RanksService,
Optional CacheStream As Stream = Nothing,
Optional CacheConfig As ICacheConfig = Nothing,
Optional IgnoreBadCacheStream As Boolean = true
) As Exception
public:
static Exception^ CreateInstance(
String^ ApiKey,
[OutAttribute] Sc2RanksService^% Instance,
Stream^ CacheStream = nullptr,
ICacheConfig^ CacheConfig = nullptr,
bool IgnoreBadCacheStream = true
)
public:
static Exception^ CreateInstance(
String^ ApiKey,
[OutAttribute] Sc2RanksService^% Instance,
Stream^ CacheStream = nullptr,
ICacheConfig^ CacheConfig = nullptr,
bool IgnoreBadCacheStream = true
)
Parameters
- ApiKey
- Type:
System 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:
System.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:
System 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:
ExceptionReturn an
System.Exception if an error occurred otherwise
Nothing.