Click to Rate and Give Feedback
Collapse All/Expand All Collapse All
Unity Application Block 2.0 - April 2010
DependencyAttribute Class

This attribute is used to mark properties and parameters as targets for injection.

Namespace:  Microsoft.Practices.Unity
Assembly:  Microsoft.Practices.Unity (in Microsoft.Practices.Unity.dll)
Visual Basic (Declaration)
<AttributeUsageAttribute(AttributeTargets.Property Or AttributeTargets.Parameter, AllowMultiple := False,  _
    Inherited := True)> _
Public NotInheritable Class DependencyAttribute _
    Inherits DependencyResolutionAttribute
C#
[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Parameter, AllowMultiple = false, 
    Inherited = true)]
public sealed class DependencyAttribute : DependencyResolutionAttribute
Visual C++
[AttributeUsageAttribute(AttributeTargets::Property|AttributeTargets::Parameter, AllowMultiple = false, 
    Inherited = true)]
public ref class DependencyAttribute sealed : public DependencyResolutionAttribute
JScript
public final class DependencyAttribute extends DependencyResolutionAttribute
For properties, this attribute is necessary for injection to happen. For parameters, it's not needed unless you want to specify additional information to control how the parameter is resolved.
System..::.Object
  System..::.Attribute
    Microsoft.Practices.Unity..::.DependencyResolutionAttribute
      Microsoft.Practices.Unity..::.DependencyAttribute
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker