FreezableCollection<T> 類別

定義

代表 DependencyObjectFreezableAnimatable 物件的集合。Represents a collection of DependencyObject, Freezable, or Animatable objects. FreezableCollection<T> 本身是 Animatable 類型。FreezableCollection<T> is itself an Animatable type.

generic <typename T>
 where T : DependencyObjectpublic ref class FreezableCollection : System::Windows::Media::Animation::Animatable, System::Collections::Generic::ICollection<T>, System::Collections::Generic::IEnumerable<T>, System::Collections::Generic::IList<T>, System::Collections::IList, System::Collections::Specialized::INotifyCollectionChanged, System::ComponentModel::INotifyPropertyChanged
public class FreezableCollection<T> : System.Windows.Media.Animation.Animatable, System.Collections.Generic.ICollection<T>, System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IList<T>, System.Collections.IList, System.Collections.Specialized.INotifyCollectionChanged, System.ComponentModel.INotifyPropertyChanged where T : DependencyObject
type FreezableCollection<'T (requires 'T :> DependencyObject)> = class
    inherit Animatable
    interface IList
    interface ICollection
    interface IEnumerable
    interface IList<'T (requires 'T :> DependencyObject)>
    interface ICollection<'T (requires 'T :> DependencyObject)>
    interface seq<'T (requires 'T :> DependencyObject)>
    interface INotifyCollectionChanged
    interface INotifyPropertyChanged
Public Class FreezableCollection(Of T)
Inherits Animatable
Implements ICollection(Of T), IEnumerable(Of T), IList, IList(Of T), INotifyCollectionChanged, INotifyPropertyChanged

類型參數

T

集合的類型。The type of collection. 此類型必須是 DependencyObject 或衍生類別。This type must be a DependencyObject or a derived class.

繼承
衍生
實作

備註

此類別可讓您建立自訂集合類型, 以完整支援資料系結、變更通知、屬性失效, 以及其內容的動畫。This class is provided to enable the creation of custom collection types that fully support data binding, change notification, property invalidation, and animation of its contents.

FreezableCollection 的 XAML 使用方式XAML Usage for FreezableCollection

FreezableCollection<T>支援有限XAMLXAML的語法。FreezableCollection<T> supports a limited XAMLXAML syntax.

  • 做為根項目的物件專案, 理論上您可以指定不FreezableCollection<T>受限制的物件元素, 這也必須指定x:TypeArguments指示詞來宣告條件約束。As an object element at the root, you can theoretically specify an unconstrained FreezableCollection<T> object element, which must also specify the x:TypeArguments Directive to declare the constraint. 不過, 這不是常見的案例, 因為若要這麼做, FreezableCollection<T>必須是根項目。However, this is not a common scenario, because to do this, the FreezableCollection<T> must be the root element. 這項限制存在的XAMLXAML原因是, WPFWPF中的處理器實作為根項目時, 只能支援x:TypeArguments指示詞, 而且您必須在任何開放式條件約束泛型上使用 (如果您想要這樣做)。在中XAMLXAML具現化泛型型別。This limitation exists because the XAMLXAML processor implementation in WPFWPF can only support x:TypeArguments Directive when the element it is being set on is the root element, and you must use on any open constraint generic if you want to instantiate a generic type in XAMLXAML. 您不太可能想要FreezableCollection<T>做為根項目, 即使是鬆散XAMLXAML也一樣。It is unlikely that you want a FreezableCollection<T> as the root element, even as loose XAMLXAML.

  • 如果您衍生自FreezableCollection<T>並在衍生的集合中套用類型條件約束, 則衍生的集合可以支援各種不同的使用方式。If you derive from FreezableCollection<T> and apply a type constraint in the derived collection, the derived collection can support a variety of usages. 這是可行的, 因為您的衍生中的條件約束不需要傳遞。This is possible because the constraint in your derivation eliminates the need to pass .

    • 這類XAMLXAML衍生集合的一般用法是透過隱含的集合語法。The typical XAMLXAML usage for such a derived collection is through implicit collection syntax. 支援特定介面的集合不需要指定集合本身做為物件元素。Collections that support certain interfaces do not need to specify the collection itself as an object element. 如需中XAMLXAML集合語法的詳細資訊, 請參閱XAML 語法詳細資料For details on collection syntax in XAMLXAML, see XAML Syntax In Detail. 例如, 具有屬性(其中屬性屬於受條件約束FreezableCollection<T> DependencyObject之類型) 的物件可以支援下列語法:For instance, an object with a property where the property was of type FreezableCollection<T> constrained by DependencyObject could support the following syntax:

      <object>  
        <object.property>  
          oneOrMoreDependencyObjectElements  
        </object.property>  
      </object>  
      
    • 只要您不隱藏無參數的函式, 衍生的集合也可以支持對象專案語法 (其中 object 專案是明確的, 而不是如上所示的隱含用法)。As long as you do not hide the parameterless constructor, the derived collection can also support an object element syntax (where the object element is explicit, as opposed to the implicit usage shown above). 它不需要是根項目。It does not need to be the root element. 或者, 您也可以使用衍生的集合做為根項目, 而不需要指定, 雖然使用集合做為根項目並不常見。Or, you can also use the derived collection as a root element, without needing to specify , although using a collection as a root element is uncommon.

  • 在上述任一案例中, 集合的任何子專案都必須是實作為條件約束的型別, 或如所指定。Any child elements of the collection in either of the above scenarios must be of the type of either the implemented constraint, or as specified by .

