StoryFragment 類別

定義

代表 XPS 文件內完整或部分的劇本。

public ref class StoryFragment
public ref class StoryFragment : System::Collections::Generic::IEnumerable<System::Windows::Documents::DocumentStructures::BlockElement ^>, System::Windows::Markup::IAddChild
public class StoryFragment
[System.Windows.Markup.ContentProperty("BlockElementList")]
public class StoryFragment : System.Collections.Generic.IEnumerable<System.Windows.Documents.DocumentStructures.BlockElement>, System.Windows.Markup.IAddChild
type StoryFragment = class
    interface IAddChild
[<System.Windows.Markup.ContentProperty("BlockElementList")>]
type StoryFragment = class
    interface IAddChild
    interface seq<BlockElement>
    interface IEnumerable
[<System.Windows.Markup.ContentProperty("BlockElementList")>]
type StoryFragment = class
    interface seq<BlockElement>
    interface IEnumerable
    interface IAddChild
Public Class StoryFragment
Public Class StoryFragment
Implements IAddChild, IEnumerable(Of BlockElement)
繼承
StoryFragment
屬性
實作

範例

下列範例顯示 <StoryFragment> XML 檔規格 (XPS) 檔的一部分。

<StoryFragment StoryName="DocumentBody" FragmentType="Content">
  <SectionStructure>
    <ParagraphStructure>
      <NamedElement NameReference="Pg1Heading1" />
    </ParagraphStructure>

    <ParagraphStructure>
      <NamedElement NameReference="Pg1P1" />
    </ParagraphStructure>

    <ParagraphStructure>
      <NamedElement NameReference="Pg1P2" />
    </ParagraphStructure>

    <ParagraphStructure>
      <NamedElement NameReference="Pg1P3" />
    </ParagraphStructure>

    <ParagraphStructure>
      <NamedElement NameReference="Pg1P4" />
    </ParagraphStructure>

    <ParagraphStructure>
      <NamedElement NameReference="Pg1P5" />
    </ParagraphStructure>

    <ParagraphStructure>
      <NamedElement NameReference="Pg1Heading2" />
    </ParagraphStructure>

    <ParagraphStructure>
      <NamedElement NameReference="Pg1P6" />
    </ParagraphStructure>

    <ParagraphStructure>
      <NamedElement NameReference="Pg1P7" />
    </ParagraphStructure>

    <TableStructure>
      <TableRowGroupStructure>

        <TableRowStructure>
          <TableCellStructure>
            <ParagraphStructure>
              <NamedElement NameReference="R1C1P1" />
            </ParagraphStructure>
          </TableCellStructure>
          <TableCellStructure>
            <ParagraphStructure>
              <NamedElement NameReference="R1C2P1" />
            </ParagraphStructure>
          </TableCellStructure>
        </TableRowStructure>

        <TableRowStructure>
          <TableCellStructure>
            <ParagraphStructure>
              <NamedElement NameReference="R2C1P1" />
            </ParagraphStructure>
          </TableCellStructure>
          <TableCellStructure>
            <ParagraphStructure>
              <NamedElement NameReference="R2C2P1" />
            </ParagraphStructure>
            <ParagraphStructure>
              <NamedElement NameReference="R2C2P2" />
            </ParagraphStructure>
          </TableCellStructure>
        </TableRowStructure>

        <TableRowStructure>
          <TableCellStructure>
            <ParagraphStructure>
              <NamedElement NameReference="R3C1P1" />
            </ParagraphStructure>
          </TableCellStructure>
          <TableCellStructure>
            <ParagraphStructure>
              <NamedElement NameReference="R3C2P1" />
            </ParagraphStructure>
          </TableCellStructure>
        </TableRowStructure>

        <TableRowStructure>
          <TableCellStructure>
            <ParagraphStructure>
              <NamedElement NameReference="R4C1P1" />
            </ParagraphStructure>
          </TableCellStructure>
          <TableCellStructure>
            <ParagraphStructure>
              <NamedElement NameReference="R4C2P1" />
            </ParagraphStructure>
          </TableCellStructure>
        </TableRowStructure>

        <TableRowStructure>
          <TableCellStructure>
            <ParagraphStructure>
              <NamedElement NameReference="R5C1P1" />
            </ParagraphStructure>
          </TableCellStructure>
          <TableCellStructure>
            <ParagraphStructure>
              <NamedElement NameReference="R5C2P1" />
            </ParagraphStructure>
          </TableCellStructure>
        </TableRowStructure>

      </TableRowGroupStructure>
    </TableStructure>
  </SectionStructure>
