QueryInterface<T>(object, bool)
Gets the implementation of a specified interface for the specified object.
Declaration
public static T QueryInterface<T>(object obj, bool throwing = true) where T : classParameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object for which the interface should be queried. |
| bool | throwing |
|
Returns
| Type | Description |
|---|---|
| T | An object implementing the |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the required interface. |
Remarks
This method shall return obj if the type of obj statically implements the interface. Otherwise,
the method shall return another object that implements T on behalf of obj. In this case,
the returned object shall implement the IDynamicInterfaceImplementation interface, which allows to navigate back to obj.