Show / Hide Table of Contents

Class ResolutionFailedException

The exception thrown by the Unity container when an attempt to resolve a dependency fails.

Inheritance
Object
Exception
ResolutionFailedException
Implements
ISerializable
Inherited Members
Exception.GetBaseException()
Exception.GetObjectData(SerializationInfo, StreamingContext)
Exception.GetType()
Exception.ToString()
Exception.Data
Exception.HelpLink
Exception.HResult
Exception.InnerException
Exception.Message
Exception.Source
Exception.StackTrace
Exception.TargetSite
Exception.SerializeObjectState
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Namespace: Unity
Assembly: Unity.Abstractions.dll
Syntax
public class ResolutionFailedException : Exception, ISerializable

Constructors

| Improve this Doc View Source

ResolutionFailedException(Type, String, String, Exception)

Create a new ResolutionFailedException that records the exception for the given type and name.

Declaration
public ResolutionFailedException(Type type, string name, string message, Exception innerException = null)
Parameters
Type Name Description
Type type

Type requested from the container.

String name

Name requested from the container.

String message

Error message

Exception innerException

The actual exception that caused the failure of the build.

Properties

| Improve this Doc View Source

NameRequested

The name that was being requested from the container at the time of failure.

Declaration
public string NameRequested { get; }
Property Value
Type Description
String
| Improve this Doc View Source

TypeRequested

The type that was being requested from the container at the time of failure.

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

Implements

System.Runtime.Serialization.ISerializable

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