</StoryFragment>

備註

XPS 檔中的 XPS 故事大致類似于新聞或雜誌中的故事。 它是文字和圖形內容的一段,通常是在單一 XPS 檔中的單一主題。 一般而言,它會跨越多個頁面,但可以短于看板的方塊式劇本等頁面。 本文也可以不連續,就像第 4 頁繼續的前端新聞故事一樣。 因此,指定的頁面可以有一個以上的本文,以及多個故事的一部分。 頁首或頁尾也是一種特殊的故事,完全包含在單一頁面上。

StoryFragment表示本文的所有或部分。 它永遠不能跨越多個頁面,但可以佔用整個頁面,或與其他片段共用頁面。 如果本文位於多個頁面上,則每個頁面上的每個部分都是個別的片段。 雖然劇本可以有不連續的片段集,但不能有片段本身不連續。

只有專案 StoryFragments 可以是 的父代 StoryFragment 。 內 StoryFragment 元素的位置 StoryBreak 表示本文是否包含在多個片段中,以及其他片段是否在目前片段之前或之後。

當某個 StoryFragment 結構元素中間的 結尾時,假設是 <TableRowGroupStructure> ,則 XPS 檔產生應用程式必須插入元素的適當結束卷 (標,在此案例 </TableRowGroupStructure> 中) 標記之前 </StoryFragment> ,即使結構是在稍後片段中繼續執行也一樣。 (這是確保 內的 StoryFragment 專案樹狀結構有效的 XML.) 繼續本文的片段必須以中斷結構的開頭標記開始。 中斷結構的整個樹狀結構必須以相同方式處理 (,但有一個例外狀況,如下所述) :必須針對中中斷點上方的每個不相符的起始標籤新增結束標籤。

當腳本中斷緊接在標記之後 </TableCellStructure> 時,就會套用例外狀況,則產生的應用程式必須在片段中繼續本文的對應點插入空的資料表資料格結構 (<TableCellStructure></TableCellStructure>) 。 這是必要的,因此取用需要合併指定劇本所有片段的應用程式可以使用簡單的演算法來執行此動作。

例如,假設應用程式想要將下列內容新增至 XPS 檔:

<SectionStructure>  
   <TableStructure>  
      <TableRowGroupStructure>  
         <TableRowStructure>  
            <TableCellStructure>  
               <ParagraphStructure>  
                  <NamedElement NameReference="SomeContent" />  
               </ParagraphStructure>  
            </TableCellStructure>  
            <TableCellStructure>  
               <ParagraphStructure>  
                  <NamedElement NameReference="MoreContent" />  
               </ParagraphStructure>  
            </TableCellStructure>  
         </TableRowStructure>  
         <TableRowStructure>  
            <TableCellStructure>  
               <ParagraphStructure>  
                  <NamedElement NameReference="EvenMoreContent" />  
               </ParagraphStructure>  
            </TableCellStructure>  
            <TableCellStructure>  
               <ParagraphStructure>  
                  <NamedElement NameReference="LastContent" />  
               </ParagraphStructure>  
            </TableCellStructure>  
         </TableRowStructure>  
      </TableRowGroupStructure>  
   </TableStructure>  
</SectionStructure>  

如果分頁符號在 「SomeContent」 的 之後 </TableCellStructure> 強制結束片段,應用程式必須建立分割,如下列範例所示:

<StoryFragment StoryName="MyStory" FragmentType="Content">  
 <SectionStructure>  
    <TableStructure>  
       <TableRowGroupStructure>  
          <TableRowStructure>  
             <TableCellStructure>  
                <ParagraphStructure>  
                   <NamedElement NameReference="SomeContent" />  
                </ParagraphStructure>   
             </TableCellStructure>  
<!-- lines from here to end of fragment added by producer-->  
          </TableRowStructure>  
       </TableRowGroupStructure>  
    </TableStructure>  
 </SectionStructure>  
</StoryFragment>  

<StoryFragment StoryName="MyStory" FragmentType="Content">  
 <SectionStructure>  
    <TableStructure>  
       <TableRowGroupStructure>  
          <TableRowStructure>  
             <TableCellStructure>   
              <!-- extra cell added by producer-->  
             </TableCellStructure>  
<!-- lines from here to start of fragment added by producer-->  
             <TableCellStructure>  
                <ParagraphStructure>  
                   <NamedElement NameReference="MoreContent" />  
                </ParagraphStructure>  
             </TableCellStructure>  
          </TableRowStructure>  
          <TableRowStructure>  
             <TableCellStructure>  
                <ParagraphStructure>  
                   <NamedElement NameReference="EvenMoreContent" />  
                </ParagraphStructure>  
             </TableCellStructure>  
             <TableCellStructure>  
                <ParagraphStructure>  
                   <NamedElement NameReference="LastContent" />  
                </ParagraphStructure>  
             </TableCellStructure>  
          </TableRowStructure>  
       </TableRowGroupStructure>  
    </TableStructure>  
 </SectionStructure>  
</StoryFragment>  

讀取檔的應用程式可能需要合併此內容。 例如,假設 XPS 檢視器具有 [將整個故事複製到剪貼簿 ] 按鈕;或將劇本傳遞至語音合成器的盲目應用程式的 XPS 。 讀取檔的某些應用程式可能需要合併本文片段的子集。 例如,只要三鍵即可將整個段落複製到剪貼簿的功能,每當段落跨越分頁符號時,就必須執行合併,因為這類段落會在兩 StoryFragment 個 s 之間分割。

若要合併,請使用此演算法:

  1. </StoryFragment>從要合併的第一個片段結尾刪除 , <StoryFragment> 並從第二個開頭刪除 。

  2. 如果第一個片段的最後一個結束記號的類型與第二個片段的第一個開頭標記相同 (,而且它們不是 <NamedElement>) 標記,請刪除兩者。

  3. 重複步驟 2,直到兩個片段處於下列 其中一 種狀態:

    • 在前置片段的最後一個結束記號之間,尾端片段的第一個開始標籤之間不再有類型相符。

    • 前置片段的最後一個結束記號,尾端片段的第一個開始標記是兩 <NamedElement> 個標記。

在上述範例中,如果產生應用程式尚未新增空儲存格,則合併片段會產生資料表,其中第一個資料列只有一個包含 「SomeContent」 和 「MoreContent」 參照的儲存格,而不是包含兩個儲存格的原始第一個資料列,每個儲存格都包含單一參考

合併整個本文時,應該針對屬於相同本文的每個後續片段重複演算法。 屬於本文的片段會在 專案中編制索引 <Story> 。 請參閱 XML 檔規格的第 9.1.15 節, (XPS) 規格,您可以在 XPS:規格和授權下載取得。 指定本文的最後一個片段會有元素做為其最後一個 StoryBreak 子系。

建構函式

StoryFragment()

初始化 StoryFragment 類別的新執行個體。

屬性

FragmentName

取得或設定 Story 片段的名稱。

FragmentType

取得或設定片段的型別。

StoryName

取得或設定 Story 的名稱。

方法

Add(BlockElement)

將區塊加入至 Story 片段。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

明確介面實作

IAddChild.AddChild(Object)

此成員支援 .NET Framework 基礎結構,並不能直接使用於您的程式碼中。

IAddChild.AddText(String)

將節點的文字內容加入物件中。

IEnumerable.GetEnumerator()

尚未實作這個方法。

IEnumerable<BlockElement>.GetEnumerator()

尚未實作這個方法。

擴充方法

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 的項目轉換成指定的型別。

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

串連兩個序列。

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

使用預設的相等比較子 (Comparer) 來判斷序列是否包含指定的項目。

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> 來比較值,以便從序列傳回獨特的項目。

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

傳回位於序列中指定索引處的項目。

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

傳回位於序列中指定索引處的元素;如果索引超出範圍,則傳回預設值。

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

使用預設相等比較子來比較值,以便產生兩個序列的差異。

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

使用指定的 IEqualityComparer<T> 來比較值,以便產生兩個序列的差異。

First<TSource>(IEnumerable<TSource>)

傳回序列的第一個項目。

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

傳回序列中符合指定條件的第一個元素。

FirstOrDefault<TSource>(IEnumerable<TSource>)

傳回序列的第一個元素;如果序列中沒有包含任何元素,則傳回預設值。

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

傳回序列中符合條件的第一個元素;如果找不到這類元素,則傳回預設值。

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>)

