Method ContainsKey
ContainsKey<T>(string, SettingsScope)
Does the repository contain a setting with key and type.
Declaration
public bool ContainsKey<T>(string key, SettingsScope scope = SettingsScope.Project)
Parameters
Type | Name | Description |
---|---|---|
string | key | The settings key. |
Settings |
scope | Which scope should be searched for matching key. |
Returns
Type | Description |
---|---|
bool | True if a setting matching both key and type is found, false if no entry is found. |
Type Parameters
Name | Description |
---|---|
T | The type of value to search for. |
ContainsKey<T>(string, string, SettingsScope)
Does the repository contain a setting with key and type.
Declaration
public bool ContainsKey<T>(string key, string repositoryName, SettingsScope scope = SettingsScope.Project)
Parameters
Type | Name | Description |
---|---|---|
string | key | The settings key. |
string | repositoryName | The repository name to match. |
Settings |
scope | Which scope should be searched for matching key. |
Returns
Type | Description |
---|---|
bool | True if a setting matching both key and type is found, false if no entry is found. |
Type Parameters
Name | Description |
---|---|
T | The type of value to search for. |
ContainsKey<T, K>(string, string)
Does the repository contain a setting with key and type.
Declaration
public bool ContainsKey<T, K>(string key, string repositoryName = null) where K : ISettingsRepository
Parameters
Type | Name | Description |
---|---|---|
string | key | The settings key. |
string | repositoryName | If provided, only repositories with a matching name will be searched for the key. |
Returns
Type | Description |
---|---|
bool | True if a setting matching both key and type is found, false if no entry is found. |
Type Parameters
Name | Description |
---|---|
T | The type of value to search for. |
K | Only repositories of type K will be searched for matching keys. |