Class ContractToImplementorsMap

Namespace
Cratis.Types
Assembly
Cratis.Fundamentals.dll

Represents an implementation of IContractToImplementorsMap.

public class ContractToImplementorsMap : IContractToImplementorsMap
Inheritance
ContractToImplementorsMap
Implements
Inherited Members
Extension Methods

Constructors

ContractToImplementorsMap()

public ContractToImplementorsMap()

Properties

All

Gets all the types in the map.

public IEnumerable<Type> All { get; }

Property Value

IEnumerable<Type>

ContractsAndImplementors

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

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

Property Value

IDictionary<Type, IEnumerable<Type>>

Methods

Feed(IDictionary<Type, IEnumerable<Type>>)

Feed the map with precomputed contract to implementor mappings.

public void Feed(IDictionary<Type, IEnumerable<Type>> contractsAndImplementors)

Parameters

contractsAndImplementors IDictionary<Type, IEnumerable<Type>>

Precomputed mappings.

Feed(IEnumerable<Type>)

Feed the map with types.

public void Feed(IEnumerable<Type> types)

Parameters

types IEnumerable<Type>

Types to feed with.

FeedTypes(IEnumerable<Type>)

Feed only the type index, without calculating contract mappings.

public void FeedTypes(IEnumerable<Type> types)

Parameters

types IEnumerable<Type>

Types to feed with.

GetImplementorsFor(Type)

Retrieve implementors of a specific contract.

public 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.

public IEnumerable<Type> GetImplementorsFor<T>()

Returns

IEnumerable<Type>

Types implementing the contract.

Type Parameters

T

Type of contract to retrieve for.