Table of Contents

Class GenericBase

Namespace
Unity.Injection
Assembly
Unity.Abstractions.dll

Base class for generic type parameters.

public abstract class GenericBase : ParameterValue, IEquatable<Type>, IResolverFactory<Type>, IResolverFactory<ParameterInfo>
Inheritance
GenericBase
Implements
Derived
Inherited Members
Extension Methods

Constructors

GenericBase(string)

Create a new GenericParameter instance that specifies that the given named generic parameter should be resolved.

protected GenericBase(string genericParameterName)

Parameters

genericParameterName string

The generic parameter name to resolve.

GenericBase(string, string)

Create a new GenericParameter instance that specifies that the given named generic parameter should be resolved.

protected GenericBase(string genericParameterName, string resolutionName)

Parameters

genericParameterName string

The generic parameter name to resolve.

resolutionName string

Registration name to use when looking up in the container.

Properties

ParameterTypeName

Name for the type represented by this ParameterValue. This may be an actual type name or a generic argument name.

public virtual string ParameterTypeName { get; }

Property Value

string

Methods

Equals(Type)

public override bool Equals(Type type)

Parameters

type Type

Returns

bool

GetResolver<TContext>(ParameterInfo)

public virtual ResolveDelegate<TContext> GetResolver<TContext>(ParameterInfo info) where TContext : IResolveContext

Parameters

info ParameterInfo

Returns

ResolveDelegate<TContext>

Type Parameters

TContext

GetResolver<TContext>(Type)

public virtual ResolveDelegate<TContext> GetResolver<TContext>(Type type) where TContext : IResolveContext

Parameters

type Type

Returns

ResolveDelegate<TContext>

Type Parameters

TContext

GetResolver<TContext>(Type, string)

protected virtual ResolveDelegate<TContext> GetResolver<TContext>(Type type, string name) where TContext : IResolveContext

Parameters

type Type
name string

Returns

ResolveDelegate<TContext>

Type Parameters

TContext