Qbservable.Buffer<TSource> 方法 (IQbservable<TSource>、TimeSpan、TimeSpan)

指示可查询可观测序列的每个元素成零个或多个缓冲区,这些缓冲区基于计时信息生成。

Namespace:System.Reactive.Linq
装配: system.Reactive.Providers 在 System.Reactive.Providers.dll) 中 (

语法

'Declaration
<ExtensionAttribute> _
Public Shared Function Buffer(Of TSource) ( _
    source As IQbservable(Of TSource), _
    timeSpan As TimeSpan, _
    timeShift As TimeSpan _
) As IQbservable(Of IList(Of TSource))
'Usage
Dim source As IQbservable(Of TSource)
Dim timeSpan As TimeSpan
Dim timeShift As TimeSpan
Dim returnValue As IQbservable(Of IList(Of TSource))

returnValue = source.Buffer(timeSpan, _
    timeShift)
public static IQbservable<IList<TSource>> Buffer<TSource>(
    this IQbservable<TSource> source,
    TimeSpan timeSpan,
    TimeSpan timeShift
)
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<IList<TSource>^>^ Buffer(
    IQbservable<TSource>^ source, 
    TimeSpan timeSpan, 
    TimeSpan timeShift
)
static member Buffer : 
        source:IQbservable<'TSource> * 
        timeSpan:TimeSpan * 
        timeShift:TimeSpan -> IQbservable<IList<'TSource>> 
JScript does not support generic types and methods.

类型参数

  • TSource
    类型源。

parameters

  • timeShift
    类型: System.TimeSpan
    创建连续缓冲区之间的间隔。

返回值

类型: System.Reactive.Linq.IQbservable<IList<TSource>>
可查询的可观测缓冲区序列。

使用说明

在 Visual Basic 和 C# 中,可以在 IQbservable<TSource> 类型的任何对象上调用此方法作为实例方法。 当使用实例方法语法调用此方法时,请省略第一个参数。 有关详细信息,请参阅

另请参阅

参考

Qbservable 类

缓冲区重载

System.Reactive.Linq 命名空间