[]
        
(Showing Draft Content)

C1.WPF.Core.Range-1

Range<T> Class

Represents a range of items.

Inheritance
Range<T>
Namespace: C1.WPF.Core
Assembly: C1.WPF.Core.dll
Syntax
public class Range<T> : IComparable<Range<T>>, IComparable<T>, IComparable where T : IComparable<T>, IConvertible
Type Parameters
Name Description
T

The range type.

Properties

Name Description
Length

Return length of range

LowerBound

The start of the range.

UpperBound

The upper bound of the range.

Methods

Name Description
CompareTo(Range<T>)

See CompareTo(T).

CompareTo(object)

See CompareTo(object).

CompareTo(T)

See CompareTo(T).

Complement(Range<T>)

Returns a range which contains the current range, minus

value
.
Contains(Range<T>)

Indicates if the range contains

value
.
Contains(T)

Indicates if the range contains

value
.
Equals(object)

See Equals(object).

GetHashCode()

See GetHashCode().

Intersect(Range<T>)

Returns the range that represents the intersection of this range and

value
.
IsContainedBy(Range<T>)

Indicates if the range is contained by

value
.
IsContiguousWith(Range<T>)

Indicates if this range is contiguous with

range
.
IsJoinableWith(Range<T>, Func<T, T>)

Check value is join with this range

Iterate(Func<T, T>)

Iterates the range.

Join(Range<T>, Func<T, T>)

Return new range which joined by value with this range

Overlaps(Range<T>)

Indicates if the range overlaps

value
.
ReverseIterate(Func<T, T>)

Iterates the range in reverse.

Split(T)

Splits the range into two.

Substract(Range<T>, Func<T, T>, Func<T, T>)

Returns the result of subtracting a range to the current one. This could lead to a split range in case the one that is being subtracted is contained in the current one.

ToString()

See ToString().

Union(Range<T>)

Returns the range that represents the union of this range and

value
.

Operators

Name Description
operator &(Range<T>, Range<T>)

The intersection operator.

operator |(Range<T>, Range<T>)

The union operator.

operator ==(Range<T>, Range<T>)

Overrides the equals operator.

operator ^(Range<T>, Range<T>)

The complement operator.

operator >(Range<T>, Range<T>)

Overrides the greater than operator.

operator >(Range<T>, T)

Overrides the greater than operator.

operator >=(Range<T>, Range<T>)

Overrides the greater than or equal operator.

operator >=(Range<T>, T)

Overrides the greater than or equals operator.

operator !=(Range<T>, Range<T>)

Overrides the not equals operator.

operator <(Range<T>, Range<T>)

Overrides the less than operator.

operator <(Range<T>, T)

Overrides the less than operator.

operator <=(Range<T>, Range<T>)

Overrides the less than or equal to operator.

operator <=(Range<T>, T)

Overrides the less than or equals operator.