Show / Hide Table of Contents

Class InjectionParameter

A class that holds on to the given value and provides the required IResolve when the container is configured.

Inheritance
Object
ParameterValue
ParameterBase
InjectionParameter
InjectionParameter<TParameter>
Implements
IEquatable<Type>
IResolve
Inherited Members
ParameterBase.ParameterType
ParameterBase.Equals(Type)
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 class InjectionParameter : ParameterBase, IEquatable<Type>, IResolve

Constructors

| Improve this Doc View Source

InjectionParameter(Object)

Create an instance of InjectionParameter that stores the given value, using the runtime type of that value as the type of the parameter.

Declaration
public InjectionParameter(object value)
Parameters
Type Name Description
Object value

Value to be injected for this parameter.

| Improve this Doc View Source

InjectionParameter(Type, Object)

Create an instance of InjectionParameter that stores the given value, associated with the given type.

Declaration
public InjectionParameter(Type parameterType, object parameterValue)
Parameters
Type Name Description
Type parameterType

Type of the parameter.

Object parameterValue

InjectionParameterValue of the parameter

Methods

| Improve this Doc View Source

Resolve<TContext>(ref TContext)

Declaration
public object Resolve<TContext>(ref TContext context)
    where TContext : IResolveContext
Parameters
Type Name Description
TContext context
Returns
Type Description
Object
Type Parameters
Name Description
TContext

Implements

System.IEquatable<T>
IResolve

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