Observable.MaxBy<TSource、TKey> メソッド (IObservable<TSource>、Func<TSource、TKey>、IComparer<TKey>)

最大キー値を持つ監視可能なシーケンス内の要素を返します。

Namespace:System.Reactive.Linq
アセンブリ: System.Reactive (System.Reactive.dll)

構文

'Declaration
<ExtensionAttribute> _
Public Shared Function MaxBy(Of TSource, TKey) ( _
    source As IObservable(Of TSource), _
    keySelector As Func(Of TSource, TKey), _
    comparer As IComparer(Of TKey) _
) As IObservable(Of IList(Of TSource))
'Usage
Dim source As IObservable(Of TSource)
Dim keySelector As Func(Of TSource, TKey)
Dim comparer As IComparer(Of TKey)
Dim returnValue As IObservable(Of IList(Of TSource))

returnValue = source.MaxBy(keySelector, _
    comparer)
public static IObservable<IList<TSource>> MaxBy<TSource, TKey>(
    this IObservable<TSource> source,
    Func<TSource, TKey> keySelector,
    IComparer<TKey> comparer
)
[ExtensionAttribute]
public:
generic<typename TSource, typename TKey>
static IObservable<IList<TSource>^>^ MaxBy(
    IObservable<TSource>^ source, 
    Func<TSource, TKey>^ keySelector, 
    IComparer<TKey>^ comparer
)
static member MaxBy : 
        source:IObservable<'TSource> * 
        keySelector:Func<'TSource, 'TKey> * 
        comparer:IComparer<'TKey> -> IObservable<IList<'TSource>> 
JScript does not support generic types and methods.

型パラメーター

  • TSource
    ソースの種類。
  • TKey
    キーの種類。

パラメーター

  • source
    種類: System.IObservable<TSource>
    最大要素を取得する監視可能なシーケンス。
  • keySelector
    種類: System.Func<TSource、TKey>
    キー セレクター関数。

戻り値

種類: System.IObservable<IList<TSource>>
最大キー値を持つ監視可能なシーケンス内の要素。

使用上の注意

Visual Basic および C# では、 IObservable<TSource> 型の任意のオブジェクトでインスタンス メソッドとしてこのメソッドを呼び出すことができます。 インスタンス メソッド構文を使用してこのメソッドを呼び出す場合は、最初のパラメーターを省略します。 詳細については、」または」を参照してください。

参照

リファレンス

Observable クラス

MaxBy オーバーロード

System.Reactive.Linq 名前空間