Show / Hide Table of Contents

Class IntervalExtensions

Set of extensions methods for the Alpaca.Markets.Interval<TItem> structure.

Inheritance
System.Object
IntervalExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Alpaca.Markets
Assembly: Alpaca.Markets.dll
Syntax
public static class IntervalExtensions

Methods

| Improve this Doc View Source

AsDateInterval(Interval<DateTime>)

Converts a Alpaca.Markets.Interval<TItem> Interval into a Alpaca.Markets.Interval<TItem> Interval.

Declaration
public static Interval<DateOnly> AsDateInterval(this Interval<DateTime> interval)
Parameters
Type Name Description
Alpaca.Markets.Interval<DateTime> interval

Input inclusive time interval for converting.

Returns
Type Description
Alpaca.Markets.Interval<DateOnly>

Date interval initialized with data from the original inclusive time interval.

| Improve this Doc View Source

AsTimeInterval(Interval<DateOnly>)

Converts a Alpaca.Markets.Interval<TItem> Interval into a Alpaca.Markets.Interval<TItem> Interval.

Declaration
public static Interval<DateTime> AsTimeInterval(this Interval<DateOnly> interval)
Parameters
Type Name Description
Alpaca.Markets.Interval<DateOnly> interval

Input date interval for converting.

Returns
Type Description
Alpaca.Markets.Interval<DateTime>

Inclusive time interval initialized with data from the original date interval.

| Improve this Doc View Source

GetIntervalFromThat<TItem>(TItem)

Gets exclusive open time interval starting from the from date/time point.

Declaration
public static Interval<TItem> GetIntervalFromThat<TItem>(this TItem from)
    where TItem : struct, IComparable<TItem>
Parameters
Type Name Description
TItem from

Starting point for filtering.

Returns
Type Description
Alpaca.Markets.Interval<TItem>

Exclusive open time interval.

Type Parameters
Name Description
TItem
| Improve this Doc View Source

GetIntervalTillThat<TItem>(TItem)

Gets exclusive open time interval ending at the into date/time point.

Declaration
public static Interval<TItem> GetIntervalTillThat<TItem>(this TItem into)
    where TItem : struct, IComparable<TItem>
Parameters
Type Name Description
TItem into

Ending point for filtering.

Returns
Type Description
Alpaca.Markets.Interval<TItem>

Exclusive open time interval.

Type Parameters
Name Description
TItem
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX