Freigeben über


RuleDrivenPolicyElementConfigurationElement.Lifetime Property

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

The latest Unity Application Block information can be found at the Unity Application Block site.

Sets the lifetime for the given type and name. Transient means to create a new instance every type and is the default. Singleton means to return the same instance on every request.

Namespace:  Microsoft.Practices.Unity.InterceptionExtension.Configuration
Assembly:  Microsoft.Practices.Unity.Interception.Configuration (in Microsoft.Practices.Unity.Interception.Configuration.dll)

Syntax

'Declaration
<ConfigurationPropertyAttribute("lifetime", IsRequired := False)> _
Public Property Lifetime As UnityLifetimeElement
[ConfigurationPropertyAttribute("lifetime", IsRequired = false)]
public UnityLifetimeElement Lifetime { get; set; }
[ConfigurationPropertyAttribute(L"lifetime", IsRequired = false)]
public:
property UnityLifetimeElement^ Lifetime {
    UnityLifetimeElement^ get ();
    void set (UnityLifetimeElement^ value);
}
public function get Lifetime () : UnityLifetimeElement
public function set Lifetime (value : UnityLifetimeElement)

See Also

RuleDrivenPolicyElementConfigurationElement Class

Microsoft.Practices.Unity.InterceptionExtension.Configuration Namespace