Show / Hide Table of Contents

Class AlpacaDataSubscriptionExtensions

Set of extension methods for the IAlpacaDataSubscription<TApi> interface.

Inheritance
System.Object
AlpacaDataSubscriptionExtensions
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.Extensions
Assembly: Alpaca.Markets.Extensions.dll
Syntax
public static class AlpacaDataSubscriptionExtensions

Methods

| Improve this Doc View Source

AsAsyncEnumerable<TItem>(IAlpacaDataSubscription<TItem>)

Converts Received event into asynchronous enumerable (reactive event consuming style) using unbound channel.

Declaration
public static IAsyncEnumerable<TItem> AsAsyncEnumerable<TItem>(this IAlpacaDataSubscription<TItem> subscription)
Parameters
Type Name Description
IAlpacaDataSubscription<TItem> subscription

Original subscription object for wrapping.

Returns
Type Description
IAsyncEnumerable<TItem>

Stream of items received from server in form of async enumerable.

Type Parameters
Name Description
TItem

Type of streaming item provided via subscription object.

| Improve this Doc View Source

AsAsyncEnumerable<TItem>(IAlpacaDataSubscription<TItem>, CancellationToken)

Converts Received event into asynchronous enumerable (reactive event consuming style) using unbound channel.

Declaration
public static async IAsyncEnumerable<TItem> AsAsyncEnumerable<TItem>(this IAlpacaDataSubscription<TItem> subscription, CancellationToken cancellationToken)
Parameters
Type Name Description
IAlpacaDataSubscription<TItem> subscription

Original subscription object for wrapping.

CancellationToken cancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns
Type Description
IAsyncEnumerable<TItem>

Stream of items received from server in form of async enumerable.

Type Parameters
Name Description
TItem

Type of streaming item provided via subscription object.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX