Udostępnij za pośrednictwem


Observable.Buffer<TSource, metoda (IObservable<TSource>>, TimeSpan, Int32, IScheduler)

Wskazuje każdy element sekwencji możliwej do obserwacji w buforze, który jest wysyłany, gdy jest pełny lub jakiś czas upłynął.

Przestrzeń nazw:System.Reactive.Linq
Zestawu: System.Reaktywny (w System.Reactive.dll)

Składnia

'Declaration
<ExtensionAttribute> _
Public Shared Function Buffer(Of TSource) ( _
    source As IObservable(Of TSource), _
    timeSpan As TimeSpan, _
    count As Integer, _
    scheduler As IScheduler _
) As IObservable(Of IList(Of TSource))
'Usage
Dim source As IObservable(Of TSource)
Dim timeSpan As TimeSpan
Dim count As Integer
Dim scheduler As IScheduler
Dim returnValue As IObservable(Of IList(Of TSource))

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

Parametry typu

  • Tsource
    Źródło typu.

Parametry

  • count
    Typ: System.Int32
    Maksymalna liczba elementów buforu.

Wartość zwracana

Typ: System.IObservable<IList<TSource>>
Obserwowana sekwencja buforów.

Uwaga dotycząca użycia

W języku Visual Basic i C#można wywołać tę metodę jako metodę wystąpienia w dowolnym obiekcie typu IObservable<TSource>. Gdy w celu wywołania tej metody jest używana składnia metody wystąpienia, należy pominąć pierwszy parametr. Aby uzyskać więcej informacji, zobacz lub .

Zobacz też

Odwołanie

Obserwowana klasa

Przeciążenie buforu

Przestrzeń nazw System.Reactive.Linq