OpenXmlPartContainer.GetPartsOfType 方法

定义

重载

GetPartsOfType<T>()

枚举此部件的指定类型 T 的所有子部分。

GetPartsOfType<T>(ICollection<T>)
已过时.

获取此部件中指定类型TpartCollection的所有子部分。

GetPartsOfType<T>()

枚举此部件的指定类型 T 的所有子部分。

public System.Collections.Generic.IEnumerable<T> GetPartsOfType<T> () where T : DocumentFormat.OpenXml.Packaging.OpenXmlPart;
member this.GetPartsOfType : unit -> seq<'T (requires 'T :> DocumentFormat.OpenXml.Packaging.OpenXmlPart)> (requires 'T :> DocumentFormat.OpenXml.Packaging.OpenXmlPart)
Public Function GetPartsOfType(Of T As OpenXmlPart) () As IEnumerable(Of T)
Public Iterator Function GetPartsOfType(Of T As OpenXmlPart) () As IEnumerable(Of T)

类型参数

T

OpenXmlPart 的派生类。

返回

适用于

GetPartsOfType<T>(ICollection<T>)

注意

Use GetPartsOfType<T> to manually add to a collection

获取此部件中指定类型TpartCollection的所有子部分。

public void GetPartsOfType<T> (System.Collections.Generic.ICollection<T> partCollection) where T : DocumentFormat.OpenXml.Packaging.OpenXmlPart;
[System.Obsolete("Use GetPartsOfType<T> to manually add to a collection")]
public void GetPartsOfType<T> (System.Collections.Generic.ICollection<T> partCollection) where T : DocumentFormat.OpenXml.Packaging.OpenXmlPart;
member this.GetPartsOfType : System.Collections.Generic.ICollection<'T (requires 'T :> DocumentFormat.OpenXml.Packaging.OpenXmlPart)> -> unit (requires 'T :> DocumentFormat.OpenXml.Packaging.OpenXmlPart)
[<System.Obsolete("Use GetPartsOfType<T> to manually add to a collection")>]
member this.GetPartsOfType : System.Collections.Generic.ICollection<'T (requires 'T :> DocumentFormat.OpenXml.Packaging.OpenXmlPart)> -> unit (requires 'T :> DocumentFormat.OpenXml.Packaging.OpenXmlPart)
Public Sub GetPartsOfType(Of T As OpenXmlPart) (partCollection As ICollection(Of T))

类型参数

T

OpenXmlPart 的派生类。

参数

partCollection
ICollection<T>

要填充的部件集合。

属性

例外

当 为 null 时 partCollection 引发。

适用于