Class InitializationOptions
Contain all options to customize services initialization when calling InitializeAsync(InitializationOptions).
Namespace: Unity.Services.Core
Syntax
public class InitializationOptions : object
Constructors
InitializationOptions()
Create a new instance of the InitializationOptions class.
Declaration
public InitializationOptions()
Methods
SetOption(String, Boolean)
Stores the given value for the given key.
Declaration
public InitializationOptions SetOption(string key, bool value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The identifier of the configuration entry. |
| Boolean | value | The value to store. |
Returns
| Type | Description |
|---|---|
| InitializationOptions | Return this instance. |
SetOption(String, Int32)
Stores the given value for the given key.
Declaration
public InitializationOptions SetOption(string key, int value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The identifier of the configuration entry. |
| Int32 | value | The value to store. |
Returns
| Type | Description |
|---|---|
| InitializationOptions | Return this instance. |
SetOption(String, Single)
Stores the given value for the given key.
Declaration
public InitializationOptions SetOption(string key, float value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The identifier of the configuration entry. |
| Single | value | The value to store. |
Returns
| Type | Description |
|---|---|
| InitializationOptions | Return this instance. |
SetOption(String, String)
Stores the given value for the given key.
Declaration
public InitializationOptions SetOption(string key, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The identifier of the configuration entry. |
| String | value | The value to store. |
Returns
| Type | Description |
|---|---|
| InitializationOptions | Return this instance. |
TryGetOption(String, out Boolean)
Get the option for the given key if any.
Declaration
public bool TryGetOption(string key, out bool option)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key of the option to retrieve. |
| Boolean | option | The stored option if any. |
Returns
| Type | Description |
|---|---|
| Boolean | Return true if there is a bool for the given |
TryGetOption(String, out Int32)
Get the option for the given key if any.
Declaration
public bool TryGetOption(string key, out int option)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key of the option to retrieve. |
| Int32 | option | The stored option if any. |
Returns
| Type | Description |
|---|---|
| Boolean | Return true if there is a int for the given |
TryGetOption(String, out Single)
Get the option for the given key if any.
Declaration
public bool TryGetOption(string key, out float option)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key of the option to retrieve. |
| Single | option | The stored option if any. |
Returns
| Type | Description |
|---|---|
| Boolean | Return true if there is a float for the given |
TryGetOption(String, out String)
Get the option for the given key if any.
Declaration
public bool TryGetOption(string key, out string option)
Parameters
| Type | Name | Description |
|---|---|---|
| String | key | The key of the option to retrieve. |
| String | option | The stored option if any. |
Returns
| Type | Description |
|---|---|
| Boolean | Return true if there is a string for the given |