Export (0) Print
Expand All

OptionalDependencyAttribute Class

An DependencyResolutionAttribute used to mark a dependency as optional - the container will try to resolve it, and return null if the resolution fails rather than throw.

Namespace:  Microsoft.Practices.Unity
Assembly:  Microsoft.Practices.Unity (in Microsoft.Practices.Unity.dll)

[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Parameter, AllowMultiple = false)]
public sealed class OptionalDependencyAttribute : DependencyResolutionAttribute

System.Object
  System.Attribute
    Microsoft.Practices.Unity.DependencyResolutionAttribute
      Microsoft.Practices.Unity.OptionalDependencyAttribute
Show:
© 2014 Microsoft