Class BoundsRange
- Namespace
- LfrlAnvil
- Assembly
- LfrlAnvil.Core.dll
Creates instances of BoundsRange<T> type.
public static class BoundsRange
- Inheritance
-
BoundsRange
- Inherited Members
Methods
Create<T>(Bounds<T>)
Creates a new BoundsRange<T> instance from a single Bounds<T> instance.
[Pure]
public static BoundsRange<T> Create<T>(Bounds<T> value) where T : IComparable<T>
Parameters
valueBounds<T>Single range.
Returns
- BoundsRange<T>
New BoundsRange<T> instance.
Type Parameters
TValue type.
Create<T>(IEnumerable<Bounds<T>>)
Creates a new BoundsRange<T> instance from a collection of Bounds<T> instances.
[Pure]
public static BoundsRange<T> Create<T>(IEnumerable<Bounds<T>> range) where T : IComparable<T>
Parameters
rangeIEnumerable<Bounds<T>>Collection of ranges.
Returns
- BoundsRange<T>
New BoundsRange<T> instance.
Type Parameters
TValue type.
Exceptions
- ArgumentException
When
rangeis not ordered.
GetUnderlyingType(Type?)
Attempts to extract the underlying type from the provided BoundsRange<T>type.
[Pure]
public static Type? GetUnderlyingType(Type? type)
Parameters
typeTypeType to extract the underlying type from.
Returns
- Type
Underlying BoundsRange<T> type or null when the provided
typeis not related to the BoundsRange<T> type.