Show / Hide Table of Contents

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>.

Inheritance
Object
ConcurrentBag<MethodInfo>
ExtensionRegistry
Implements
IProducerConsumerCollection<MethodInfo>
ICollection
IReadOnlyCollection<MethodInfo>
IEnumerable<MethodInfo>
IEnumerable
Inherited Members
ConcurrentBag<MethodInfo>.Add(MethodInfo)
ConcurrentBag<MethodInfo>.Clear()
ConcurrentBag<MethodInfo>.CopyTo(MethodInfo[], Int32)
ConcurrentBag<MethodInfo>.GetEnumerator()
ConcurrentBag<MethodInfo>.IProducerConsumerCollection<MethodInfo>.TryAdd(MethodInfo)
ConcurrentBag<MethodInfo>.ICollection.CopyTo(Array, Int32)
ConcurrentBag<MethodInfo>.IEnumerable.GetEnumerator()
ConcurrentBag<MethodInfo>.ToArray()
ConcurrentBag<MethodInfo>.TryPeek(MethodInfo)
ConcurrentBag<MethodInfo>.TryTake(MethodInfo)
ConcurrentBag<MethodInfo>.Count
ConcurrentBag<MethodInfo>.IsEmpty
ConcurrentBag<MethodInfo>.ICollection.IsSynchronized
ConcurrentBag<MethodInfo>.ICollection.SyncRoot
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
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 Source

RegisterInstance(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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

Implements

System.Collections.Concurrent.IProducerConsumerCollection<T>
System.Collections.ICollection
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods

AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, CancellationToken)
ObjectExtensions.GetUserData<T>(T)
ObjectExtensions.IsOneOf<T>(T, IEnumerable<T>)
ObjectExtensions.IsOneOf<T>(T, T[])
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, Func<T, TResult1>, Func<T, TResult2>, out TResult1, out TResult2)
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, ValueFunc<T, TResult1>, ValueFunc<T, TResult2>, out TResult1, out TResult2)
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, Func<T, TResult1>, Func<T, TResult2>)
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, ValueFunc<T, TResult1>, ValueFunc<T, TResult2>)
ObjectExtensions.As<T>(T)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
Collection.Convert<TInput, TOutput>(IReadOnlyCollection<TInput>, ValueFunc<TInput, TOutput>)
Collection.Convert<TInput, TOutput>(IReadOnlyCollection<TInput>, Converter<TInput, TOutput>)
Sequence.ToAsyncEnumerable<T>(IEnumerable<T>)
Sequence.GetAsyncEnumerator<T>(IEnumerable<T>, CancellationToken)
Sequence.GetConsumer<T>(IProducerConsumerCollection<T>)
Sequence.SequenceHashCode(IEnumerable<Object>, Boolean)
Sequence.ForEach<T>(IEnumerable<T>, Action<T>)
Sequence.ForEach<T>(IEnumerable<T>, ValueAction<T>)
Sequence.ForEachAsync<T>(IEnumerable<T>, Func<T, CancellationToken, ValueTask>, CancellationToken)
Sequence.ForEachAsync<T>(IEnumerable<T>, ValueFunc<T, CancellationToken, ValueTask>, CancellationToken)
Sequence.FirstOrEmpty<T>(IEnumerable<T>)
Sequence.FirstOrEmpty<T>(IEnumerable<T>, ValueFunc<T, Boolean>)
Sequence.FirstOrEmpty<T>(IEnumerable<T>, Predicate<T>)
Sequence.ElementAt<T>(IEnumerable<T>, Int32, out T)
Sequence.SkipNulls<T>(IEnumerable<T>)
Sequence.ToString<T>(IEnumerable<T>, String, String)
Sequence.Prepend<T>(IEnumerable<T>, T[])
Sequence.Append<T>(IEnumerable<T>, T[])
ExpressionBuilder.Const<T>(T)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX