EngineGetServiceT Method (Boolean) |
Gets the service object of the specified type.
Namespace:
Dundas.BI
Assembly:
Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (24.3.0.1000)
Syntax public T GetService<T>(
bool throwIfNotFound
)
where T : class
Public Function GetService(Of T As Class) (
throwIfNotFound As Boolean
) As T
public:
generic<typename T>
where T : ref class
virtual T GetService(
bool throwIfNotFound
) sealed
abstract GetService :
throwIfNotFound : bool -> 'T when 'T : not struct
override GetService :
throwIfNotFound : bool -> 'T when 'T : not struct
Parameters
- throwIfNotFound
- Type: SystemBoolean
A value indicating whether an exception should be thrown if the service is not found.
Type Parameters
- T
- The type of service object to get.
Return Value
Type:
T
A service object of type
T, or
if the service was not found
and
throwIfNotFound is
.
Implements
IEngineGetServiceT(Boolean)Exceptions Exception | Condition |
---|
KeyNotFoundException |
The requested service type has not been registered and throwIfNotFound is .
|
See Also