다음을 통해 공유


OpenXmlPartContainer Class

Definition

Defines the base class for OpenXmlPackage and OpenXmlPart.

public abstract class OpenXmlPartContainer
type OpenXmlPartContainer = class
Public MustInherit Class OpenXmlPartContainer
Inheritance
OpenXmlPartContainer
Derived

Constructors

OpenXmlPartContainer()

Initializes OpenXmlPartContainer.

Properties

DataPartReferenceRelationships

Gets all DataPartReferenceRelationship relationships.

ExternalRelationships

Gets all external relationships. Hyperlink relationships are not included, use HyperlinkRelationship property to enumerate hyperlink relationships.

Features

Gets the features associated with this part.

HyperlinkRelationships

Gets all hyperlink relationships.

Parts

Gets all parts which are relationship targets of this part.

Methods

AddAnnotation(Object)

Adds an object to the annotation list of this PartContainer.

AddExtendedPart(String, String, String, String)

Adds an extended part ( Application specific part ).

AddExtendedPart(String, String, String)

Adds an extended part ( Application specific part ).

AddExternalRelationship(String, Uri, String)

Adds an external relationship. Do not add hyperlink relationships through this method. Use AddHyperlinkRelationship() instead.

AddExternalRelationship(String, Uri)

Adds an external relationship. Do not add hyperlink relationships through this method. Use AddHyperlinkRelationship() instead.

AddHyperlinkRelationship(Uri, Boolean, String)

Adds a new hyperlink relationship.

AddHyperlinkRelationship(Uri, Boolean)

Adds a new hyperlink relationship.

AddNewPart<T>()

Adds a new part of type T.

AddNewPart<T>(String, String)

Adds a new part of type T.

AddNewPart<T>(String)

Adds a new part of type T.

AddPart<T>(T, String)

Adds the part to the document with a given relationship identifier (ID). Must use the returned part to operate on the part added to the document

AddPart<T>(T)

Adds the part to the document. Must use the returned part to operate on the part added to the document.

Annotation(Type)

Get the first annotation object of the specified type from this PartContainer.

Annotation<T>()

Get the first annotation object of the specified type from this PartContainer.

Annotations(Type)

Gets a collection of annotations of the specified type for this PartContainer.

Annotations<T>()

Gets a collection of annotations of the specified type for this PartContainer.

ChangeIdOfPart(OpenXmlPart, String)

Changes the relationship ID of the part.

CreateRelationshipToPart(OpenXmlPart, String)

Adds a relationship for the specified part to this part.

CreateRelationshipToPart(OpenXmlPart)

Adds a relationship for the specified part to this part.

DeleteExternalRelationship(ExternalRelationship)

Deletes the specified external relationship.

DeleteExternalRelationship(String)

Deletes the specified ExternalRelationship.

DeletePart(OpenXmlPart)

Deletes a specified part in the package root layer.

DeletePart(String)

Deletes the specified child part from this part.

DeleteParts<T>(IEnumerable<T>)

Deletes all the parts which are in the passed in collection from the document.

DeleteReferenceRelationship(ReferenceRelationship)

Deletes the specified reference relationship.

DeleteReferenceRelationship(String)

Deletes the specified reference relationship.

GetExternalRelationship(String)

Gets the specified ExternalRelationship.

GetIdOfPart(OpenXmlPart)

Gets the relationship ID of the part.

GetPartById(String)

Gets the child part through the relationship ID.

GetPartsCountOfType<T>()
Obsolete.

Gets the count of all parts of type T.

GetPartsOfType<T>()

Enumerates all the children parts of the specified type T of this part.

GetPartsOfType<T>(ICollection<T>)
Obsolete.

Gets all the children parts of the specified type T into partCollection of this part.

GetReferenceRelationship(String)

Gets the specified ReferenceRelationship.

RemoveAnnotations(Type)

Removes the annotations of the specified type from this PartContainer.

RemoveAnnotations<T>()

Removes the annotations of the specified type from this PartContainer.

ThrowIfObjectDisposed()

Test whether the object is already disposed.

TryGetPartById(String, OpenXmlPart)

Try to get the child part by the relationship ID.

Extension Methods

AddPartRootEventsFeature(OpenXmlPartContainer)

Adds a feature to track eventing for package life cycle events.

CreateUnknownElement(OpenXmlPartContainer, String)

Creates a new OpenXmlUnknownElement class by using the outer XML.

Applies to