IProducerConsumerCollection<T> インターフェイス
定義
プロデューサーまたはコンシューマーが使用するためのスレッド セーフなコレクションを操作するメソッドを定義します。Defines methods to manipulate thread-safe collections intended for producer/consumer usage. このインスタンスには、プロデューサー/コンシューマー コレクションの統一された表現が用意されています。BlockingCollection<T> のような高度な抽象化では、基になるストレージ機構としてこのコレクションを使用できます。This interface provides a unified representation for producer/consumer collections so that higher level abstractions such as BlockingCollection<T> can use the collection as the underlying storage mechanism.
generic <typename T>
public interface class IProducerConsumerCollection : System::Collections::Generic::IEnumerable<T>, System::Collections::ICollection
public interface IProducerConsumerCollection<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.ICollection
type IProducerConsumerCollection<'T> = interface
interface seq<'T>
interface IEnumerable
interface ICollection
type IProducerConsumerCollection<'T> = interface
interface seq<'T>
interface ICollection
interface IEnumerable
Public Interface IProducerConsumerCollection(Of T)
Implements ICollection, IEnumerable(Of T)
型パラメーター
- T
コレクション内の要素の型を指定します。Specifies the type of elements in the collection.
- 派生
- 実装
例
次の例は、を実装するスタックデータ構造を示して System.Collections.Concurrent.IProducerConsumerCollection<T> います。The following example shows a stack data structure that implements System.Collections.Concurrent.IProducerConsumerCollection<T>.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
// Sample implementation of IProducerConsumerCollection(T)
// -- in this case, a thread-safe stack.
public class SafeStack<T> : IProducerConsumerCollection<T>
{
// Used for enforcing thread-safety
private object m_lockObject = new object();
// We'll use a regular old Stack for our core operations
private Stack<T> m_sequentialStack = null;
//
// Constructors
//
public SafeStack()
{
m_sequentialStack = new Stack<T>();
}
public SafeStack(IEnumerable<T> collection)
{
m_sequentialStack = new Stack<T>(collection);
}
//
// Safe Push/Pop support
//
public void Push(T item)
{
lock (m_lockObject) m_sequentialStack.Push(item);
}
public bool TryPop(out T item)
{
bool rval = true;
lock (m_lockObject)
{
if (m_sequentialStack.Count == 0) { item = default(T); rval = false; }
else
{
item = m_sequentialStack.Pop();
}
}
return rval;
}
//
// IProducerConsumerCollection(T) support
//
public bool TryTake(out T item)
{
return TryPop(out item);
}
public bool TryAdd(T item)
{
Push(item);
return true; // Push doesn't fail
}
public T[] ToArray()
{
T[] rval = null;
lock (m_lockObject) rval = m_sequentialStack.ToArray();
return rval;
}
public void CopyTo(T[] array, int index)
{
lock (m_lockObject) m_sequentialStack.CopyTo(array, index);
}
//
// Support for IEnumerable(T)
//
public IEnumerator<T> GetEnumerator()
{
// The performance here will be unfortunate for large stacks,
// but thread-safety is effectively implemented.
Stack<T> stackCopy = null;
lock (m_lockObject) stackCopy = new Stack<T>(m_sequentialStack);
return stackCopy.GetEnumerator();
}
//
// Support for IEnumerable
//
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<T>)this).GetEnumerator();
}
//
// Support for ICollection
//
public bool IsSynchronized
{
get { return true; }
}
public object SyncRoot
{
get { return m_lockObject; }
}
public int Count
{
get { return m_sequentialStack.Count; }
}
public void CopyTo(Array array, int index)
{
lock (m_lockObject) ((ICollection)m_sequentialStack).CopyTo(array, index);
}
}
public class Program
{
static void Main()
{
TestSafeStack();
// Keep the console window open in debug mode.
Console.WriteLine("Press any key to exit.");
Console.ReadKey();
}
// Test our implementation of IProducerConsumerCollection(T)
// Demonstrates:
// IPCC(T).TryAdd()
// IPCC(T).TryTake()
// IPCC(T).CopyTo()
static void TestSafeStack()
{
SafeStack<int> stack = new SafeStack<int>();
IProducerConsumerCollection<int> ipcc = (IProducerConsumerCollection<int>)stack;
// Test Push()/TryAdd()
stack.Push(10); Console.WriteLine("Pushed 10");
ipcc.TryAdd(20); Console.WriteLine("IPCC.TryAdded 20");
stack.Push(15); Console.WriteLine("Pushed 15");
int[] testArray = new int[3];
// Try CopyTo() within boundaries
try
{
ipcc.CopyTo(testArray, 0);
Console.WriteLine("CopyTo() within boundaries worked, as expected");
}
catch (Exception e)
{
Console.WriteLine("CopyTo() within boundaries unexpectedly threw an exception: {0}", e.Message);
}
// Try CopyTo() that overflows
try
{
ipcc.CopyTo(testArray, 1);
Console.WriteLine("CopyTo() with index overflow worked, and it SHOULD NOT HAVE");
}
catch (Exception e)
{
Console.WriteLine("CopyTo() with index overflow threw an exception, as expected: {0}", e.Message);
}
// Test enumeration
Console.Write("Enumeration (should be three items): ");
foreach (int item in stack) Console.Write("{0} ", item);
Console.WriteLine("");
// Test TryPop()
int popped = 0;
if (stack.TryPop(out popped))
{
Console.WriteLine("Successfully popped {0}", popped);
}
else
{
Console.WriteLine("FAILED to pop!!");
}
// Test Count
Console.WriteLine("stack count is {0}, should be 2", stack.Count);
// Test TryTake()
if (ipcc.TryTake(out popped))
{
Console.WriteLine("Successfully IPCC-TryTaked {0}", popped);
}
else
{
Console.WriteLine("FAILED to IPCC.TryTake!!");
}
}
}
Imports System.Collections.Concurrent
Module IProdCon
' Sample implementation of IProducerConsumerCollection(T) -- in this case,
' a thread-safe stack.
Public Class SafeStack(Of T)
Implements IProducerConsumerCollection(Of T)
' Used for enforcing thread-safety
Private m_lockObject As New Object()
' We'll use a regular old Stack for our core operations
Private m_sequentialStack As Stack(Of T) = Nothing
'
' Constructors
'
Public Sub New()
m_sequentialStack = New Stack(Of T)()
End Sub
Public Sub New(ByVal collection As IEnumerable(Of T))
m_sequentialStack = New Stack(Of T)(collection)
End Sub
'
' Safe Push/Pop support
'
Public Sub Push(ByVal item As T)
SyncLock m_lockObject
m_sequentialStack.Push(item)
End SyncLock
End Sub
Public Function TryPop(ByRef item As T) As Boolean
Dim rval As Boolean = True
SyncLock m_lockObject
If m_sequentialStack.Count = 0 Then
item = Nothing
rval = False
Else
item = m_sequentialStack.Pop()
End If
End SyncLock
Return rval
End Function
'
' IProducerConsumerCollection(T) support
'
Public Function TryTake(ByRef item As T) As Boolean Implements IProducerConsumerCollection(Of T).TryTake
Return TryPop(item)
End Function
Public Function TryAdd(ByVal item As T) As Boolean Implements IProducerConsumerCollection(Of T).TryAdd
Push(item)
' Push doesn't fail
Return True
End Function
Public Function ToArray() As T() Implements IProducerConsumerCollection(Of T).ToArray
Dim rval As T() = Nothing
SyncLock m_lockObject
rval = m_sequentialStack.ToArray()
End SyncLock
Return rval
End Function
Public Sub CopyTo(ByVal array As T(), ByVal index As Integer) Implements IProducerConsumerCollection(Of T).CopyTo
SyncLock m_lockObject
m_sequentialStack.CopyTo(array, index)
End SyncLock
End Sub
'
' Support for IEnumerable(T)
'
Public Function GetEnumerator() As IEnumerator(Of T) Implements IEnumerable(Of T).GetEnumerator
' The performance here will be unfortunate for large stacks,
' but thread-safety is effectively implemented.
Dim stackCopy As Stack(Of T) = Nothing
SyncLock m_lockObject
stackCopy = New Stack(Of T)(m_sequentialStack)
End SyncLock
Return stackCopy.GetEnumerator()
End Function
'
' Support for IEnumerable
'
Private Function GetEnumerator2() As IEnumerator Implements IEnumerable.GetEnumerator
Return DirectCast(Me, IEnumerable(Of T)).GetEnumerator()
End Function
'
' Support for ICollection
'
Public ReadOnly Property IsSynchronized() As Boolean Implements ICollection.IsSynchronized
Get
Return True
End Get
End Property
Public ReadOnly Property SyncRoot() As Object Implements ICollection.SyncRoot
Get
Return m_lockObject
End Get
End Property
Public ReadOnly Property Count() As Integer Implements ICollection.Count
Get
Return m_sequentialStack.Count
End Get
End Property
Public Sub CopyTo(ByVal array As Array, ByVal index As Integer) Implements ICollection.CopyTo
SyncLock m_lockObject
DirectCast(m_sequentialStack, ICollection).CopyTo(array, index)
End SyncLock
End Sub
End Class
' Test our implementation of IProducerConsumerCollection(T)
' Demonstrates:
' IPCC(T).TryAdd()
' IPCC(T).TryTake()
' IPCC(T).CopyTo()
Private Sub TestSafeStack()
Dim stack As New SafeStack(Of Integer)()
Dim ipcc As IProducerConsumerCollection(Of Integer) = DirectCast(stack, IProducerConsumerCollection(Of Integer))
' Test Push()/TryAdd()
stack.Push(10)
Console.WriteLine("Pushed 10")
ipcc.TryAdd(20)
Console.WriteLine("IPCC.TryAdded 20")
stack.Push(15)
Console.WriteLine("Pushed 15")
Dim testArray As Integer() = New Integer(2) {}
' Try CopyTo() within boundaries
Try
ipcc.CopyTo(testArray, 0)
Console.WriteLine("CopyTo() within boundaries worked, as expected")
Catch e As Exception
Console.WriteLine("CopyTo() within boundaries unexpectedly threw an exception: {0}", e.Message)
End Try
' Try CopyTo() that overflows
Try
ipcc.CopyTo(testArray, 1)
Console.WriteLine("CopyTo() with index overflow worked, and it SHOULD NOT HAVE")
Catch e As Exception
Console.WriteLine("CopyTo() with index overflow threw an exception, as expected: {0}", e.Message)
End Try
' Test enumeration
Console.Write("Enumeration (should be three items): ")
For Each item As Integer In stack
Console.Write("{0} ", item)
Next
Console.WriteLine("")
' Test TryPop()
Dim popped As Integer = 0
If stack.TryPop(popped) Then
Console.WriteLine("Successfully popped {0}", popped)
Else
Console.WriteLine("FAILED to pop!!")
End If
' Test Count
Console.WriteLine("stack count is {0}, should be 2", stack.Count)
' Test TryTake()
If ipcc.TryTake(popped) Then
Console.WriteLine("Successfully IPCC-TryTaked {0}", popped)
Else
Console.WriteLine("FAILED to IPCC.TryTake!!")
End If
End Sub
Sub Main()
TestSafeStack()
' Keep the console window open in debug mode
Console.WriteLine("Press any key to exit.")
Console.ReadKey()
End Sub
End Module
注釈
詳細については、「 スレッドセーフなコレクション と BlockingCollection の概要」を参照してください。For more information, see Thread-Safe Collections and BlockingCollection Overview.
プロパティ
Count |
ICollection に格納されている要素の数を取得します。Gets the number of elements contained in the ICollection. (継承元 ICollection) |
IsSynchronized |
ICollection へのアクセスが同期されている (スレッド セーフである) かどうかを示す値を取得します。Gets a value indicating whether access to the ICollection is synchronized (thread safe). (継承元 ICollection) |
SyncRoot |
ICollection へのアクセスを同期するために使用できるオブジェクトを取得します。Gets an object that can be used to synchronize access to the ICollection. (継承元 ICollection) |
メソッド
CopyTo(Array, Int32) |
ICollection の要素を Array にコピーします。Array の特定のインデックスからコピーが開始されます。Copies the elements of the ICollection to an Array, starting at a particular Array index. (継承元 ICollection) |
CopyTo(T[], Int32) |
指定したインデックスを開始位置として、IProducerConsumerCollection<T> の要素を Array にコピーします。Copies the elements of the IProducerConsumerCollection<T> to an Array, starting at a specified index. |
GetEnumerator() |
コレクションを反復処理する列挙子を返します。Returns an enumerator that iterates through a collection. (継承元 IEnumerable) |
ToArray() |
IProducerConsumerCollection<T> に格納されている要素を新しい配列にコピーします。Copies the elements contained in the IProducerConsumerCollection<T> to a new array. |
TryAdd(T) |
IProducerConsumerCollection<T> に対してオブジェクトの追加を試みます。Attempts to add an object to the IProducerConsumerCollection<T>. |
TryTake(T) |
IProducerConsumerCollection<T> からオブジェクトを削除して返そうと試みます。Attempts to remove and return an object from the IProducerConsumerCollection<T>. |
拡張メソッド
ToImmutableArray<TSource>(IEnumerable<TSource>) |
指定されたコレクションから、変更できない配列を作成します。Creates an immutable array from the specified collection. |
ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
ソース キーに変換関数を適用し、変更できないディクショナリを既存の要素のコレクションから作成します。Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys. |
ToImmutableDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) |
シーケンスの変換に基づき、変更できないディクショナリを作成します。Constructs an immutable dictionary based on some transformation of a sequence. |
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) |
シーケンスを列挙して変換し、その内容の変更できないディクショナリを生成します。Enumerates and transforms a sequence, and produces an immutable dictionary of its contents. |
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>) |
シーケンスを列挙して変換し、指定されたキーの比較子を使用してその内容の変更できないディクショナリを生成します。Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer. |
ToImmutableDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IEqualityComparer<TKey>, IEqualityComparer<TValue>) |
シーケンスを列挙して変換し、指定されたキーの比較子および値の比較子を使用してその内容の変更できないディクショナリを生成します。Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers. |
ToImmutableHashSet<TSource>(IEnumerable<TSource>) |
シーケンスを列挙し、その内容の変更できないハッシュ セットを生成します。Enumerates a sequence and produces an immutable hash set of its contents. |
ToImmutableHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
シーケンスを列挙し、その内容の変更できないハッシュ セットを生成して、指定された等値比較子をセットの種類に使用します。Enumerates a sequence, produces an immutable hash set of its contents, and uses the specified equality comparer for the set type. |
ToImmutableList<TSource>(IEnumerable<TSource>) |
シーケンスを列挙し、その内容の変更できないリストを生成します。Enumerates a sequence and produces an immutable list of its contents. |
ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>) |
シーケンスを列挙して変換し、その内容の変更できない並べ替えられたディクショナリを生成します。Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents. |
ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>) |
シーケンスを列挙して変換し、指定されたキーの比較子を使用してその内容の変更できない並べ替えられたディクショナリを生成します。Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key comparer. |
ToImmutableSortedDictionary<TSource,TKey,TValue>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TValue>, IComparer<TKey>, IEqualityComparer<TValue>) |
シーケンスを列挙して変換し、指定されたキーの比較子と値の比較子を使用してその内容の変更できない並べ替えられたディクショナリを生成します。Enumerates and transforms a sequence, and produces an immutable sorted dictionary of its contents by using the specified key and value comparers. |
ToImmutableSortedSet<TSource>(IEnumerable<TSource>) |
シーケンスを列挙し、その内容の変更できない並べ替えられたセットを生成します。Enumerates a sequence and produces an immutable sorted set of its contents. |
ToImmutableSortedSet<TSource>(IEnumerable<TSource>, IComparer<TSource>) |
シーケンスを列挙し、その内容の変更できない並べ替えられたセットを生成して、指定された比較子を使用します。Enumerates a sequence, produces an immutable sorted set of its contents, and uses the specified comparer. |
CopyToDataTable<T>(IEnumerable<T>) |
指定した入力 DataTable オブジェクトに応じて (ジェネリック パラメーター |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption) |
指定した入力 DataRow オブジェクトに応じて (ジェネリック パラメーター |
CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler) |
指定した入力 DataRow オブジェクトに応じて (ジェネリック パラメーター |
Aggregate<TSource>(IEnumerable<TSource>, Func<TSource,TSource,TSource>) |
シーケンスにアキュムレータ関数を適用します。Applies an accumulator function over a sequence. |
Aggregate<TSource,TAccumulate>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>) |
シーケンスにアキュムレータ関数を適用します。Applies an accumulator function over a sequence. 指定されたシード値が最初のアキュムレータ値として使用されます。The specified seed value is used as the initial accumulator value. |
Aggregate<TSource,TAccumulate,TResult>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, Func<TAccumulate,TResult>) |
シーケンスにアキュムレータ関数を適用します。Applies an accumulator function over a sequence. 指定したシード値は最初のアキュムレータ値として使用され、指定した関数は結果値の選択に使用されます。The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value. |
All<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
シーケンスのすべての要素が条件を満たしているかどうかを判断します。Determines whether all elements of a sequence satisfy a condition. |
Any<TSource>(IEnumerable<TSource>) |
シーケンスに要素が含まれているかどうかを判断します。Determines whether a sequence contains any elements. |
Any<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
シーケンスの任意の要素が条件を満たしているかどうかを判断します。Determines whether any element of a sequence satisfies a condition. |
Append<TSource>(IEnumerable<TSource>, TSource) |
シーケンスの末尾に値を追加します。Appends a value to the end of the sequence. |
AsEnumerable<TSource>(IEnumerable<TSource>) |
IEnumerable<T> として型指定された入力を返します。Returns the input typed as IEnumerable<T>. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Decimal 値のシーケンスの平均値を計算します。Computes the average of a sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Double>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Double 値のシーケンスの平均値を計算します。Computes the average of a sequence of Double values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Int32>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Int32 値のシーケンスの平均値を計算します。Computes the average of a sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Int64>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Int64 値のシーケンスの平均値を計算します。Computes the average of a sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Decimal 値のシーケンスの平均値を計算します。Computes the average of a sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Double 値のシーケンスの平均値を計算します。Computes the average of a sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Int32 値のシーケンスの平均値を計算します。Computes the average of a sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Int64 値のシーケンスの平均値を計算します。Computes the average of a sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Single 値のシーケンスの平均値を計算します。Computes the average of a sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence. |
Average<TSource>(IEnumerable<TSource>, Func<TSource,Single>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Single 値のシーケンスの平均値を計算します。Computes the average of a sequence of Single values that are obtained by invoking a transform function on each element of the input sequence. |
Cast<TResult>(IEnumerable) |
IEnumerable の要素を、指定した型にキャストします。Casts the elements of an IEnumerable to the specified type. |
Concat<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
2 つのシーケンスを連結します。Concatenates two sequences. |
Contains<TSource>(IEnumerable<TSource>, TSource) |
既定の等値比較子を使用して、指定した要素がシーケンスに含まれているかどうかを判断します。Determines whether a sequence contains a specified element by using the default equality comparer. |
Contains<TSource>(IEnumerable<TSource>, TSource, IEqualityComparer<TSource>) |
指定した IEqualityComparer<T> を使用して、指定した要素がシーケンスに含まれているかどうかを判断します。Determines whether a sequence contains a specified element by using a specified IEqualityComparer<T>. |
Count<TSource>(IEnumerable<TSource>) |
シーケンス内の要素数を返します。Returns the number of elements in a sequence. |
Count<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
条件を満たす、指定されたシーケンス内の要素の数を表す数値を返します。Returns a number that represents how many elements in the specified sequence satisfy a condition. |
DefaultIfEmpty<TSource>(IEnumerable<TSource>) |
指定したシーケンスの要素を返します。シーケンスが空の場合はシングルトン コレクションにある型パラメーターの既定値を返します。Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty. |
DefaultIfEmpty<TSource>(IEnumerable<TSource>, TSource) |
指定されたシーケンスの要素を返します。シーケンスが空の場合はシングルトン コレクションにある型パラメーターの既定値を返します。Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty. |
Distinct<TSource>(IEnumerable<TSource>) |
既定の等値比較子を使用して値を比較することにより、シーケンスから一意の要素を返します。Returns distinct elements from a sequence by using the default equality comparer to compare values. |
Distinct<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
指定された IEqualityComparer<T> を使用して値を比較することにより、シーケンスから一意の要素を返します。Returns distinct elements from a sequence by using a specified IEqualityComparer<T> to compare values. |
ElementAt<TSource>(IEnumerable<TSource>, Int32) |
シーケンス内の指定されたインデックス位置にある要素を返します。Returns the element at a specified index in a sequence. |
ElementAtOrDefault<TSource>(IEnumerable<TSource>, Int32) |
シーケンス内の指定したインデックス位置にある要素を返します。インデックスが範囲外の場合は既定値を返します。Returns the element at a specified index in a sequence or a default value if the index is out of range. |
Except<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
既定の等値比較子を使用して値を比較することにより、2 つのシーケンスの差集合を生成します。Produces the set difference of two sequences by using the default equality comparer to compare values. |
Except<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) |
指定された IEqualityComparer<T> を使用して値を比較することにより、2 つのシーケンスの差集合を生成します。Produces the set difference of two sequences by using the specified IEqualityComparer<T> to compare values. |
First<TSource>(IEnumerable<TSource>) |
シーケンスの最初の要素を返します。Returns the first element of a sequence. |
First<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
指定された条件を満たす、シーケンスの最初の要素を返します。Returns the first element in a sequence that satisfies a specified condition. |
FirstOrDefault<TSource>(IEnumerable<TSource>) |
シーケンスの最初の要素を返します。シーケンスに要素が含まれていない場合は既定値を返します。Returns the first element of a sequence, or a default value if the sequence contains no elements. |
FirstOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
条件を満たす、シーケンスの最初の要素を返します。このような要素が見つからない場合は既定値を返します。Returns the first element of the sequence that satisfies a condition or a default value if no such element is found. |
GroupBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化します。Groups the elements of a sequence according to a specified key selector function. |
GroupBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、指定された比較子を使用してキーを比較します。Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer. |
GroupBy<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、指定された関数を使用して各グループの要素を射影します。Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function. |
GroupBy<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>) |
キー セレクター関数に従ってシーケンスの要素をグループ化します。Groups the elements of a sequence according to a key selector function. キーの比較には、比較子を使用し、各グループの要素の射影には、指定された関数を使用します。The keys are compared by using a comparer and each group's elements are projected by using a specified function. |
GroupBy<TSource,TKey,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,IEnumerable<TSource>,TResult>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. |
GroupBy<TSource,TKey,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,IEnumerable<TSource>,TResult>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. キーの比較には、指定された比較子を使用します。The keys are compared by using a specified comparer. |
GroupBy<TSource,TKey,TElement,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, Func<TKey,IEnumerable<TElement>,TResult>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. 各グループの要素は、指定された関数を使用して射影されます。The elements of each group are projected by using a specified function. |
GroupBy<TSource,TKey,TElement,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, Func<TKey,IEnumerable<TElement>,TResult>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. キー値の比較には、指定された比較子を使用し、各グループの要素の射影には、指定された関数を使用します。Key values are compared by using a specified comparer, and the elements of each group are projected by using a specified function. |
GroupJoin<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>,TResult>) |
キーが等しいかどうかに基づいて 2 つのシーケンスの要素を相互に関連付け、その結果をグループ化します。Correlates the elements of two sequences based on equality of keys and groups the results. キーの比較には既定の等値比較子が使用されます。The default equality comparer is used to compare keys. |
GroupJoin<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>,TResult>, IEqualityComparer<TKey>) |
キーが等しいかどうかに基づいて 2 つのシーケンスの要素を相互に関連付け、その結果をグループ化します。Correlates the elements of two sequences based on key equality and groups the results. 指定された IEqualityComparer<T> を使用してキーを比較します。A specified IEqualityComparer<T> is used to compare keys. |
Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
既定の等値比較子を使用して値を比較することにより、2 つのシーケンスの積集合を生成します。Produces the set intersection of two sequences by using the default equality comparer to compare values. |
Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) |
指定された IEqualityComparer<T> を使用して値を比較することにより、2 つのシーケンスの積集合を生成します。Produces the set intersection of two sequences by using the specified IEqualityComparer<T> to compare values. |
Join<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>) |
一致するキーに基づいて 2 つのシーケンスの要素を相互に関連付けます。Correlates the elements of two sequences based on matching keys. キーの比較には既定の等値比較子が使用されます。The default equality comparer is used to compare keys. |
Join<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>, IEqualityComparer<TKey>) |
一致するキーに基づいて 2 つのシーケンスの要素を相互に関連付けます。Correlates the elements of two sequences based on matching keys. 指定された IEqualityComparer<T> を使用してキーを比較します。A specified IEqualityComparer<T> is used to compare keys. |
Last<TSource>(IEnumerable<TSource>) |
シーケンスの最後の要素を返します。Returns the last element of a sequence. |
Last<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
指定された条件を満たす、シーケンスの最後の要素を返します。Returns the last element of a sequence that satisfies a specified condition. |
LastOrDefault<TSource>(IEnumerable<TSource>) |
シーケンスの最後の要素を返します。シーケンスに要素が含まれていない場合は既定値を返します。Returns the last element of a sequence, or a default value if the sequence contains no elements. |
LastOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
条件を満たす、シーケンスの最後の要素を返します。このような要素が見つからない場合は既定値を返します。Returns the last element of a sequence that satisfies a condition or a default value if no such element is found. |
LongCount<TSource>(IEnumerable<TSource>) |
シーケンス内の要素の合計数を表す Int64 を返します。Returns an Int64 that represents the total number of elements in a sequence. |
LongCount<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
シーケンス内で条件を満たす要素の数を表す Int64 を返します。Returns an Int64 that represents how many elements in a sequence satisfy a condition. |
Max<TSource>(IEnumerable<TSource>) |
ジェネリック シーケンスの最大値を返します。Returns the maximum value in a generic sequence. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>) |
シーケンスの各要素に対して変換関数を呼び出し、Decimal の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum Decimal value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Double>) |
シーケンスの各要素に対して変換関数を呼び出し、Double の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum Double value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Int32>) |
シーケンスの各要素に対して変換関数を呼び出し、Int32 の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum Int32 value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Int64>) |
シーケンスの各要素に対して変換関数を呼び出し、Int64 の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum Int64 value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Decimal の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum nullable Decimal value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Double の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum nullable Double value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Int32 の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum nullable Int32 value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Int64 の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum nullable Int64 value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Single の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum nullable Single value. |
Max<TSource>(IEnumerable<TSource>, Func<TSource,Single>) |
シーケンスの各要素に対して変換関数を呼び出し、Single の最大値を返します。Invokes a transform function on each element of a sequence and returns the maximum Single value. |
Max<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>) |
ジェネリック シーケンスの各要素に対して変換関数を呼び出し、結果の最大値を返します。Invokes a transform function on each element of a generic sequence and returns the maximum resulting value. |
Min<TSource>(IEnumerable<TSource>) |
ジェネリック シーケンスの最小値を返します。Returns the minimum value in a generic sequence. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>) |
シーケンスの各要素に対して変換関数を呼び出し、Decimal の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum Decimal value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Double>) |
シーケンスの各要素に対して変換関数を呼び出し、Double の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum Double value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Int32>) |
シーケンスの各要素に対して変換関数を呼び出し、Int32 の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum Int32 value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Int64>) |
シーケンスの各要素に対して変換関数を呼び出し、Int64 の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum Int64 value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Decimal の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum nullable Decimal value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Double の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum nullable Double value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Int32 の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum nullable Int32 value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Int64 の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum nullable Int64 value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>) |
シーケンスの各要素に対して変換関数を呼び出し、null 許容の Single の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum nullable Single value. |
Min<TSource>(IEnumerable<TSource>, Func<TSource,Single>) |
シーケンスの各要素に対して変換関数を呼び出し、Single の最小値を返します。Invokes a transform function on each element of a sequence and returns the minimum Single value. |
Min<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>) |
ジェネリック シーケンスの各要素に対して変換関数を呼び出し、結果の最小値を返します。Invokes a transform function on each element of a generic sequence and returns the minimum resulting value. |
OfType<TResult>(IEnumerable) |
指定された型に基づいて IEnumerable の要素をフィルター処理します。Filters the elements of an IEnumerable based on a specified type. |
OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
シーケンスの要素をキーに従って昇順に並べ替えます。Sorts the elements of a sequence in ascending order according to a key. |
OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>) |
指定された比較子を使用してシーケンスの要素を昇順に並べ替えます。Sorts the elements of a sequence in ascending order by using a specified comparer. |
OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
シーケンスの要素をキーに従って降順に並べ替えます。Sorts the elements of a sequence in descending order according to a key. |
OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>) |
指定された比較子を使用してシーケンスの要素を降順に並べ替えます。Sorts the elements of a sequence in descending order by using a specified comparer. |
Prepend<TSource>(IEnumerable<TSource>, TSource) |
シーケンスの先頭に値を追加します。Adds a value to the beginning of the sequence. |
Reverse<TSource>(IEnumerable<TSource>) |
シーケンスの要素の順序を反転させます。Inverts the order of the elements in a sequence. |
Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>) |
シーケンスの各要素を新しいフォームに射影します。Projects each element of a sequence into a new form. |
Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,TResult>) |
要素のインデックスを組み込むことにより、シーケンスの各要素を新しいフォームに射影します。Projects each element of a sequence into a new form by incorporating the element's index. |
SelectMany<TSource,TResult>(IEnumerable<TSource>, Func<TSource,IEnumerable<TResult>>) |
シーケンスの各要素を IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化します。Projects each element of a sequence to an IEnumerable<T> and flattens the resulting sequences into one sequence. |
SelectMany<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TResult>>) |
シーケンスの各要素を IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化します。Projects each element of a sequence to an IEnumerable<T>, and flattens the resulting sequences into one sequence. 各ソース要素のインデックスは、その要素の射影されたフォームで使用されます。The index of each source element is used in the projected form of that element. |
SelectMany<TSource,TCollection,TResult>(IEnumerable<TSource>, Func<TSource,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>) |
シーケンスの各要素を IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化して、その各要素に対して結果のセレクター関数を呼び出します。Projects each element of a sequence to an IEnumerable<T>, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein. |
SelectMany<TSource,TCollection,TResult>(IEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>) |
シーケンスの各要素を IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化して、その各要素に対して結果のセレクター関数を呼び出します。Projects each element of a sequence to an IEnumerable<T>, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein. 各ソース要素のインデックスは、その要素の中間の射影されたフォームで使用されます。The index of each source element is used in the intermediate projected form of that element. |
SequenceEqual<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
要素の型に対して既定の等値比較子を使用して要素を比較することで、2 つのシーケンスが等しいかどうかを判断します。Determines whether two sequences are equal by comparing the elements by using the default equality comparer for their type. |
SequenceEqual<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) |
指定された IEqualityComparer<T> を使用して要素を比較することで、2 つのシーケンスが等しいかどうかを判断します。Determines whether two sequences are equal by comparing their elements by using a specified IEqualityComparer<T>. |
Single<TSource>(IEnumerable<TSource>) |
シーケンスの唯一の要素を返し、シーケンス内の要素が 1 つだけでない場合は例外をスローします。Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence. |
Single<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
指定された条件を満たす、シーケンスの唯一の要素を返し、そのような要素が複数存在する場合は例外をスローします。Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists. |
SingleOrDefault<TSource>(IEnumerable<TSource>) |
シーケンスの唯一の要素を返します。シーケンスが空の場合、既定値を返します。シーケンス内に要素が複数ある場合、このメソッドは例外をスローします。Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence. |
SingleOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
指定された条件を満たすシーケンスの唯一の要素、またはそのような要素がない場合は既定値を返します。このメソッドは、複数の要素が条件を満たす場合に例外をスローします。Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition. |
Skip<TSource>(IEnumerable<TSource>, Int32) |
シーケンス内の指定された数の要素をバイパスし、残りの要素を返します。Bypasses a specified number of elements in a sequence and then returns the remaining elements. |
SkipLast<TSource>(IEnumerable<TSource>, Int32) |
|
SkipWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
指定された条件が満たされる限り、シーケンスの要素をバイパスした後、残りの要素を返します。Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. |
SkipWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>) |
指定された条件が満たされる限り、シーケンスの要素をバイパスした後、残りの要素を返します。Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. 要素のインデックスは、述語関数のロジックで使用されます。The element's index is used in the logic of the predicate function. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Decimal 値のシーケンスの合計を計算します。Computes the sum of the sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Double>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Double 値のシーケンスの合計を計算します。Computes the sum of the sequence of Double values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Int32>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Int32 値のシーケンスの合計を計算します。Computes the sum of the sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Int64>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Int64 値のシーケンスの合計を計算します。Computes the sum of the sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Decimal 値のシーケンスの合計を計算します。Computes the sum of the sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Double 値のシーケンスの合計を計算します。Computes the sum of the sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Int32 値のシーケンスの合計を計算します。Computes the sum of the sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Int64 値のシーケンスの合計を計算します。Computes the sum of the sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Single 値のシーケンスの合計を計算します。Computes the sum of the sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence. |
Sum<TSource>(IEnumerable<TSource>, Func<TSource,Single>) |
入力シーケンスの各要素に対して変換関数を呼び出して取得する Single 値のシーケンスの合計を計算します。Computes the sum of the sequence of Single values that are obtained by invoking a transform function on each element of the input sequence. |
Take<TSource>(IEnumerable<TSource>, Int32) |
シーケンスの先頭から、指定された数の連続する要素を返します。Returns a specified number of contiguous elements from the start of a sequence. |
TakeLast<TSource>(IEnumerable<TSource>, Int32) |
|
TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
指定された条件が満たされる限り、シーケンスから要素を返します。Returns elements from a sequence as long as a specified condition is true. |
TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>) |
指定された条件が満たされる限り、シーケンスから要素を返します。Returns elements from a sequence as long as a specified condition is true. 要素のインデックスは、述語関数のロジックで使用されます。The element's index is used in the logic of the predicate function. |
ToArray<TSource>(IEnumerable<TSource>) |
IEnumerable<T> から配列を作成します。Creates an array from a IEnumerable<T>. |
ToDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
指定されたキー セレクター関数に従って、Dictionary<TKey,TValue> から IEnumerable<T> を作成します。Creates a Dictionary<TKey,TValue> from an IEnumerable<T> according to a specified key selector function. |
ToDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数およびキーの比較子に従って、Dictionary<TKey,TValue> から IEnumerable<T> を作成します。Creates a Dictionary<TKey,TValue> from an IEnumerable<T> according to a specified key selector function and key comparer. |
ToDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>) |
指定されたキー セレクター関数および要素セレクター関数に従って、Dictionary<TKey,TValue> から IEnumerable<T> を作成します。Creates a Dictionary<TKey,TValue> from an IEnumerable<T> according to specified key selector and element selector functions. |
ToDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数、比較子、および要素セレクター関数に従って、Dictionary<TKey,TValue> から IEnumerable<T> を作成します。Creates a Dictionary<TKey,TValue> from an IEnumerable<T> according to a specified key selector function, a comparer, and an element selector function. |
ToHashSet<TSource>(IEnumerable<TSource>) |
IEnumerable<T> から HashSet<T> を作成します。Creates a HashSet<T> from an IEnumerable<T>. |
ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>) |
|
ToList<TSource>(IEnumerable<TSource>) |
IEnumerable<T> から List<T> を作成します。Creates a List<T> from an IEnumerable<T>. |
ToLookup<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>) |
指定されたキー セレクター関数に従って、Lookup<TKey,TElement> から IEnumerable<T> を作成します。Creates a Lookup<TKey,TElement> from an IEnumerable<T> according to a specified key selector function. |
ToLookup<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数およびキーの比較子に従って、Lookup<TKey,TElement> から IEnumerable<T> を作成します。Creates a Lookup<TKey,TElement> from an IEnumerable<T> according to a specified key selector function and key comparer. |
ToLookup<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>) |
指定されたキー セレクター関数および要素セレクター関数に従って、Lookup<TKey,TElement> から IEnumerable<T> を作成します。Creates a Lookup<TKey,TElement> from an IEnumerable<T> according to specified key selector and element selector functions. |
ToLookup<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>) |
指定されたキー セレクター関数、比較子、および要素セレクター関数に従って、Lookup<TKey,TElement> から IEnumerable<T> を作成します。Creates a Lookup<TKey,TElement> from an IEnumerable<T> according to a specified key selector function, a comparer and an element selector function. |
Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>) |
既定の等値比較子を使用して、2 つのシーケンスの和集合を生成します。Produces the set union of two sequences by using the default equality comparer. |
Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>) |
指定された IEqualityComparer<T> を使用して 2 つのシーケンスの和集合を生成します。Produces the set union of two sequences by using a specified IEqualityComparer<T>. |
Where<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>) |
述語に基づいて値のシーケンスをフィルター処理します。Filters a sequence of values based on a predicate. |
Where<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>) |
述語に基づいて値のシーケンスをフィルター処理します。Filters a sequence of values based on a predicate. 各要素のインデックスは、述語関数のロジックで使用されます。Each element's index is used in the logic of the predicate function. |
Zip<TFirst,TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>) |
指定された 2 つのシーケンスの要素を持つタプルのシーケンスを生成します。Produces a sequence of tuples with elements from the two specified sequences. |
Zip<TFirst,TSecond,TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst,TSecond,TResult>) |
2 つのシーケンスの対応する要素に対して、1 つの指定した関数を適用し、結果として 1 つのシーケンスを生成します。Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results. |
AsParallel(IEnumerable) |
クエリの並列化を有効にします。Enables parallelization of a query. |
AsParallel<TSource>(IEnumerable<TSource>) |
クエリの並列化を有効にします。Enables parallelization of a query. |
AsQueryable(IEnumerable) |
IEnumerable を IQueryable に変換します。Converts an IEnumerable to an IQueryable. |
AsQueryable<TElement>(IEnumerable<TElement>) |
ジェネリックの IEnumerable<T> をジェネリックの IQueryable<T> に変換します。Converts a generic IEnumerable<T> to a generic IQueryable<T>. |
Ancestors<T>(IEnumerable<T>) |
ソース コレクション内のすべてのノードの先祖が格納された、要素のコレクションを返します。Returns a collection of elements that contains the ancestors of every node in the source collection. |
Ancestors<T>(IEnumerable<T>, XName) |
ソース コレクション内のすべてのノードの先祖が格納され、フィルター処理された要素のコレクションを返します。Returns a filtered collection of elements that contains the ancestors of every node in the source collection. 一致する XName を持つ要素のみがコレクションに含められます。Only elements that have a matching XName are included in the collection. |
DescendantNodes<T>(IEnumerable<T>) |
ソース コレクション内のすべてのドキュメントおよび要素の子孫ノードのコレクションを返します。Returns a collection of the descendant nodes of every document and element in the source collection. |
Descendants<T>(IEnumerable<T>) |
ソース コレクション内のすべての要素とドキュメントの子孫要素が格納された要素のコレクションを返します。Returns a collection of elements that contains the descendant elements of every element and document in the source collection. |
Descendants<T>(IEnumerable<T>, XName) |
ソース コレクション内のすべての要素とドキュメントの子孫要素が格納され、フィルター処理された要素のコレクションを返します。Returns a filtered collection of elements that contains the descendant elements of every element and document in the source collection. 一致する XName を持つ要素のみがコレクションに含められます。Only elements that have a matching XName are included in the collection. |
Elements<T>(IEnumerable<T>) |
ソース コレクション内のすべての要素およびドキュメントの子要素のコレクションを返します。Returns a collection of the child elements of every element and document in the source collection. |
Elements<T>(IEnumerable<T>, XName) |
ソース コレクション内のすべての要素およびドキュメントの、フィルター処理された子要素のコレクションを返します。Returns a filtered collection of the child elements of every element and document in the source collection. 一致する XName を持つ要素のみがコレクションに含められます。Only elements that have a matching XName are included in the collection. |
InDocumentOrder<T>(IEnumerable<T>) |
ソース コレクション内のすべてのノードがドキュメント順に並べ替えて格納された、ノードのコレクションを返します。Returns a collection of nodes that contains all nodes in the source collection, sorted in document order. |
Nodes<T>(IEnumerable<T>) |
ソース コレクション内のすべてのドキュメントおよび要素の子ノードのコレクションを返します。Returns a collection of the child nodes of every document and element in the source collection. |
Remove<T>(IEnumerable<T>) |
ソース コレクション内の親ノードからすべてのノードを削除します。Removes every node in the source collection from its parent node. |
適用対象
スレッド セーフ
このインターフェイスのすべての実装では、このインターフェイスのすべてのメンバーを複数のスレッドから同時に使用できるようにする必要があります。All implementations of this interface must enable all members of this interface to be used concurrently from multiple threads.