建構函式

FreezableCollection<T>()

初始化 FreezableCollection<T> 的新執行個體,其為空白且具有預設的初始容量。Initializes a new instance of FreezableCollection<T> that is empty and has the default initial capacity.

FreezableCollection<T>(IEnumerable<T>)

初始化 FreezableCollection<T> 類別的新執行個體,這個執行個體包含指定集合的相同元素。Initializes a new instance of the FreezableCollection<T> class that contains the same elements as the specified collection.

FreezableCollection<T>(Int32)

初始化 FreezableCollection<T> 類別的新執行個體,這個執行個體是空白且可具有指定的初始容量。Initializes a new instance of the FreezableCollection<T> that is empty and has the specified initial capacity.

屬性

CanFreeze

取得值,指出是否可以將物件設為不可修改。Gets a value that indicates whether the object can be made unmodifiable.

(繼承來源 Freezable)
Count

取得這個 FreezableCollection<T> 所包含的項目數目。Gets the number of elements contained by this FreezableCollection<T>.

DependencyObjectType

取得包裝此執行個體之 CLRCLR 型別的 DependencyObjectTypeGets the DependencyObjectType that wraps the CLRCLR type of this instance.

(繼承來源 DependencyObject)
Dispatcher

取得與這個 Dispatcher 關聯的 DispatcherObjectGets the Dispatcher this DispatcherObject is associated with.

(繼承來源 DispatcherObject)
HasAnimatedProperties

取得值,這個值表示是否有一個或多個 AnimationClock 物件與這個物件的任何一個相依性屬性相關聯。Gets a value that indicates whether one or more AnimationClock objects is associated with any of this object's dependency properties.

(繼承來源 Animatable)
IsFrozen

取得值,該值表示物件目前是否可修改。Gets a value that indicates whether the object is currently modifiable.

(繼承來源 Freezable)
IsSealed

取得值,這個值表示此執行個體目前是否已密封 (唯讀)。Gets a value that indicates whether this instance is currently sealed (read-only).

(繼承來源 DependencyObject)
Item[Int32]

在指定的索引位置上取得或設定項目。Gets or sets the element at the specified index.

方法

Add(T)

將指定的物件加入至 FreezableCollection<T> 的尾端。Adds the specified object to the end of the FreezableCollection<T>.

ApplyAnimationClock(DependencyProperty, AnimationClock)

AnimationClock 套用至指定的 DependencyPropertyApplies an AnimationClock to the specified DependencyProperty. 如果屬性已有動畫效果,即使用 SnapshotAndReplace 遞移式行為。If the property is already animated, the SnapshotAndReplace handoff behavior is used.

(繼承來源 Animatable)
ApplyAnimationClock(DependencyProperty, AnimationClock, HandoffBehavior)

AnimationClock 套用至指定的 DependencyPropertyApplies an AnimationClock to the specified DependencyProperty. 如果已建立屬性的動畫,則會使用指定的 HandoffBehaviorIf the property is already animated, the specified HandoffBehavior is used.

(繼承來源 Animatable)
BeginAnimation(DependencyProperty, AnimationTimeline)

將動畫套用至指定的 DependencyPropertyApplies an animation to the specified DependencyProperty. 呈現下一個畫面格後,就會啟動動畫。The animation is started when the next frame is rendered. 如果指定的屬性已有動畫效果,即使用 SnapshotAndReplace 遞移式行為。If the specified property is already animated, the SnapshotAndReplace handoff behavior is used.

(繼承來源 Animatable)
BeginAnimation(DependencyProperty, AnimationTimeline, HandoffBehavior)

將動畫套用至指定的 DependencyPropertyApplies an animation to the specified DependencyProperty. 呈現下一個畫面格後,就會啟動動畫。The animation is started when the next frame is rendered. 如果已建立指定之屬性的動畫,則會使用指定的 HandoffBehaviorIf the specified property is already animated, the specified HandoffBehavior is used.

(繼承來源 Animatable)
CheckAccess()

判斷呼叫的執行是否可以存取這個 DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(繼承來源 DispatcherObject)
Clear()

從集合中移除所有項目。Removes all elements from the collection.

ClearValue(DependencyProperty)

清除屬性的區域數值。Clears the local value of a property. 要清除的屬性是由 DependencyProperty 識別項所指定。The property to be cleared is specified by a DependencyProperty identifier.

(繼承來源 DependencyObject)
ClearValue(DependencyPropertyKey)

清除唯讀屬性的區域數值。Clears the local value of a read-only property. 要清除的屬性是由 DependencyPropertyKey 所指定。The property to be cleared is specified by a DependencyPropertyKey.

(繼承來源 DependencyObject)
Clone()

建立這個 FreezableCollection<T> 和其內容的可修改複本,來製作深層複本。Creates a modifiable clone of this FreezableCollection<T> and its contents, making deep copies. 如果這個集合 (或其內容) 具有動畫相依性屬性,則會複製屬性的基底值,但不會複製目前的動畫值。If this collection (or its contents) has animated dependency properties, the property's base value is copied, not its current animated value.

CloneCore(Freezable)

使用基底 (非動畫) 屬性值,將這個執行個體變成所指定 FreezableCollection<T> 的複製品 (深層複本)。Makes this instance a clone (deep copy) of the specified FreezableCollection<T> using base (non-animated) property values.

CloneCurrentValue()

建立這個 FreezableCollection<T> 和其內容的可修改複本,以製作這個物件目前值的深層複本。Creates a modifiable copy of this FreezableCollection<T> and its contents, making deep copies of this object's current values. 如果這個物件 (或其包含的物件) 含有動畫相依性屬性,則會複製這些屬性的目前動畫值。If this object (or the objects it contains) contains animated dependency properties, their current animated values are copied.

CloneCurrentValueCore(Freezable)

使用目前的屬性值,將這個執行個體設為所指定 FreezableCollection<T> 的可修改複製品 (深層複本)。Makes this instance a modifiable clone (deep copy) of the specified FreezableCollection<T> using current property values.

CoerceValue(DependencyProperty)

強制轉型所指定相依性屬性的值。Coerces the value of the specified dependency property. 完成方式是叫用存在於呼叫 DependencyObject 之相依性屬性的屬性中繼資料中所指定的任何 CoerceValueCallback 函式。This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.

(繼承來源 DependencyObject)
Contains(T)

判斷這個 FreezableCollection<T> 是否包含指定的值。Determines whether this FreezableCollection<T> contains the specified value.

CopyTo(T[], Int32)

從目標陣列的指定索引處開始,將整個 FreezableCollection<T> 複製到相容的一維陣列中。Copies the entire FreezableCollection<T> to a compatible one-dimensional array, starting at the specified index of the target array.

CreateInstance()

初始化 Freezable 類別的新執行個體。Initializes a new instance of the Freezable class.

(繼承來源 Freezable)
CreateInstanceCore()

建立 FreezableCollection<T> 的新執行個體。Creates a new instance of the FreezableCollection<T>.

Equals(Object)

判斷提供的 DependencyObject 和目前的 DependencyObject 是否相等。Determines whether a provided DependencyObject is equivalent to the current DependencyObject.

(繼承來源 DependencyObject)
Freeze()

將目前的物件設為不可修改,並將其 IsFrozen 屬性設定為 trueMakes the current object unmodifiable and sets its IsFrozen property to true.

(繼承來源 Freezable)
FreezeCore(Boolean)

將這個 FreezableCollection<T> 物件設定為不可修改,或決定是否可以將它設定為不可修改。Makes this FreezableCollection<T> object unmodifiable or determines whether it can be made unmodifiable.

GetAnimationBaseValue(DependencyProperty)

傳回指定之 DependencyProperty 的非動畫實值。Returns the non-animated value of the specified DependencyProperty.

(繼承來源 Animatable)
GetAsFrozen()

使用基底 (非動畫) 屬性值,建立 Freezable 的凍結複本。Creates a frozen copy of the Freezable, using base (non-animated) property values. 因為複本已凍結,所以會以傳址方式複製任何凍結子物件。Because the copy is frozen, any frozen sub-objects are copied by reference.

(繼承來源 Freezable)
GetAsFrozenCore(Freezable)

