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
value
Bounds<T>Single range.
Returns
- BoundsRange<T>
New BoundsRange<T> instance.
Type Parameters
T
Value 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
range
IEnumerable<Bounds<T>>Collection of ranges.
Returns
- BoundsRange<T>
New BoundsRange<T> instance.
Type Parameters
T
Value type.
Exceptions
- ArgumentException
When
range
is not ordered.
GetUnderlyingType(Type?)
Attempts to extract the underlying type from the provided BoundsRange<T>type
.
[Pure]
public static Type? GetUnderlyingType(Type? type)
Parameters
type
TypeType to extract the underlying type from.
Returns
- Type
Underlying BoundsRange<T> type or null when the provided
type
is not related to the BoundsRange<T> type.