LogExtentCollection クラス

定義

LogExtent に関連付けられた LogStore オブジェクトのコレクションを表します。

public ref class LogExtentCollection sealed : System::Collections::Generic::IEnumerable<System::IO::Log::LogExtent ^>
public sealed class LogExtentCollection : System.Collections.Generic.IEnumerable<System.IO.Log.LogExtent>
type LogExtentCollection = class
    interface seq<LogExtent>
    interface IEnumerable
Public NotInheritable Class LogExtentCollection
Implements IEnumerable(Of LogExtent)
継承
LogExtentCollection
実装

この例では、LogExtent クラスおよび LogExtentCollection クラスを使用して、エクステントをログ シーケンスに追加およびエミュレートする方法を示します。

using System;
using System.IO;
using System.Collections.Generic;
using System.Text;
using System.IO.Log;

namespace MyLogRecordSequence
{
    public class MyLog
    {
        string logName = "test.log";
        string logContainer = "MyExtent0";
        int containerSize = 32 * 1024;
        LogRecordSequence sequence = null;
        bool delete = true;

        // These are used in the TailPinned event handler.
        public static LogRecordSequence MySequence = null;
        public static bool AdvanceBase = true;

        public MyLog()
        {
            // Create a LogRecordSequence.
            sequence = new LogRecordSequence(this.logName,
                                              FileMode.CreateNew,
                                              FileAccess.ReadWrite,
                                              FileShare.None);

            // At least one container/extent must be added for Log Record Sequence.
            sequence.LogStore.Extents.Add(this.logContainer, this.containerSize);

            MySequence = sequence;
        }

        public void AddExtents()
        {
            // Add two additional extents. The extents are
            // of the same size as the first extent.
            sequence.LogStore.Extents.Add("MyExtent1");
            sequence.LogStore.Extents.Add("MyExtent2");
        }

        public void EnumerateExtents()
        {
            LogStore store = sequence.LogStore;

            Console.WriteLine("Enumerating Log Extents...");
            Console.WriteLine("    Extent Count: {0} extents", store.Extents.Count);
            Console.WriteLine("    Extents Are...");
            foreach (LogExtent extent in store.Extents)
            {
                Console.WriteLine("      {0} ({1}, {2})",
                                  Path.GetFileName(extent.Path),
                                  extent.Size,
                                  extent.State);
            }
            Console.WriteLine("    Free Extents: {0} Free", store.Extents.FreeCount);
        }

        public void SetLogPolicy()
        {
            Console.WriteLine();
            Console.WriteLine("Setting current log policy...");

            // SET LOG POLICY

            LogPolicy policy = sequence.LogStore.Policy;

            // Set AutoGrow policy. This enables the log to automatically grow
            // when the existing extents are full. New extents are added until
            // we reach the MaximumExtentCount extents.
            // AutoGrow policy is supported only in Windows Vista and not available in R2.

            //policy.AutoGrow = true;

            // Set the Growth Rate in terms of extents. This policy specifies
            // "how much" the log should grow.
            policy.GrowthRate = new PolicyUnit(2, PolicyUnitType.Extents);

            // Set the AutoShrink policy. This enables the log to automatically
            // shrink if the available free space exceeds the shrink percentage.
            // AutoGrow/shrink policy is supported only in Windows Vista and not available in R2.

            //policy.AutoShrinkPercentage = new PolicyUnit(30, PolicyUnitType.Percentage);

            // Set the PinnedTailThreshold policy.
            // A tail pinned event is triggered when there is no
            // log space available and log space may be freed by advancing the base.
            // The user must handle the tail pinned event by advancing the base of the log.
            // If the user is not able to move the base of the log, the user should report with exception in
            // the tail pinned handler.
            // PinnedTailThreashold policy dictates the amount of space that the TailPinned event requests
            // for advancing the base of the log. The amount of space can be in percentage or in terms of bytes
            // which is rounded off to the nearest containers in CLFS. The default is 35 percent.

            policy.PinnedTailThreshold = new PolicyUnit(10, PolicyUnitType.Percentage);

            // Set the maximum extents the log can have.
            policy.MaximumExtentCount = 6;

            // Set the minimum extents the log can have.
            policy.MinimumExtentCount = 2;

            // Set the prefix for new containers that are added.
            // when AutoGrow is enabled.
            //policy.NewExtentPrefix = "MyLogPrefix";

            // Set the suffix number for new containers that are added.
            // when AutoGrow is enabled.
            policy.NextExtentSuffix = 3;

            // Commit the log policy.
            policy.Commit();

            // Refresh updates the IO.Log policy properties with current log policy
            // set in the log.
            policy.Refresh();

            // LOG POLICY END
            //

            //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
            // Setting up IO.Log provided capabilities...
            //

            // SET RETRY APPEND

            // IO.Log provides a mechanism similar to AutoGrow.
            // If the existing log is full and an append fails, setting RetryAppend
            // invokes the CLFS policy engine to add new extents and re-tries
            // record appends. If MaximumExtent count has been reached,
            // a SequenceFullException is thrown.
            //

            sequence.RetryAppend = true;

            // RETRY APPEND END

            // REGISTER FOR TAILPINNED EVENT NOTIFICATIONS

            // Register for TailPinned Event by passing in an event handler.
            // An event is raised when the log full condition is reached.
            // The user should either advance the base sequence number to the
            // nearest valid sequence number recommended in the tail pinned event or
            // report a failure that it is not able to advance the base sequence
            // number.
            //

            sequence.TailPinned += new EventHandler<TailPinnedEventArgs>(HandleTailPinned);

            Console.WriteLine("Done...");
        }

        public void ShowLogPolicy()
        {
            Console.WriteLine();
            Console.WriteLine("Showing current log policy...");

            LogPolicy policy = sequence.LogStore.Policy;

            Console.WriteLine("    Minimum extent count:  {0}", policy.MinimumExtentCount);
            Console.WriteLine("    Maximum extent count:  {0}", policy.MaximumExtentCount);
            Console.WriteLine("    Growth rate:           {0}", policy.GrowthRate);
            Console.WriteLine("    Pinned tail threshold: {0}", policy.PinnedTailThreshold);
            Console.WriteLine("    Auto shrink percent:   {0}", policy.AutoShrinkPercentage);
            Console.WriteLine("    Auto grow enabled:     {0}", policy.AutoGrow);
            Console.WriteLine("    New extent prefix:     {0}", policy.NewExtentPrefix);
            Console.WriteLine("    Next extent suffix:    {0}", policy.NextExtentSuffix);
    }

        // Append records. Appending three records.
        public void AppendRecords()
        {
            Console.WriteLine("Appending Log Records...");
            SequenceNumber previous = SequenceNumber.Invalid;

            previous = sequence.Append(CreateData("Hello World!"), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush);
            previous = sequence.Append(CreateData("This is my first Logging App"), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush);
            previous = sequence.Append(CreateData("Using LogRecordSequence..."), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush);
    
            Console.WriteLine("Done...");
        }

        // Read the records added to the log.
        public void ReadRecords()
        {
            Encoding enc = Encoding.Unicode;

            Console.WriteLine();

            Console.WriteLine("Reading Log Records...");
            try
            {
                foreach (LogRecord record in this.sequence.ReadLogRecords(this.sequence.BaseSequenceNumber, LogRecordEnumeratorType.Next))
                {
                    byte[] data = new byte[record.Data.Length];
                    record.Data.Read(data, 0, (int)record.Data.Length);
                    string mystr = enc.GetString(data);
                    Console.WriteLine("    {0}", mystr);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception {0} {1}", e.GetType(), e.Message);
            }

            Console.WriteLine();
        }

        public void FillLog()
        {
            bool append = true;

            while (append)
            {
                try
                {
                    sequence.Append(CreateData(16 * 1024), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush);
                }

                catch (SequenceFullException)
                {
                    Console.WriteLine("Log is Full...");
                    append = false;
                }
            }
        }

        // Dispose the record sequence and delete the log file.
        public void Cleanup()
        {
            // Dispose the sequence
            sequence.Dispose();

            // Delete the log file.
            if (delete)
            {
                try
                {
                    // This deletes the base log file and all the extents associated with the log.
                    LogStore.Delete(this.logName);
                }
                catch (Exception e)
                {
                    Console.WriteLine("Exception {0} {1}", e.GetType(), e.Message);
                }
            }
        }

        // Converts the given data to an Array of ArraySegment<byte>
        public static IList<ArraySegment<byte>> CreateData(string str)
        {
            Encoding enc = Encoding.Unicode;

            byte[] array = enc.GetBytes(str);

            ArraySegment<byte>[] segments = new ArraySegment<byte>[1];
            segments[0] = new ArraySegment<byte>(array);

            return Array.AsReadOnly<ArraySegment<byte>>(segments);
        }

        public static IList<ArraySegment<byte>> CreateData(int size)
        {
            byte[] array = new byte[size];

            Random rnd = new Random();
            rnd.NextBytes(array);

            ArraySegment<byte>[] segments = new ArraySegment<byte>[1];
            segments[0] = new ArraySegment<byte>(array);

            return Array.AsReadOnly<ArraySegment<byte>>(segments);
        }

        public static SequenceNumber GetAdvanceBaseSeqNumber(SequenceNumber recTargetSeqNum)
        {
            SequenceNumber targetSequenceNumber = SequenceNumber.Invalid;

            Console.WriteLine("Getting actual target sequence number...");

            //
            // Implement the logic for returning a valid sequence number closer to
            // recommended target sequence number.
            //

            return targetSequenceNumber;
        }

        public static void HandleTailPinned(object arg, TailPinnedEventArgs tailPinnedEventArgs)
        {
            Console.WriteLine("TailPinned has fired");

            // Based on the implementation of a logging application, the log base can be moved
            // to free up more log space and if it is not possible to move the
            // base, the application should report by throwing an exception.

            if(MyLog.AdvanceBase)
            {
                try
                {
                    // TailPnnedEventArgs has the recommended sequence number and its generated
                    // based on PinnedTailThreshold policy.
                    // This does not map to an actual sequence number in the record sequence
                    // but an approximation and potentially frees up the threshold % log space
                    // when the log base is advanced to a valid sequence number closer to the
                    // recommended sequence number.
                    // The user should use this sequence number to locate a closest valid sequence
                    // number to advance the base of the log.

                    SequenceNumber recommendedTargetSeqNum = tailPinnedEventArgs.TargetSequenceNumber;

                    // Get the actual Target sequence number.
                    SequenceNumber actualTargetSeqNum = MyLog.GetAdvanceBaseSeqNumber(recommendedTargetSeqNum);

                    MySequence.AdvanceBaseSequenceNumber(actualTargetSeqNum);
                }
                catch (Exception e)
                {
                    Console.WriteLine("Exception thrown {0} {1}", e.GetType(), e.Message);
                }
            }
            else
            {
                // Report back Error if under some conditions the log cannot
                // advance the base sequence number.

                Console.WriteLine("Reporting Error! Unable to move the base sequence number!");
                throw new IOException();
            }
        }
    }

    class LogSample
    {
        static void Main(string[] args)
        {
            // Create log record sequence.
            MyLog log = new MyLog();

            // Add additional extents.
            log.AddExtents();

            // Enumerate the current log extents.
            log.EnumerateExtents();

            // Set log policies and register for TailPinned event notifications.
            log.SetLogPolicy();

            log.ShowLogPolicy();

            // Append a few records and read the appended records.
            log.AppendRecords();
            log.ReadRecords();

            // Fill the Log to trigger log growth...and subsequent TailPinned notifications.
            log.FillLog();

            log.EnumerateExtents();

            log.Cleanup();
        }
    }
}

Imports System.IO
Imports System.Collections.Generic
Imports System.Text
Imports System.IO.Log

Namespace MyLogRecordSequence
    Public Class MyLog
        Private logName As String = "test.log"
        Private logContainer As String = "MyExtent0"
        Private containerSize As Integer = 32 * 1024
        Private sequence As LogRecordSequence = Nothing
        Private delete As Boolean = True

        ' These are used in the TailPinned event handler.
        Public Shared MySequence As LogRecordSequence = Nothing
        Public Shared AdvanceBase As Boolean = True

        Public Sub New()
            ' Create a LogRecordSequence.
            sequence = New LogRecordSequence(Me.logName, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None)

