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>.
Implements
Inherited Members
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public sealed class ExtensionRegistry : ConcurrentBag<MethodInfo>, IProducerConsumerCollection<MethodInfo>, ICollection, IReadOnlyCollection<MethodInfo>, IEnumerable<MethodInfo>, IEnumerable
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<TSignature>(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<TExtension>(TExtension)
Registers extension method which will be included into strongly typed reflection lookup performed by Unreflect<TDelegate>(MethodInfo) or Get<TSignature>(String, MethodLookup, Boolean) methods.
Declaration
public static void RegisterInstance<TExtension>(TExtension delegate)
where TExtension : Delegate
Parameters
Type | Name | Description |
---|---|---|
TExtension | delegate | The delegate instance representing extension method. |
Type Parameters
Name | Description |
---|---|
TExtension | 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<TSignature>(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, TExtension>(TExtension)
Registers static method for the specified type in ad-hoc manner so it will be available using Get<TSignature>(String, MethodLookup, Boolean) and related methods.
Declaration
public static void RegisterStatic<T, TExtension>(TExtension delegate)
where TExtension : Delegate
Parameters
Type | Name | Description |
---|---|---|
TExtension | delegate | The delegate instance representing extension method. |
Type Parameters
Name | Description |
---|---|
T | The type to be extended with static method. |
TExtension | The type of the delegate. |