根據索引鍵相等與否,將兩個序列的項目相互關聯,並群組產生的結果。 預設的相等比較子是用於比較索引鍵。

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

根據索引鍵相等與否,將兩個序列的項目相互關聯,並群組產生的結果。 指定的 IEqualityComparer<T> 是用於比較索引鍵。

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

使用預設相等比較子來比較值,以便產生兩個序列的交集。

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

使用指定的 IEqualityComparer<T> 來比較值,以便產生兩個序列的交集。

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

根據相符索引鍵,將兩個序列的項目相互關聯。 預設的相等比較子是用於比較索引鍵。

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

根據相符索引鍵,將兩個序列的項目相互關聯。 指定的 IEqualityComparer<T> 是用於比較索引鍵。

Last<TSource>(IEnumerable<TSource>)

傳回序列的最後一個項目。

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

傳回序列中符合指定之條件的最後一個元素。

LastOrDefault<TSource>(IEnumerable<TSource>)

傳回序列的最後一個元素;如果序列中沒有包含任何元素,則傳回預設值。

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

傳回序列中符合條件的最後一個元素;如果找不到這類元素,則傳回預設值。

LongCount<TSource>(IEnumerable<TSource>)

傳回代表序列中項目總數的 Int64

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

傳回 Int64,其代表序列中符合條件的項目數目。

Max<TSource>(IEnumerable<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>)

在泛型序列的每個項目上叫用轉換函式,並傳回最大的結果值。

Min<TSource>(IEnumerable<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>)

在泛型序列的每個項目上叫用轉換函式,並傳回最小的結果值。

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>,並將產生的序列簡化成單一序列。

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

將序列的每個項目都投影成 IEnumerable<T>,並將產生的序列簡化成單一序列。 各來源項目的索引是在該項目的投影表單中使用。

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

將序列的每個項目投影為 IEnumerable<T>、將產生的序列簡化成單一序列,並對其中的每個項目叫用結果選取器函式。

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

將序列的每個項目投影為 IEnumerable<T>、將產生的序列簡化成單一序列,並對其中的每個項目叫用結果選取器函式。 各來源項目的索引是在該項目的中繼投影表單中使用。

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

使用項目之型別的預設相等比較子來比較項目,以判斷兩個序列是否相等。

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

使用指定的 IEqualityComparer<T> 來比較項目,以判斷兩個序列是否相等。

Single<TSource>(IEnumerable<TSource>)

傳回序列的唯一一個元素,如果序列中不是正好一個元素,則擲回例外狀況。

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

傳回序列中符合指定之條件的唯一一個元素,如果有一個以上這類元素,則擲回例外狀況。

SingleOrDefault<TSource>(IEnumerable<TSource>)

傳回序列的唯一一個項目,如果序列是空白,則為預設值,如果序列中有一個以上的項目,這個方法就會擲回例外狀況。

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

傳回序列中符合指定之條件的唯一一個元素,如果沒有這類元素,則為預設值,如果有一個以上的元素符合條件,這個方法就會擲回例外狀況。

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

略過序列中指定的項目數目,然後傳回其餘項目。

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

只要指定的條件為 true,便略過序列中的項目,然後傳回其餘項目。

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

只要指定的條件為 true,便略過序列中的項目,然後傳回其餘項目。 項目的索引是用於述詞功能的邏輯中。

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)

從序列開頭傳回指定的連續項目數目。

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

只要指定的條件為 true,就會傳回序列中的項目。

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

只要指定的條件為 true,就會傳回序列中的項目。 項目的索引是用於述詞功能的邏輯中。

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>)

使用比較金鑰的 comparerIEnumerable<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>

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

使用預設相等比較值來比較值,以便產生兩個序列的集合等位。

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

使用指定的 IEqualityComparer<T> 產生兩個序列的集合等位。

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

根據述詞來篩選值序列。

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

根據述詞來篩選值序列。 述詞函式的邏輯中使用各項目的索引。

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

將指定的函式套用至兩個序列的對應項目,產生結果的序列。

AsParallel(IEnumerable)

啟用查詢的平行化作業。

AsParallel<TSource>(IEnumerable<TSource>)

啟用查詢的平行化作業。

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryable

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>)

在來源集合中,從每一個節點的父節點移除這些節點。

適用於

另請參閱