            ' At least one container/extent must be added for Log Record Sequence.
            sequence.LogStore.Extents.Add(Me.logContainer, Me.containerSize)

            MySequence = sequence

        End Sub

        Public Sub AddExtents()
            ' Add two additional extents. The extents are 
            ' of the same size as the first extent.
            sequence.LogStore.Extents.Add("MyExtent1")
            sequence.LogStore.Extents.Add("MyExtent2")
        End Sub

        Public Sub EnumerateExtents()
            Dim store As LogStore = sequence.LogStore

            Console.WriteLine("Enumerating Log Extents...")
            Console.WriteLine("    Extent Count: {0} extents", store.Extents.Count)
            Console.WriteLine("    Extents Are...")
            For Each extent In store.Extents
                Console.WriteLine("      {0} ({1}, {2})", Path.GetFileName(extent.Path), extent.Size, extent.State)
            Next extent
            Console.WriteLine("    Free Extents: {0} Free", store.Extents.FreeCount)
        End Sub

        Public Sub SetLogPolicy()
            Console.WriteLine()
            Console.WriteLine("Setting current log policy...")

            ' SET LOG POLICY

            Dim policy As LogPolicy = sequence.LogStore.Policy

            ' Set AutoGrow policy. This enables the log to automatically grow
            ' when the existing extents are full. New extents are added until
            ' we reach the MaximumExtentCount extents.
            ' AutoGrow policy is supported only in Windows Vista and not available in R2.

            'policy.AutoGrow = true;

            ' Set the Growth Rate in terms of extents. This policy specifies
            ' "how much" the log should grow. 
            policy.GrowthRate = New PolicyUnit(2, PolicyUnitType.Extents)

            ' Set the AutoShrink policy. This enables the log to automatically
            ' shrink if the available free space exceeds the shrink percentage. 
            ' AutoGrow/shrink policy is supported only in Windows Vista and not available in R2.

            'policy.AutoShrinkPercentage = new PolicyUnit(30, PolicyUnitType.Percentage);

            ' Set the PinnedTailThreshold policy.
            ' A tail pinned event is triggered when there is no
            ' log space available and log space may be freed by advancing the base.
            ' The user must handle the tail pinned event by advancing the base of the log. 
            ' If the user is not able to move the base of the log, the user should report with exception in
            ' the tail pinned handler.
            ' PinnedTailThreashold policy dictates the amount of space that the TailPinned event requests 
            ' for advancing the base of the log. The amount of space can be in percentage or in terms of bytes 
            ' which is rounded off to the nearest containers in CLFS. The default is 35 percent.


            policy.PinnedTailThreshold = New PolicyUnit(10, PolicyUnitType.Percentage)

            ' Set the maximum extents the log can have.
            policy.MaximumExtentCount = 6

            ' Set the minimum extents the log can have.
            policy.MinimumExtentCount = 2

            ' Set the prefix for new containers that are added. 
            ' when AutoGrow is enabled.
            'policy.NewExtentPrefix = "MyLogPrefix";

            ' Set the suffix number for new containers that are added.
            ' when AutoGrow is enabled. 
            policy.NextExtentSuffix = 3

            ' Commit the log policy.
            policy.Commit()

            ' Refresh updates the IO.Log policy properties with current log policy 
            ' set in the log. 
            policy.Refresh()

            ' LOG POLICY END
            ' 

            '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
            ' Setting up IO.Log provided capabilities...
            ' 

            ' SET RETRY APPEND

            ' IO.Log provides a mechanism similar to AutoGrow.
            ' If the existing log is full and an append fails, setting RetryAppend
            ' invokes the CLFS policy engine to add new extents and re-tries
            ' record appends. If MaximumExtent count has been reached, 
            ' a SequenceFullException is thrown. 
            ' 

            sequence.RetryAppend = True

            ' RETRY APPEND END

            ' REGISTER FOR TAILPINNED EVENT NOTIFICATIONS

            ' Register for TailPinned Event by passing in an event handler.
            ' An event is raised when the log full condition is reached.
            ' The user should either advance the base sequence number to the 
            ' nearest valid sequence number recommended in the tail pinned event or
            ' report a failure that it is not able to advance the base sequence 
            ' number. 
            '

            AddHandler sequence.TailPinned, AddressOf HandleTailPinned

            Console.WriteLine("Done...")
        End Sub

        Public Sub ShowLogPolicy()
            Console.WriteLine()
            Console.WriteLine("Showing current log policy...")

            Dim policy As LogPolicy = sequence.LogStore.Policy

            Console.WriteLine("    Minimum extent count:  {0}", policy.MinimumExtentCount)
            Console.WriteLine("    Maximum extent count:  {0}", policy.MaximumExtentCount)
            Console.WriteLine("    Growth rate:           {0}", policy.GrowthRate)
            Console.WriteLine("    Pinned tail threshold: {0}", policy.PinnedTailThreshold)
            Console.WriteLine("    Auto shrink percent:   {0}", policy.AutoShrinkPercentage)
            Console.WriteLine("    Auto grow enabled:     {0}", policy.AutoGrow)
            Console.WriteLine("    New extent prefix:     {0}", policy.NewExtentPrefix)
            Console.WriteLine("    Next extent suffix:    {0}", policy.NextExtentSuffix)

        End Sub

        ' Append records. Appending three records.  
        Public Sub AppendRecords()
            Console.WriteLine("Appending Log Records...")
            Dim previous As SequenceNumber = SequenceNumber.Invalid

            previous = sequence.Append(CreateData("Hello World!"), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush)
            previous = sequence.Append(CreateData("This is my first Logging App"), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush)
            previous = sequence.Append(CreateData("Using LogRecordSequence..."), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush)

            Console.WriteLine("Done...")
        End Sub


        ' Read the records added to the log. 
        Public Sub ReadRecords()
            Dim enc As Encoding = Encoding.Unicode

            Console.WriteLine()

            Console.WriteLine("Reading Log Records...")
            Try
                For Each record As LogRecord In Me.sequence.ReadLogRecords(Me.sequence.BaseSequenceNumber, LogRecordEnumeratorType.Next)
                    Dim data(record.Data.Length - 1) As Byte
                    record.Data.Read(data, 0, CInt(Fix(record.Data.Length)))
                    Dim mystr As String = enc.GetString(data)
                    Console.WriteLine("    {0}", mystr)
                Next record
            Catch e As Exception
                Console.WriteLine("Exception {0} {1}", e.GetType(), e.Message)
            End Try

            Console.WriteLine()
        End Sub

        Public Sub FillLog()
            Dim append As Boolean = True

            Do While append
                Try
                    sequence.Append(CreateData(16 * 1024), SequenceNumber.Invalid, SequenceNumber.Invalid, RecordAppendOptions.ForceFlush)

                Catch e1 As SequenceFullException
                    Console.WriteLine("Log is Full...")
                    append = False
                End Try
            Loop
        End Sub

        ' Dispose the record sequence and delete the log file. 
        Public Sub Cleanup()
            ' Dispose the sequence
            sequence.Dispose()

            ' Delete the log file.
            If delete Then
                Try
                    ' This deletes the base log file and all the extents associated with the log.
                    LogStore.Delete(Me.logName)
                Catch e As Exception
                    Console.WriteLine("Exception {0} {1}", e.GetType(), e.Message)
                End Try
            End If
        End Sub

        ' Converts the given data to an Array of ArraySegment<byte> 
        Public Shared Function CreateData(ByVal str As String) As IList(Of ArraySegment(Of Byte))
            Dim enc As Encoding = Encoding.Unicode

            Dim array() As Byte = enc.GetBytes(str)

            Dim segments(0) As ArraySegment(Of Byte)
            segments(0) = New ArraySegment(Of Byte)(array)

            Return System.Array.AsReadOnly(Of ArraySegment(Of Byte))(segments)
        End Function

        Public Shared Function CreateData(ByVal size As Integer) As IList(Of ArraySegment(Of Byte))
            Dim array(size - 1) As Byte

            Dim rand As New Random()
            rand.NextBytes(array)

            Dim segments(0) As ArraySegment(Of Byte)
            segments(0) = New ArraySegment(Of Byte)(array)

            Return System.Array.AsReadOnly(Of ArraySegment(Of Byte))(segments)
        End Function

        Public Shared Function GetAdvanceBaseSeqNumber(ByVal recTargetSeqNum As SequenceNumber) As SequenceNumber
            Dim targetSequenceNumber As SequenceNumber = SequenceNumber.Invalid

            Console.WriteLine("Getting actual target sequence number...")

            ' 
            ' Implement the logic for returning a valid sequence number closer to
            ' recommended target sequence number. 
            '

            Return targetSequenceNumber
        End Function

        Public Shared Sub HandleTailPinned(ByVal arg As Object, ByVal tailPinnedEventArgs As TailPinnedEventArgs)
            Console.WriteLine("TailPinned has fired")

            ' Based on the implementation of a logging application, the log base can be moved
            ' to free up more log space and if it is not possible to move the 
            ' base, the application should report by throwing an exception.

            If MyLog.AdvanceBase Then
                Try
                    ' TailPnnedEventArgs has the recommended sequence number and its generated 
                    ' based on PinnedTailThreshold policy. 
                    ' This does not map to an actual sequence number in the record sequence
                    ' but an approximation and potentially frees up the threshold % log space
                    ' when the log base is advanced to a valid sequence number closer to the 
                    ' recommended sequence number. 
                    ' The user should use this sequence number to locate a closest valid sequence
                    ' number to advance the base of the log.

                    Dim recommendedTargetSeqNum As SequenceNumber = tailPinnedEventArgs.TargetSequenceNumber

                    ' Get the actual Target sequence number.
                    Dim actualTargetSeqNum As SequenceNumber = MyLog.GetAdvanceBaseSeqNumber(recommendedTargetSeqNum)

                    MySequence.AdvanceBaseSequenceNumber(actualTargetSeqNum)
                Catch e As Exception
                    Console.WriteLine("Exception thrown {0} {1}", e.GetType(), e.Message)
                End Try
            Else
                ' Report back Error if under some conditions the log cannot
                ' advance the base sequence number.

                Console.WriteLine("Reporting Error! Unable to move the base sequence number!")
                Throw New IOException()
            End If
        End Sub
    End Class

    Friend Class LogSample
        Shared Sub Main(ByVal args() As String)
            ' Create log record sequence.
            Dim log As New MyLog()

            ' Add additional extents.
            log.AddExtents()

            ' Enumerate the current log extents.
            log.EnumerateExtents()

            ' Set log policies and register for TailPinned event notifications. 
            log.SetLogPolicy()

            log.ShowLogPolicy()

            ' Append a few records and read the appended records. 
            log.AppendRecords()
            log.ReadRecords()

            ' Fill the Log to trigger log growth...and subsequent TailPinned notifications.
            log.FillLog()

            log.EnumerateExtents()

            log.Cleanup()
        End Sub
    End Class
End Namespace

注釈

このクラスは、LogExtent に関連付けられている LogStore オブジェクトのコレクションを格納します。 LogStore インスタンスは、LogExtent により表されるディスク エクステントのコレクションにデータを保存します。 個々の LogExtent は 1 つの LogStore に関連付けられ、同一の LogExtent 内の LogStore オブジェクトのサイズはすべて同じです。 領域が追加され、エクステント増加分が LogStore インスタンスから削除されます。

LogExtent オブジェクトはディスク上でファイルとして表されますが、通常のファイルとして移動したり削除したりすることはできません。 LogExtent インスタンスを直接追加または削除する場合は、このクラスのメソッドを使用する必要があります。 通常、アクティブなデータがなくなったエクステントは削除されます。 ただし、force メソッドの Remove パラメーターが true の場合、エクステントを直ちに削除できないときは例外がスローされます。

LogExtentCollection 内の最後のエクステントを削除することはできません。つまり、エクステントの追加後に Count プロパティが 0 になることはありません。

プロパティ

Count

コレクション内のログ エクステントの数を取得します。

FreeCount

コレクション内の解放されている LogExtent インスタンスの数 (データが存在しない LogExtent インスタンスの数) を取得します。

メソッド

Add(String)

LogExtent のインスタンスをコレクションに追加します。

Add(String, Int64)

指定されたサイズで新しい LogExtent を作成し、コレクションに追加します。

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetEnumerator()

このコレクション内の LogExtent インスタンスの列挙子を取得します。 このメソッドは継承できません。

GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
Remove(LogExtent, Boolean)

指定した LogExtent インスタンスをコレクションから削除します。

Remove(String, Boolean)

指定したパスの LogExtent インスタンスをコレクションから削除します。

ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

明示的なインターフェイスの実装

IEnumerable.GetEnumerator()

このコレクション内の LogExtent インスタンスの列挙子を取得します。 このメソッドは継承できません。

拡張メソッド

CopyToDataTable<T>(IEnumerable<T>)

指定した入力 DataTable オブジェクトに応じて (ジェネリック パラメーター TDataRow)、IEnumerable<T> オブジェクトのコピーを格納する DataRow を返します。

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption)

指定した入力 DataRow オブジェクトに応じて (ジェネリック パラメーター TDataTable)、指定した IEnumerable<T>DataRow オブジェクトをコピーします。

CopyToDataTable<T>(IEnumerable<T>, DataTable, LoadOption, FillErrorEventHandler)

指定した入力 DataRow オブジェクトに応じて (ジェネリック パラメーター TDataTable)、指定した IEnumerable<T>DataRow オブジェクトをコピーします。

Aggregate<TSource>(IEnumerable<TSource>, Func<TSource,TSource,TSource>)

シーケンスにアキュムレータ関数を適用します。

Aggregate<TSource,TAccumulate>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>)

シーケンスにアキュムレータ関数を適用します。 指定されたシード値が最初のアキュムレータ値として使用されます。

Aggregate<TSource,TAccumulate,TResult>(IEnumerable<TSource>, TAccumulate, Func<TAccumulate,TSource,TAccumulate>, Func<TAccumulate,TResult>)

シーケンスにアキュムレータ関数を適用します。 指定したシード値は最初のアキュムレータ値として使用され、指定した関数は結果値の選択に使用されます。

All<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

シーケンスのすべての要素が条件を満たしているかどうかを判断します。

Any<TSource>(IEnumerable<TSource>)

シーケンスに要素が含まれているかどうかを判断します。

Any<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

シーケンスの任意の要素が条件を満たしているかどうかを判断します。

Append<TSource>(IEnumerable<TSource>, TSource)

シーケンスの末尾に値を追加します。

AsEnumerable<TSource>(IEnumerable<TSource>)

IEnumerable<T> として型指定された入力を返します。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する Decimal 値のシーケンスの平均値を計算します。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する Double 値のシーケンスの平均値を計算します。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する Int32 値のシーケンスの平均値を計算します。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する Int64 値のシーケンスの平均値を計算します。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Decimal 値のシーケンスの平均値を計算します。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Double 値のシーケンスの平均値を計算します。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Int32 値のシーケンスの平均値を計算します。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Int64 値のシーケンスの平均値を計算します。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Single 値のシーケンスの平均値を計算します。

Average<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する Single 値のシーケンスの平均値を計算します。

Cast<TResult>(IEnumerable)

IEnumerable の要素を、指定した型にキャストします。

Chunk<TSource>(IEnumerable<TSource>, Int32)

シーケンスの要素を最大 sizeサイズのチャンクに分割します。

Concat<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

2 つのシーケンスを連結します。

Contains<TSource>(IEnumerable<TSource>, TSource)

既定の等値比較子を使用して、指定した要素がシーケンスに含まれているかどうかを判断します。

Contains<TSource>(IEnumerable<TSource>, TSource, IEqualityComparer<TSource>)

指定した IEqualityComparer<T> を使用して、指定した要素がシーケンスに含まれているかどうかを判断します。

Count<TSource>(IEnumerable<TSource>)

シーケンス内の要素数を返します。

Count<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

条件を満たす、指定されたシーケンス内の要素の数を表す数値を返します。

DefaultIfEmpty<TSource>(IEnumerable<TSource>)

指定したシーケンスの要素を返します。シーケンスが空の場合はシングルトン コレクションにある型パラメーターの既定値を返します。

DefaultIfEmpty<TSource>(IEnumerable<TSource>, TSource)

指定されたシーケンスの要素を返します。シーケンスが空の場合はシングルトン コレクションにある型パラメーターの既定値を返します。

Distinct<TSource>(IEnumerable<TSource>)

既定の等値比較子を使用して値を比較することにより、シーケンスから一意の要素を返します。

Distinct<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

指定された IEqualityComparer<T> を使用して値を比較することにより、シーケンスから一意の要素を返します。

DistinctBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

指定したキー セレクター関数に従って、シーケンスから個別の要素を返します。

DistinctBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

指定したキー セレクター関数に従ってシーケンスから個別の要素を返し、指定した比較子を使用してキーを比較します。

ElementAt<TSource>(IEnumerable<TSource>, Index)

シーケンス内の指定されたインデックス位置にある要素を返します。

ElementAt<TSource>(IEnumerable<TSource>, Int32)

シーケンス内の指定されたインデックス位置にある要素を返します。

ElementAtOrDefault<TSource>(IEnumerable<TSource>, Index)

シーケンス内の指定したインデックス位置にある要素を返します。インデックスが範囲外の場合は既定値を返します。

ElementAtOrDefault<TSource>(IEnumerable<TSource>, Int32)

シーケンス内の指定したインデックス位置にある要素を返します。インデックスが範囲外の場合は既定値を返します。

Except<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

既定の等値比較子を使用して値を比較することにより、2 つのシーケンスの差集合を生成します。

Except<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

指定された IEqualityComparer<T> を使用して値を比較することにより、2 つのシーケンスの差集合を生成します。

ExceptBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TKey>, Func<TSource,TKey>)

指定したキー セレクター関数に従って、2 つのシーケンスのセット差を生成します。

ExceptBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TKey>, Func<TSource,TKey>, IEqualityComparer<TKey>)

指定したキー セレクター関数に従って、2 つのシーケンスのセット差を生成します。

First<TSource>(IEnumerable<TSource>)

シーケンスの最初の要素を返します。

First<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

指定された条件を満たす、シーケンスの最初の要素を返します。

FirstOrDefault<TSource>(IEnumerable<TSource>)

シーケンスの最初の要素を返します。シーケンスに要素が含まれていない場合は既定値を返します。

FirstOrDefault<TSource>(IEnumerable<TSource>, TSource)

