TypeTripletServer<T>

public sealed class TypeTripletServer<T>
A dictionary of type-triplets.
T

Properties

All

#
public IEnumerable<TypeTriplet> All { get; }
Enumerate over all triplets.

Count

#
public int Count { get; }
Gets the total number of defined type triplet.

Methods

Add

#
public bool Add(TypeTriplet triplet, T value)
Register a new triplet + value.
triplet (TypeTriplet)
value (T)
True if triplet was added, false if it conflicted with an already defined triplet.

AllA

#
public IEnumerable<TypeTriplet> AllA(Type typeOfA)
Enumerate over all triplets which have a matching typeA or one of typeA's base classes or interfaces.
typeOfA (Type)

CountA

#
public int CountA(Type a)
Gets the number of defined triplet whose 'A' type matches the given type.
a (Type)

CountB

#
public int CountB(Type b)
Gets the number of defined pairs whose 'B' type matches the given type.
b (Type)

CountC

#
public int CountC(Type c)
Gets the number of defined pairs whose 'C' type matches the given type.
c (Type)

Get

#
public bool Get(TypeTriplet triplet, out T value)
Try and get the value associated with the given triplet.
triplet (TypeTriplet)Triplet to search for.
value (out T)Value associated with (a,b).
True if the triplet is known.

Has

#
public bool Has(TypeTriplet triplet)
Tests whether a specific triplet has been defined and is available.
triplet (TypeTriplet)
True if triplet has been defined.