TypeOverlap

References
public sealed class TypeOverlap
Utility class for figuring out what base classes and interfaces a collection of types have in common.

Constructors

TypeOverlap

#
Create a new resolver based on a specific type.
public TypeOverlap(
initial
Initial type.
)

Properties

CommonInterfaceCount

#
Gets the number of interfaces shared by all resolved types.
public int CommonInterfaceCount { get; }

CommonInterfaces

#
Enumerate over all interfaces that all resolved types have in common.
public IEnumerable<Type> CommonInterfaces { get; }

CommonType

#
Gets the most-derived type still compatible with all resolved types.
public Type CommonType { get; }

Methods

DetermineOverlap

#
Determine the type shared amongst all values in a collection.
public static Type DetermineOverlap(
collection,
Value.
initialConstraint = null
Optional initial type.
)
Type shared amongst all values, or null if there are no values.

Include

#
Resolve an additional type.
public Overlap Include(
type
Type to resolve.
)
True if the resolution state of this instance was modified.

ToString

#
Returns a string that represents the current object.
public override string ToString()
A string that represents the current object.
Object.ToString

Convertors

OperationResultDescription
implicitTypeTypeOverlap