シーケンスの最初の要素を返します。シーケンスに要素が含まれている場合は、指定した既定値を返します。

FirstOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

条件を満たす、シーケンスの最初の要素を返します。このような要素が見つからない場合は既定値を返します。

FirstOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>, TSource)

条件を満たすシーケンスの最初の要素を返します。そのような要素が見つからない場合は、指定された既定値を返します。

GroupBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

指定されたキー セレクター関数に従ってシーケンスの要素をグループ化します。

GroupBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、指定された比較子を使用してキーを比較します。

GroupBy<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、指定された関数を使用して各グループの要素を射影します。

GroupBy<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

キー セレクター関数に従ってシーケンスの要素をグループ化します。 キーの比較には、比較子を使用し、各グループの要素の射影には、指定された関数を使用します。

GroupBy<TSource,TKey,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,IEnumerable<TSource>,TResult>)

指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。

GroupBy<TSource,TKey,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TKey,IEnumerable<TSource>,TResult>, IEqualityComparer<TKey>)

指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。 キーの比較には、指定された比較子を使用します。

GroupBy<TSource,TKey,TElement,TResult>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, Func<TKey,IEnumerable<TElement>,TResult>)

指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。 各グループの要素は、指定された関数を使用して射影されます。

GroupBy<TSource,TKey,TElement,TResult>(IEnumerable<TSource>, Func<TSource, TKey>, Func<TSource,TElement>, Func<TKey,IEnumerable<TElement>, TResult>, IEqualityComparer<TKey>)

指定されたキー セレクター関数に従ってシーケンスの要素をグループ化し、各グループとそのキーから結果値を作成します。 キー値の比較には、指定された比較子を使用し、各グループの要素の射影には、指定された関数を使用します。

GroupJoin<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>, TResult>)

キーが等しいかどうかに基づいて 2 つのシーケンスの要素を相互に関連付け、その結果をグループ化します。 キーの比較には既定の等値比較子が使用されます。

GroupJoin<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,IEnumerable<TInner>, TResult>, IEqualityComparer<TKey>)

キーが等しいかどうかに基づいて 2 つのシーケンスの要素を相互に関連付け、その結果をグループ化します。 指定された IEqualityComparer<T> を使用してキーを比較します。

Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

既定の等値比較子を使用して値を比較することにより、2 つのシーケンスの積集合を生成します。

Intersect<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

指定された IEqualityComparer<T> を使用して値を比較することにより、2 つのシーケンスの積集合を生成します。

IntersectBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TKey>, Func<TSource,TKey>)

指定したキー セレクター関数に従って、2 つのシーケンスの集合積集合を生成します。

IntersectBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TKey>, Func<TSource,TKey>, IEqualityComparer<TKey>)

指定したキー セレクター関数に従って、2 つのシーケンスの集合積集合を生成します。

Join<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>)

一致するキーに基づいて 2 つのシーケンスの要素を相互に関連付けます。 キーの比較には既定の等値比較子が使用されます。

Join<TOuter,TInner,TKey,TResult>(IEnumerable<TOuter>, IEnumerable<TInner>, Func<TOuter,TKey>, Func<TInner,TKey>, Func<TOuter,TInner,TResult>, IEqualityComparer<TKey>)

一致するキーに基づいて 2 つのシーケンスの要素を相互に関連付けます。 指定された IEqualityComparer<T> を使用してキーを比較します。

Last<TSource>(IEnumerable<TSource>)

シーケンスの最後の要素を返します。

Last<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

指定された条件を満たす、シーケンスの最後の要素を返します。

LastOrDefault<TSource>(IEnumerable<TSource>)

シーケンスの最後の要素を返します。シーケンスに要素が含まれていない場合は既定値を返します。

LastOrDefault<TSource>(IEnumerable<TSource>, TSource)

シーケンスの最後の要素を返します。シーケンスに要素が含まれている場合は、指定した既定値を返します。

LastOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

条件を満たす、シーケンスの最後の要素を返します。このような要素が見つからない場合は既定値を返します。

LastOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>, TSource)

条件を満たすシーケンスの最後の要素を返します。そのような要素が見つからない場合は、指定された既定値を返します。

LongCount<TSource>(IEnumerable<TSource>)

シーケンス内の要素の合計数を表す Int64 を返します。

LongCount<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

シーケンス内で条件を満たす要素の数を表す Int64 を返します。

Max<TSource>(IEnumerable<TSource>)

ジェネリック シーケンスの最大値を返します。

Max<TSource>(IEnumerable<TSource>, IComparer<TSource>)

ジェネリック シーケンスの最大値を返します。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

シーケンスの各要素に対して変換関数を呼び出し、Decimal の最大値を返します。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

シーケンスの各要素に対して変換関数を呼び出し、Double の最大値を返します。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

シーケンスの各要素に対して変換関数を呼び出し、Int32 の最大値を返します。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

シーケンスの各要素に対して変換関数を呼び出し、Int64 の最大値を返します。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

シーケンスの各要素に対して変換関数を呼び出し、null 許容の Decimal の最大値を返します。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

シーケンスの各要素に対して変換関数を呼び出し、null 許容の Double の最大値を返します。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

シーケンスの各要素に対して変換関数を呼び出し、null 許容の Int32 の最大値を返します。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

シーケンスの各要素に対して変換関数を呼び出し、null 許容の Int64 の最大値を返します。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

シーケンスの各要素に対して変換関数を呼び出し、null 許容の Single の最大値を返します。

Max<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

シーケンスの各要素に対して変換関数を呼び出し、Single の最大値を返します。

Max<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>)

ジェネリック シーケンスの各要素に対して変換関数を呼び出し、結果の最大値を返します。

MaxBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

指定したキー セレクター関数に従って、ジェネリック シーケンスの最大値を返します。

MaxBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

指定したキー セレクター関数とキー比較子に従って、ジェネリック シーケンスの最大値を返します。

Min<TSource>(IEnumerable<TSource>)

ジェネリック シーケンスの最小値を返します。

Min<TSource>(IEnumerable<TSource>, IComparer<TSource>)

ジェネリック シーケンスの最小値を返します。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

シーケンスの各要素に対して変換関数を呼び出し、Decimal の最小値を返します。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

シーケンスの各要素に対して変換関数を呼び出し、Double の最小値を返します。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