使用基底 (非動畫) 屬性值,將這個執行個體設為所指定 FreezableCollection<T> 的凍結複製品。Makes this instance a frozen clone of the specified FreezableCollection<T> using base (non-animated) property values.

GetCurrentValueAsFrozen()

使用目前屬性值,建立 Freezable 的凍結複本。Creates a frozen copy of the Freezable using current property values. 因為複本已凍結,所以會以傳址方式複製任何凍結子物件。Because the copy is frozen, any frozen sub-objects are copied by reference.

(繼承來源 Freezable)
GetCurrentValueAsFrozenCore(Freezable)

使這個執行個體成為所指定 Freezable 的凍結複本。Makes this instance a frozen clone of the specified Freezable. 如果這個物件具有動畫相依性屬性,則會複製這些屬性的目前動畫值。If this object has animated dependency properties, their current animated values are copied.

GetEnumerator()

傳回整個 FreezableCollection<T> 的列舉值。Returns an enumerator for the entire FreezableCollection<T>.

GetHashCode()

取得這個 DependencyObject 的雜湊碼。Gets a hash code for this DependencyObject.

(繼承來源 DependencyObject)
GetLocalValueEnumerator()

建立特定的列舉值,以判斷哪些相依性屬性在此 DependencyObject 上具有本機設定的值。Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject.

(繼承來源 DependencyObject)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
GetValue(DependencyProperty)

傳回 DependencyObject 的這個執行個體上之相依性屬性的目前有效值。Returns the current effective value of a dependency property on this instance of a DependencyObject.

(繼承來源 DependencyObject)
IndexOf(T)

搜尋指定的物件,並傳回整個 FreezableCollection<T> 中第一個出現之以零為起始的索引。Searches for the specified object and returns the zero-based index of the first occurrence within the entire FreezableCollection<T>.

Insert(Int32, T)

將指定物件插入位於指定索引的 FreezableCollection<T>Inserts the specified object into the FreezableCollection<T> at the specified index.

InvalidateProperty(DependencyProperty)

重新評估指定相依性屬性的有效值。Re-evaluates the effective value for the specified dependency property.

(繼承來源 DependencyObject)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
OnChanged()

目前的 Freezable 物件遭到修改時進行呼叫。Called when the current Freezable object is modified.

(繼承來源 Freezable)
OnFreezablePropertyChanged(DependencyObject, DependencyObject)

確定已為剛剛設定的 DependencyObjectType 資料成員,建立適當的內容指標。Ensures that appropriate context pointers are established for a DependencyObjectType data member that has just been set.

(繼承來源 Freezable)
OnFreezablePropertyChanged(DependencyObject, DependencyObject, DependencyProperty)

這個成員支援 Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) 基礎結構,但是您不可以從程式碼直接使用它。This member supports the Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

(繼承來源 Freezable)
OnPropertyChanged(DependencyPropertyChangedEventArgs)

覆寫 OnPropertyChanged(DependencyPropertyChangedEventArgs)DependencyObject 實作也可以叫用任何 Changed 處理常式,以回應類型 Freezable 的變更相依性屬性。Overrides the DependencyObject implementation of OnPropertyChanged(DependencyPropertyChangedEventArgs) to also invoke any Changed handlers in response to a changing dependency property of type Freezable.

(繼承來源 Freezable)
ReadLocalValue(DependencyProperty)

傳回相依性屬性的區域值 (如果存在)。Returns the local value of a dependency property, if it exists.

(繼承來源 DependencyObject)
ReadPreamble()

確定 Freezable 是從有效的執行緒進行存取。Ensures that the Freezable is being accessed from a valid thread. 如果 API 會讀取非相依性屬性的資料成員,則 Freezable 的繼承者必須在該 API 的開頭呼叫這個方法。Inheritors of Freezable must call this method at the beginning of any API that reads data members that are not dependency properties.

(繼承來源 Freezable)
Remove(T)

FreezableCollection<T> 中移除指定之物件的第一個符合項目。Removes the first occurrence of the specified object from the FreezableCollection<T>.

RemoveAt(Int32)

FreezableCollection<T> 指定之以零起始的索引處移除物件。Removes the object at the specified zero-based index of the FreezableCollection<T>.

SetCurrentValue(DependencyProperty, Object)

設定相依性屬性的值,而不需要變更其值來源。Sets the value of a dependency property without changing its value source.

(繼承來源 DependencyObject)
SetValue(DependencyProperty, Object)

設定相依性屬性的區域值 (由相依性屬性的識別碼所指定)。Sets the local value of a dependency property, specified by its dependency property identifier.

