Interface IContractToImplementorsMap

Namespace
Cratis.Types
Assembly
Cratis.Fundamentals.dll

Defines a system that handles the relationship between contracts and their implementors.

public interface IContractToImplementorsMap
Extension Methods

Remarks

A contract is considered an abstract type or an interface.

Properties

All

Gets all the types in the map.

IEnumerable<Type> All { get; }

Property Value

IEnumerable<Type>

ContractsAndImplementors

Gets the dictionary holding the mapping between contracts and all their implementors.

IDictionary<Type, IEnumerable<Type>> ContractsAndImplementors { get; }

Property Value

IDictionary<Type, IEnumerable<Type>>

Methods

Feed(IEnumerable<Type>)

Feed the map with types.

void Feed(IEnumerable<Type> types)

Parameters

types IEnumerable<Type>

Types to feed with.

GetImplementorsFor(Type)

Retrieve implementors of a specific contract.

IEnumerable<Type> GetImplementorsFor(Type contract)

Parameters

contract Type

Type of contract to retrieve for.

Returns

IEnumerable<Type>

Types implementing the contract.

GetImplementorsFor<T>()

Retrieve implementors of a specific contract.

IEnumerable<Type> GetImplementorsFor<T>()

Returns

IEnumerable<Type>

Types implementing the contract.

Type Parameters

T

Type of contract to retrieve for.