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