シーケンスの各要素に対して変換関数を呼び出し、Int32 の最小値を返します。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

シーケンスの各要素に対して変換関数を呼び出し、Int64 の最小値を返します。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

シーケンスの各要素に対して変換関数を呼び出し、null 許容の Decimal の最小値を返します。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

シーケンスの各要素に対して変換関数を呼び出し、null 許容の Double の最小値を返します。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

シーケンスの各要素に対して変換関数を呼び出し、null 許容の Int32 の最小値を返します。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

シーケンスの各要素に対して変換関数を呼び出し、null 許容の Int64 の最小値を返します。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

シーケンスの各要素に対して変換関数を呼び出し、null 許容の Single の最小値を返します。

Min<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

シーケンスの各要素に対して変換関数を呼び出し、Single の最小値を返します。

Min<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>)

ジェネリック シーケンスの各要素に対して変換関数を呼び出し、結果の最小値を返します。

MinBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

指定したキー セレクター関数に従って、ジェネリック シーケンスの最小値を返します。

MinBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

指定したキー セレクター関数とキー比較子に従って、ジェネリック シーケンスの最小値を返します。

OfType<TResult>(IEnumerable)

指定された型に基づいて IEnumerable の要素をフィルター処理します。

OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

シーケンスの要素をキーに従って昇順に並べ替えます。

OrderBy<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

指定された比較子を使用してシーケンスの要素を昇順に並べ替えます。

OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

シーケンスの要素をキーに従って降順に並べ替えます。

OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)

指定された比較子を使用してシーケンスの要素を降順に並べ替えます。

Prepend<TSource>(IEnumerable<TSource>, TSource)

シーケンスの先頭に値を追加します。

Reverse<TSource>(IEnumerable<TSource>)

シーケンスの要素の順序を反転させます。

Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,TResult>)

シーケンスの各要素を新しいフォームに射影します。

Select<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,TResult>)

要素のインデックスを組み込むことにより、シーケンスの各要素を新しいフォームに射影します。

SelectMany<TSource,TResult>(IEnumerable<TSource>, Func<TSource,IEnumerable<TResult>>)

シーケンスの各要素を IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化します。

SelectMany<TSource,TResult>(IEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TResult>>)

シーケンスの各要素を IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化します。 各ソース要素のインデックスは、その要素の射影されたフォームで使用されます。

SelectMany<TSource,TCollection,TResult>(IEnumerable<TSource>, Func<TSource,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

シーケンスの各要素を IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化して、その各要素に対して結果のセレクター関数を呼び出します。

SelectMany<TSource,TCollection,TResult>(IEnumerable<TSource>, Func<TSource,Int32,IEnumerable<TCollection>>, Func<TSource,TCollection,TResult>)

シーケンスの各要素を IEnumerable<T> に射影し、結果のシーケンスを 1 つのシーケンスに平坦化して、その各要素に対して結果のセレクター関数を呼び出します。 各ソース要素のインデックスは、その要素の中間の射影されたフォームで使用されます。

SequenceEqual<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

要素の型に対して既定の等値比較子を使用して要素を比較することで、2 つのシーケンスが等しいかどうかを判断します。

SequenceEqual<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

指定された IEqualityComparer<T> を使用して要素を比較することで、2 つのシーケンスが等しいかどうかを判断します。

Single<TSource>(IEnumerable<TSource>)

シーケンスの唯一の要素を返し、シーケンス内の要素が 1 つだけでない場合は例外をスローします。

Single<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

指定された条件を満たす、シーケンスの唯一の要素を返し、そのような要素が複数存在する場合は例外をスローします。

SingleOrDefault<TSource>(IEnumerable<TSource>)

シーケンスの唯一の要素を返します。シーケンスが空の場合、既定値を返します。シーケンス内に要素が複数ある場合、このメソッドは例外をスローします。

SingleOrDefault<TSource>(IEnumerable<TSource>, TSource)

シーケンスの唯一の要素を返します。シーケンスが空の場合は、指定した既定値を返します。シーケンス内に複数の要素がある場合、このメソッドは例外をスローします。

SingleOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

指定された条件を満たすシーケンスの唯一の要素、またはそのような要素がない場合は既定値を返します。このメソッドは、複数の要素が条件を満たす場合に例外をスローします。

SingleOrDefault<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>, TSource)

指定した条件を満たすシーケンスの唯一の要素、またはそのような要素が存在しない場合は、指定した既定値を返します。このメソッドは、複数の要素が条件を満たす場合に例外をスローします。

Skip<TSource>(IEnumerable<TSource>, Int32)

シーケンス内の指定された数の要素をバイパスし、残りの要素を返します。

SkipLast<TSource>(IEnumerable<TSource>, Int32)

source の要素と、省略されたソース コレクションの最後の count 要素を含む、列挙可能な新しいコレクションを返します。

SkipWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

指定された条件が満たされる限り、シーケンスの要素をバイパスした後、残りの要素を返します。

SkipWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>)

指定された条件が満たされる限り、シーケンスの要素をバイパスした後、残りの要素を返します。 要素のインデックスは、述語関数のロジックで使用されます。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Decimal>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する Decimal 値のシーケンスの合計を計算します。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Double>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する Double 値のシーケンスの合計を計算します。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Int32>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する Int32 値のシーケンスの合計を計算します。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Int64>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する Int64 値のシーケンスの合計を計算します。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Decimal>>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Decimal 値のシーケンスの合計を計算します。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Double>>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Double 値のシーケンスの合計を計算します。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int32>>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Int32 値のシーケンスの合計を計算します。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Int64>>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Int64 値のシーケンスの合計を計算します。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Nullable<Single>>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する null 許容の Single 値のシーケンスの合計を計算します。

Sum<TSource>(IEnumerable<TSource>, Func<TSource,Single>)

入力シーケンスの各要素に対して変換関数を呼び出して取得する Single 値のシーケンスの合計を計算します。

Take<TSource>(IEnumerable<TSource>, Int32)

シーケンスの先頭から、指定された数の連続する要素を返します。

Take<TSource>(IEnumerable<TSource>, Range)

シーケンスから指定した連続する要素の範囲を返します。

TakeLast<TSource>(IEnumerable<TSource>, Int32)

