IAppConfigTryGetValueT Method |
Gets the setting associated with the specified ID in the specified scope.
Namespace:
Dundas.BI.Configuration
Assembly:
Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (8.0.2.1001)
Syntaxbool TryGetValue<T>(
Guid settingId,
AppSettingScope scope,
Object scopeTarget,
out T value
)
Function TryGetValue(Of T) (
settingId As Guid,
scope As AppSettingScope,
scopeTarget As Object,
<OutAttribute> ByRef value As T
) As Boolean
generic<typename T>
bool TryGetValue(
Guid settingId,
AppSettingScope scope,
Object^ scopeTarget,
[OutAttribute] T% value
)
abstract TryGetValue :
settingId : Guid *
scope : AppSettingScope *
scopeTarget : Object *
value : 'T byref -> bool
Parameters
- settingId
- Type: SystemGuid
The ID of the setting. - scope
- Type: Dundas.BI.ConfigurationAppSettingScope
The specific scope from which to get the setting's value. - scopeTarget
- Type: SystemObject
The name of the server or ID of the group (ignored if scope
is not Server or ServerGroup).
- value
- Type: T
When this method returns, contains the value for the specified setting in the specified scope,
if the value is found; otherwise, the default value of the setting. This parameter is passed uninitialized.
Type Parameters
- T
- The type of the setting's value.
Return Value
Type:
Boolean if the configuration contains a
value for the setting with the specified ID in the specified scope; otherwise
.
Exceptions| Exception | Condition |
|---|
| ArgumentException | settingId is empty. -or- scope is Server and scopeTarget
is empty, , or not a String.
-or- scope is ServerGroup and scopeTarget
is less than or equal to zero, or not an Int64.
|
| ArgumentOutOfRangeException | scope is not one of the AppSettingScope values. |
| NotFoundException | There was no registered setting corresponding to the provided setting ID. |
| InvalidCastException | The value for the specified setting could not be cast to T. |
See Also