Table of Contents

Class SingleRanges

Namespace
Utils.Range
Assembly
Utils.dll

Represents a collection of ranges for float values, with parsing support from string representations.

public class SingleRanges : Ranges<float>, IFormattable, IEquatable<Ranges<float>>, ISubtractionOperators<Ranges<float>, Ranges<float>, Ranges<float>>, IEqualityOperators<Ranges<float>, Ranges<float>, bool>
Inheritance
SingleRanges
Implements
Inherited Members
Extension Methods

Constructors

SingleRanges()

Initializes a new instance of the SingleRanges class with no ranges.

public SingleRanges()

SingleRanges(IEnumerable<IRange<float>>)

Initializes a new instance of the SingleRanges class with interface-based ranges.

public SingleRanges(IEnumerable<IRange<float>> ranges)

Parameters

ranges IEnumerable<IRange<float>>

The ranges to include in the collection.

SingleRanges(IEnumerable<Range<float>>)

Initializes a new instance of the SingleRanges class with ranges supplied as an enumerable collection.

public SingleRanges(IEnumerable<Range<float>> ranges)

Parameters

ranges IEnumerable<Range<float>>

The ranges to include in the collection.

SingleRanges(Ranges<float>)

Initializes a new instance of the SingleRanges class by copying existing ranges.

public SingleRanges(Ranges<float> ranges)

Parameters

ranges Ranges<float>

The ranges to copy into this collection.

SingleRanges(params Range<float>[])

Initializes a new instance of the SingleRanges class with the provided ranges.

public SingleRanges(params Range<float>[] ranges)

Parameters

ranges Range<float>[]

The ranges to include in the collection.

Methods

Add(string)

Adds ranges to the collection by parsing them from a string using the current culture.

public void Add(string ranges)

Parameters

ranges string

The string representation of the ranges to add.

Add(string, CultureInfo)

Adds ranges to the collection by parsing them from a string using a specified culture.

public void Add(string ranges, CultureInfo cultureInfo)

Parameters

ranges string

The string representation of the ranges to add.

cultureInfo CultureInfo

The culture information to use for parsing.

Add(string, NumberFormatInfo)

Adds ranges to the collection by parsing them from a string using a specified number format.

public void Add(string ranges, NumberFormatInfo formatInfo)

Parameters

ranges string

The string representation of the ranges to add.

formatInfo NumberFormatInfo

The number format information to use for parsing.

InnerParse(string, NumberFormatInfo)

Helper method to parse ranges from a string using specified number format information.

protected static IEnumerable<IRange<float>> InnerParse(string range, NumberFormatInfo formatInfo)

Parameters

range string

The string representation of the ranges.

formatInfo NumberFormatInfo

The number format information to use for parsing.

Returns

IEnumerable<IRange<float>>

An enumerable collection of Range<float> objects parsed from the string.

Parse(string)

Parses a string representation of ranges into a SingleRanges object using the current culture.

public static SingleRanges Parse(string range)

Parameters

range string

The string representation of the ranges.

Returns

SingleRanges

A SingleRanges object containing the parsed ranges.

Parse(string, CultureInfo)

Parses a string representation of ranges into a SingleRanges object using a specified culture.

public static SingleRanges Parse(string range, CultureInfo cultureInfo)

Parameters

range string

The string representation of the ranges.

cultureInfo CultureInfo

The culture information to use for parsing.

Returns

SingleRanges

A SingleRanges object containing the parsed ranges.

Parse(string, NumberFormatInfo)

Parses a string representation of ranges into a SingleRanges object using a specified number format.

public static SingleRanges Parse(string range, NumberFormatInfo formatInfo)

Parameters

range string

The string representation of the ranges.

formatInfo NumberFormatInfo

The number format information to use for parsing.

Returns

SingleRanges

A SingleRanges object containing the parsed ranges.