This topic has not yet been rated - Rate this topic

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
Did you find this helpful?
(1500 characters remaining)