C# Class Ninject.NamedAttribute

Indicates that the decorated member should only be injected using binding(s) registered with the specified name.
Inheritance: ConstraintAttribute
显示文件 Open project: ninject/Ninject Class Usage Examples

Public Methods

Method Description
Matches ( IBindingMetadata metadata ) : bool

Determines whether the specified binding metadata matches the constraint.

NamedAttribute ( string name ) : System.Diagnostics.Contracts

Initializes a new instance of the NamedAttribute class.

Method Details

Matches() public method

Determines whether the specified binding metadata matches the constraint.
public Matches ( IBindingMetadata metadata ) : bool
metadata IBindingMetadata The metadata in question.
return bool

NamedAttribute() public method

Initializes a new instance of the NamedAttribute class.
public NamedAttribute ( string name ) : System.Diagnostics.Contracts
name string The name of the binding(s) to use.
return System.Diagnostics.Contracts