指示可查询可观测序列的每个元素进入基于元素计数信息生成的连续非重叠缓冲区。
Namespace:System.Reactive.Linq
装配: System.Reactive.Providers.dll) 中的 System.Reactive.Providers (
语法
'Declaration
<ExtensionAttribute> _
Public Shared Function Buffer(Of TSource) ( _
source As IQbservable(Of TSource), _
count As Integer _
) As IQbservable(Of IList(Of TSource))
'Usage
Dim source As IQbservable(Of TSource)
Dim count As Integer
Dim returnValue As IQbservable(Of IList(Of TSource))
returnValue = source.Buffer(count)
public static IQbservable<IList<TSource>> Buffer<TSource>(
this IQbservable<TSource> source,
int count
)
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<IList<TSource>^>^ Buffer(
IQbservable<TSource>^ source,
int count
)
static member Buffer :
source:IQbservable<'TSource> *
count:int -> IQbservable<IList<'TSource>>
JScript does not support generic types and methods.
类型参数
- TSource
类型源。
参数
- source
类型: System.Reactive.Linq.IQbservable<TSource>
要生成缓冲区的源序列。
- count
类型: System.Int32
每个缓冲区的长度。
返回值
类型: System.Reactive.Linq.IQbservable<IList<TSource>>
可查询的可观察缓冲区序列。
使用说明
在 Visual Basic 和 C# 中,可以将此方法作为 IQbservable<TSource> 类型的任何对象的实例方法调用。 当使用实例方法语法调用此方法时,请省略第一个参数。 有关详细信息,请参阅或。