source の最後の count 要素を含む、列挙可能な新しいコレクションを返します。

TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

指定された条件が満たされる限り、シーケンスから要素を返します。

TakeWhile<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>)

指定された条件が満たされる限り、シーケンスから要素を返します。 要素のインデックスは、述語関数のロジックで使用されます。

ToArray<TSource>(IEnumerable<TSource>)

IEnumerable<T> から配列を作成します。

ToDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

指定されたキー セレクター関数に従って、Dictionary<TKey,TValue> から IEnumerable<T> を作成します。

ToDictionary<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

指定されたキー セレクター関数およびキーの比較子に従って、Dictionary<TKey,TValue> から IEnumerable<T> を作成します。

ToDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

指定されたキー セレクター関数および要素セレクター関数に従って、Dictionary<TKey,TValue> から IEnumerable<T> を作成します。

ToDictionary<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

指定されたキー セレクター関数、比較子、および要素セレクター関数に従って、Dictionary<TKey,TValue> から IEnumerable<T> を作成します。

ToHashSet<TSource>(IEnumerable<TSource>)

IEnumerable<T> から HashSet<T> を作成します。

ToHashSet<TSource>(IEnumerable<TSource>, IEqualityComparer<TSource>)

comparer を使用して IEnumerable<T>から HashSet<T> を作成し、キーを比較します。

ToList<TSource>(IEnumerable<TSource>)

IEnumerable<T> から List<T> を作成します。

ToLookup<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)

指定されたキー セレクター関数に従って、Lookup<TKey,TElement> から IEnumerable<T> を作成します。

ToLookup<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

指定されたキー セレクター関数およびキーの比較子に従って、Lookup<TKey,TElement> から IEnumerable<T> を作成します。

ToLookup<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>)

指定されたキー セレクター関数および要素セレクター関数に従って、Lookup<TKey,TElement> から IEnumerable<T> を作成します。

ToLookup<TSource,TKey,TElement>(IEnumerable<TSource>, Func<TSource,TKey>, Func<TSource,TElement>, IEqualityComparer<TKey>)

指定されたキー セレクター関数、比較子、および要素セレクター関数に従って、Lookup<TKey,TElement> から IEnumerable<T> を作成します。

TryGetNonEnumeratedCount<TSource>(IEnumerable<TSource>, Int32)

列挙型を強制せずに、シーケンス内の要素の数の測定を試みます。

Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>)

既定の等値比較子を使用して、2 つのシーケンスの和集合を生成します。

Union<TSource>(IEnumerable<TSource>, IEnumerable<TSource>, IEqualityComparer<TSource>)

指定された IEqualityComparer<T> を使用して 2 つのシーケンスの和集合を生成します。

UnionBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TSource>, Func<TSource,TKey>)

指定したキー セレクター関数に従って、2 つのシーケンスのセット和集合を生成します。

UnionBy<TSource,TKey>(IEnumerable<TSource>, IEnumerable<TSource>, Func<TSource,TKey>, IEqualityComparer<TKey>)

指定したキー セレクター関数に従って、2 つのシーケンスのセット和集合を生成します。

Where<TSource>(IEnumerable<TSource>, Func<TSource,Boolean>)

述語に基づいて値のシーケンスをフィルター処理します。

Where<TSource>(IEnumerable<TSource>, Func<TSource,Int32,Boolean>)

述語に基づいて値のシーケンスをフィルター処理します。 各要素のインデックスは、述語関数のロジックで使用されます。

Zip<TFirst,TSecond>(IEnumerable<TFirst>, IEnumerable<TSecond>)

指定された 2 つのシーケンスの要素を持つタプルのシーケンスを生成します。

Zip<TFirst,TSecond,TThird>(IEnumerable<TFirst>, IEnumerable<TSecond>, IEnumerable<TThird>)

指定した 3 つのシーケンスの要素を含むタプルのシーケンスを生成します。

Zip<TFirst,TSecond,TResult>(IEnumerable<TFirst>, IEnumerable<TSecond>, Func<TFirst,TSecond,TResult>)

2 つのシーケンスの対応する要素に対して、1 つの指定した関数を適用し、結果として 1 つのシーケンスを生成します。

AsParallel(IEnumerable)

クエリの並列化を有効にします。

AsParallel<TSource>(IEnumerable<TSource>)

クエリの並列化を有効にします。

AsQueryable(IEnumerable)

IEnumerableIQueryable に変換します。

AsQueryable<TElement>(IEnumerable<TElement>)

ジェネリックの IEnumerable<T> をジェネリックの IQueryable<T> に変換します。

Ancestors<T>(IEnumerable<T>)

ソース コレクション内のすべてのノードの先祖が格納された、要素のコレクションを返します。

Ancestors<T>(IEnumerable<T>, XName)

ソース コレクション内のすべてのノードの先祖が格納され、フィルター処理された要素のコレクションを返します。 一致する XName を持つ要素のみがコレクションに含められます。

DescendantNodes<T>(IEnumerable<T>)

ソース コレクション内のすべてのドキュメントおよび要素の子孫ノードのコレクションを返します。

Descendants<T>(IEnumerable<T>)

ソース コレクション内のすべての要素とドキュメントの子孫要素が格納された要素のコレクションを返します。

Descendants<T>(IEnumerable<T>, XName)

ソース コレクション内のすべての要素とドキュメントの子孫要素が格納され、フィルター処理された要素のコレクションを返します。 一致する XName を持つ要素のみがコレクションに含められます。

Elements<T>(IEnumerable<T>)

ソース コレクション内のすべての要素およびドキュメントの子要素のコレクションを返します。

Elements<T>(IEnumerable<T>, XName)

ソース コレクション内のすべての要素およびドキュメントの、フィルター処理された子要素のコレクションを返します。 一致する XName を持つ要素のみがコレクションに含められます。

InDocumentOrder<T>(IEnumerable<T>)

ソース コレクション内のすべてのノードがドキュメント順に並べ替えて格納された、ノードのコレクションを返します。

Nodes<T>(IEnumerable<T>)

ソース コレクション内のすべてのドキュメントおよび要素の子ノードのコレクションを返します。

Remove<T>(IEnumerable<T>)

ソース コレクション内の親ノードからすべてのノードを削除します。

適用対象

こちらもご覧ください