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
ContractsAndImplementors
Gets the dictionary holding the mapping between contracts and all their implementors.
public IDictionary<Type, IEnumerable<Type>> ContractsAndImplementors { get; }
Property Value
Methods
Feed(IDictionary<Type, IEnumerable<Type>>)
Feed the map with precomputed contract to implementor mappings.
public void Feed(IDictionary<Type, IEnumerable<Type>> contractsAndImplementors)
Parameters
contractsAndImplementorsIDictionary<Type, IEnumerable<Type>>Precomputed mappings.
Feed(IEnumerable<Type>)
Feed the map with types.
public void Feed(IEnumerable<Type> types)
Parameters
typesIEnumerable<Type>Types to feed with.
FeedTypes(IEnumerable<Type>)
Feed only the type index, without calculating contract mappings.
public void FeedTypes(IEnumerable<Type> types)
Parameters
typesIEnumerable<Type>Types to feed with.
GetImplementorsFor(Type)
Retrieve implementors of a specific contract.
public IEnumerable<Type> GetImplementorsFor(Type contract)
Parameters
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
TType of contract to retrieve for.