(繼承來源 DependencyObject)
SetValue(DependencyPropertyKey, Object)

設定唯讀相依性屬性的區域數值 (由相依性屬性的 DependencyPropertyKey 識別項所指定)。Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.

(繼承來源 DependencyObject)
ShouldSerializeProperty(DependencyProperty)

傳回值,這個值表示序列化程序是否應該序列化所提供相依性屬性的值。Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.

(繼承來源 DependencyObject)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
VerifyAccess()

請強制執行可以存取這個 DispatcherObject 的呼叫執行緒。Enforces that the calling thread has access to this DispatcherObject.

(繼承來源 DispatcherObject)
WritePostscript()

引發 FreezableChanged 事件,並叫用其 OnChanged() 方法。Raises the Changed event for the Freezable and invokes its OnChanged() method. 在任何 API 修改未以相依性屬性儲存的類別成員之後,衍生自 Freezable 的類別應該在 API 的結尾呼叫這個方法。Classes that derive from Freezable should call this method at the end of any API that modifies class members that are not stored as dependency properties.

(繼承來源 Freezable)
WritePreamble()

確認 Freezable 未凍結,而且是從有效的執行緒內容進行存取。Verifies that the Freezable is not frozen and that it is being accessed from a valid threading context. 在任何 API 將資料寫入至非相依性屬性的資料成員之前,Freezable 繼承者應該在 API 的開頭呼叫這個方法。Freezable inheritors should call this method at the beginning of any API that writes to data members that are not dependency properties.

(繼承來源 Freezable)

事件

Changed

發生於 Freezable 或所含的物件遭到修改時。Occurs when the Freezable or an object it contains is modified.

(繼承來源 Freezable)

明確介面實作

ICollection.CopyTo(Array, Int32)

如需這個成員的說明,請參閱 CopyTo(Array, Int32)For a description of this member, see CopyTo(Array, Int32).

ICollection.IsSynchronized

如需這個成員的說明,請參閱 IsSynchronizedFor a description of this member, see IsSynchronized.

ICollection.SyncRoot

如需這個成員的說明,請參閱 SyncRootFor a description of this member, see SyncRoot.

ICollection<T>.IsReadOnly

如需這個成員的說明,請參閱 IsReadOnlyFor a description of this member, see IsReadOnly.

IEnumerable.GetEnumerator()

如需這個成員的說明,請參閱 GetEnumerator()For a description of this member, see GetEnumerator().

IEnumerable<T>.GetEnumerator()

如需這個成員的說明,請參閱 GetEnumerator()For a description of this member, see GetEnumerator().

IList.Add(Object)

如需這個成員的說明,請參閱 Add(Object)For a description of this member, see Add(Object).

IList.Contains(Object)

如需這個成員的說明,請參閱 Contains(Object)For a description of this member, see Contains(Object).

IList.IndexOf(Object)

如需這個成員的說明,請參閱 IndexOf(Object)For a description of this member, see IndexOf(Object).

IList.Insert(Int32, Object)

如需這個成員的說明,請參閱 Insert(Int32, Object)For a description of this member, see Insert(Int32, Object).

IList.IsFixedSize

如需這個成員的說明,請參閱 IsFixedSizeFor a description of this member, see IsFixedSize.

IList.IsReadOnly

如需這個成員的說明,請參閱 IsReadOnlyFor a description of this member, see IsReadOnly.

IList.Item[Int32]

如需這個成員的說明,請參閱 Item[Int32]For a description of this member, see Item[Int32].

IList.Remove(Object)

如需這個成員的說明,請參閱 Remove(Object)For a description of this member, see Remove(Object).

INotifyCollectionChanged.CollectionChanged

如需這個成員的說明,請參閱 CollectionChangedFor a description of this members, see CollectionChanged.

INotifyPropertyChanged.PropertyChanged

如需這個成員的說明,請參閱 PropertyChangedFor a description of this members, see PropertyChanged.

擴充方法

CopyToDataTable<T>(IEnumerable<T>)

根據輸入 DataTable 物件 (其中泛型參數 TDataRow) 傳回包含 IEnumerable<T> 物件複本的 DataRowReturns a DataTable that contains copies of the DataRow objects, given an input IEnumerable<T> object where the generic parameter T is DataRow.

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

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 IEnumerable<T> 物件複製到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

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

根據輸入 DataRow 物件 (其中泛型參數 TDataTable),將 IEnumerable<T> 物件複製到指定的 DataRowCopies DataRow objects to the specified DataTable, given an input IEnumerable<T> object where the generic parameter T is DataRow.

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

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.

適用於