C# Class Hiro.BaseDependencyMap

Represents a class that can map dependencies to implementations.
Inheritance: IDependencyMap
Show file Open project: philiplaureano/Hiro

Protected Properties

Property Type Description
_entries IImplementation>.HashList

Public Methods

Method Description
AddService ( IDependency dependency, IImplementation implementation ) : void

Associates the given implementation with the target dependency.

Contains ( IDependency dependency ) : bool

Determines whether or not a particular service dependency exists in the current dependency container.

Equals ( object other ) : bool

Determines whether the specified System.Object is equal to the current System.Object.

GetHashCode ( ) : int

Serves as a hash function for a particular type.

GetImplementations ( IDependency targetDependency, bool addIncompleteImplementations ) : IEnumerable

Gets the current list of implementations for the current dependency.

Method Details

AddService() public method

Associates the given implementation with the target dependency.
public AddService ( IDependency dependency, IImplementation implementation ) : void
dependency IDependency The dependency that will be associated with the implementation.
implementation IImplementation The implementation itself.
return void

Contains() public method

Determines whether or not a particular service dependency exists in the current dependency container.
public Contains ( IDependency dependency ) : bool
dependency IDependency The target service dependency.
return bool

Equals() public method

Determines whether the specified System.Object is equal to the current System.Object.
public Equals ( object other ) : bool
other object The System.Object to compare with the current System.Object.
return bool

GetHashCode() public method

Serves as a hash function for a particular type.
public GetHashCode ( ) : int
return int

GetImplementations() public method

Gets the current list of implementations for the current dependency.
public GetImplementations ( IDependency targetDependency, bool addIncompleteImplementations ) : IEnumerable
targetDependency IDependency The target dependency.
addIncompleteImplementations bool A boolean flag that determines whether or not the resulting list should include implementations with incomplete dependencies.
return IEnumerable

Property Details

_entries protected property

The list of dependencies in the current map.
protected HashList _entries
return IImplementation>.HashList