Table of Contents

Class InjectionParameter

Namespace
Unity.Injection
Assembly
Unity.Abstractions.dll

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

public class InjectionParameter : ParameterBase, IEquatable<Type>, IResolve
Inheritance
InjectionParameter
Implements
Derived
Inherited Members
Extension Methods

Constructors

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.

public InjectionParameter(object value)

Parameters

value object

Value to be injected for this parameter.

InjectionParameter(Type, object)

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

public InjectionParameter(Type parameterType, object parameterValue)

Parameters

parameterType Type

Type of the parameter.

parameterValue object

InjectionParameterValue of the parameter

Methods

Resolve<TContext>(ref TContext)

GetOrDefault the value

public object Resolve<TContext>(ref TContext context) where TContext : IResolveContext

Parameters

context TContext

Current build context.

Returns

object

The value for the dependency.

Type Parameters

TContext