Show / Hide Table of Contents

Class OptionalParameter<T>

A generic version of OptionalParameter that lets you specify the type of the dependency using generics syntax.

Inheritance
Object
ParameterValue
ParameterBase
OptionalParameter
OptionalParameter<T>
Implements
IEquatable<Type>
IResolverFactory<Type>
IResolverFactory<ParameterInfo>
Inherited Members
OptionalParameter.GetResolver<TContext>(Type)
OptionalParameter.GetResolver<TContext>(ParameterInfo)
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 OptionalParameter<T> : OptionalParameter, IEquatable<Type>, IResolverFactory<Type>, IResolverFactory<ParameterInfo>
Type Parameters
Name Description
T

Type of the dependency.

Constructors

| Improve this Doc View Source

OptionalParameter()

Construct a new OptionalParameter<T>.

Declaration
public OptionalParameter()
| Improve this Doc View Source

OptionalParameter(String)

Construct a new OptionalParameter<T> with the given name.

Declaration
public OptionalParameter(string name)
Parameters
Type Name Description
String name

Name of the dependency.

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