Class ExtensionRegistry
Represents registry of extension methods that can be registered for the specified type and be available using strongly typed reflection via Type<T>.
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public sealed class ExtensionRegistry : ConcurrentBag<MethodInfo>
Methods
| Improve this Doc View SourceRegisterInstance(MethodInfo)
Registers extension method as instance method which will be included into strongly typed reflection lookup performed by Get<D>(String, MethodLookup, Boolean) and related methods.
Declaration
public static void RegisterInstance(MethodInfo method)
Parameters
Type | Name | Description |
---|---|---|
MethodInfo | method | Static method to register. Cannot be null. |
RegisterInstance<D>(D)
Registers extension method which will be included into strongly typed reflection lookup performed by Unreflect<D>(MethodInfo) or Get<D>(String, MethodLookup, Boolean) methods.
Declaration
public static void RegisterInstance<D>(D delegate)
where D : Delegate
Parameters
Type | Name | Description |
---|---|---|
D | delegate | The delegate instance representing extension method. |
Type Parameters
Name | Description |
---|---|
D | The type of the delegate. |
RegisterStatic<T>(MethodInfo)
Registers static method for the specified type in ad-hoc manner so it will be available using Get<D>(String, MethodLookup, Boolean) and related methods.
Declaration
public static void RegisterStatic<T>(MethodInfo method)
Parameters
Type | Name | Description |
---|---|---|
MethodInfo | method | The static method implementation. |
Type Parameters
Name | Description |
---|---|
T | The type to be extended with static method. |
RegisterStatic<T, D>(D)
Registers static method for the specified type in ad-hoc manner so it will be available using Get<D>(String, MethodLookup, Boolean) and related methods.
Declaration
public static void RegisterStatic<T, D>(D delegate)
where D : Delegate
Parameters
Type | Name | Description |
---|---|---|
D | delegate | The delegate instance representing extension method. |
Type Parameters
Name | Description |
---|---|
T | The type to be extended with static method. |
D | The type of the delegate. |