InjectAttribute Class

Definition

Indicates that the associated property should have a value injected from the service provider during initialization.

public ref class InjectAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public sealed class InjectAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type InjectAttribute = class
    inherit Attribute
Public NotInheritable Class InjectAttribute
Inherits Attribute
Inheritance
InjectAttribute
Attributes

Constructors

InjectAttribute()

Properties

Key

Gets or sets the object that specifies the key of the service to inject.

Applies to