Show / Hide Table of Contents

Class GenericBase

Base class for generic type parameters.

Inheritance
Object
ParameterValue
GenericBase
GenericParameter
GenericResolvedArrayParameter
OptionalGenericParameter
Implements
IEquatable<Type>
IResolverFactory<Type>
IResolverFactory<ParameterInfo>
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Unity.Injection
Assembly: Unity.Abstractions.dll
Syntax
public abstract class GenericBase : ParameterValue, IEquatable<Type>, IResolverFactory<Type>, IResolverFactory<ParameterInfo>

Constructors

| Improve this Doc View Source

GenericBase(String)

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

Declaration
protected GenericBase(string genericParameterName)
Parameters
Type Name Description
String genericParameterName

The generic parameter name to resolve.

| Improve this Doc View Source

GenericBase(String, String)

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

Declaration
protected GenericBase(string genericParameterName, string resolutionName)
Parameters
Type Name Description
String genericParameterName

The generic parameter name to resolve.

String resolutionName

Registration name to use when looking up in the container.

Properties

| Improve this Doc View Source

ParameterTypeName

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

Declaration
public virtual string ParameterTypeName { get; }
Property Value
Type Description
String

Methods

| Improve this Doc View Source

Equals(Type)

Declaration
public override bool Equals(Type type)
Parameters
Type Name Description
Type type
Returns
Type Description
Boolean
Overrides
ParameterValue.Equals(Type)
| Improve this Doc View Source

GetResolver<TContext>(ParameterInfo)

Declaration
public virtual ResolveDelegate<TContext> GetResolver<TContext>(ParameterInfo info)
    where TContext : IResolveContext
Parameters
Type Name Description
ParameterInfo info
Returns
Type Description
ResolveDelegate<TContext>
Type Parameters
Name Description
TContext
| Improve this Doc View Source

GetResolver<TContext>(Type)

Declaration
public virtual ResolveDelegate<TContext> GetResolver<TContext>(Type type)
    where TContext : IResolveContext
Parameters
Type Name Description
Type type
Returns
Type Description
ResolveDelegate<TContext>
Type Parameters
Name Description
TContext
| Improve this Doc View Source

GetResolver<TContext>(Type, String)

Declaration
protected virtual ResolveDelegate<TContext> GetResolver<TContext>(Type type, string name)
    where TContext : IResolveContext
Parameters
Type Name Description
Type type
String name
Returns
Type Description
ResolveDelegate<TContext>
Type Parameters
Name Description
TContext

Implements

System.IEquatable<T>
IResolverFactory<TMemberInfo>
IResolverFactory<TMemberInfo>

Extension Methods

InjectionMatching.Matches(Object, Type)
InjectionMatching.MatchesObject(Object, Type)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © 2020 .NET Foundation and Contributors. All Rights Reserved