C# Class System.IO.Packaging.PackagePart

This class represents the a PackagePart within a container. This is a part of the Packaging Layer APIs
显示文件 Open project: WordDocX/DocX Class Usage Examples

Private Properties

Property Type Description
CheckIsRelationship void
CreateRelationship PackageRelationship
LoadRelationships void
NextId string
WriteRelationships void

Public Methods

Method Description
CreateRelationship ( Uri targetUri, TargetMode targetMode, string relationshipType ) : PackageRelationship
CreateRelationship ( Uri targetUri, TargetMode targetMode, string relationshipType, string id ) : PackageRelationship
DeleteRelationship ( string id ) : void
GetRelationship ( string id ) : PackageRelationship
GetRelationships ( ) : PackageRelationshipCollection
GetRelationshipsByType ( string relationshipType ) : PackageRelationshipCollection
GetStream ( ) : Stream
GetStream ( FileMode mode ) : Stream
GetStream ( FileMode mode, FileAccess access ) : Stream
RelationshipExists ( string id ) : bool

Protected Methods

Method Description
GetContentTypeCore ( ) : string
GetStreamCore ( FileMode mode, FileAccess access ) : Stream
PackagePart ( Package package, Uri partUri ) : System
PackagePart ( Package package, Uri partUri, string contentType ) : System
PackagePart ( Package package, Uri partUri, string contentType, CompressionOption compressionOption ) : System

Private Methods

Method Description
CheckIsRelationship ( ) : void
CreateRelationship ( Uri targetUri, TargetMode targetMode, string relationshipType, string id, bool loading ) : PackageRelationship
LoadRelationships ( PackageRelationship>.Dictionary relationships, Stream stream ) : void
NextId ( ) : string
WriteRelationships ( ) : void

Method Details

CreateRelationship() public method

public CreateRelationship ( Uri targetUri, TargetMode targetMode, string relationshipType ) : PackageRelationship
targetUri Uri
targetMode TargetMode
relationshipType string
return PackageRelationship

CreateRelationship() public method

public CreateRelationship ( Uri targetUri, TargetMode targetMode, string relationshipType, string id ) : PackageRelationship
targetUri Uri
targetMode TargetMode
relationshipType string
id string
return PackageRelationship

DeleteRelationship() public method

public DeleteRelationship ( string id ) : void
id string
return void

GetContentTypeCore() protected method

protected GetContentTypeCore ( ) : string
return string

GetRelationship() public method

public GetRelationship ( string id ) : PackageRelationship
id string
return PackageRelationship

GetRelationships() public method

public GetRelationships ( ) : PackageRelationshipCollection
return PackageRelationshipCollection

GetRelationshipsByType() public method

public GetRelationshipsByType ( string relationshipType ) : PackageRelationshipCollection
relationshipType string
return PackageRelationshipCollection

GetStream() public method

public GetStream ( ) : Stream
return Stream

GetStream() public method

public GetStream ( FileMode mode ) : Stream
mode FileMode
return Stream

GetStream() public method

public GetStream ( FileMode mode, FileAccess access ) : Stream
mode FileMode
access FileAccess
return Stream

GetStreamCore() protected abstract method

protected abstract GetStreamCore ( FileMode mode, FileAccess access ) : Stream
mode FileMode
access FileAccess
return Stream

PackagePart() protected method

protected PackagePart ( Package package, Uri partUri ) : System
package Package
partUri Uri
return System

PackagePart() protected method

protected PackagePart ( Package package, Uri partUri, string contentType ) : System
package Package
partUri Uri
contentType string
return System

PackagePart() protected method

protected PackagePart ( Package package, Uri partUri, string contentType, CompressionOption compressionOption ) : System
package Package
partUri Uri
contentType string
compressionOption CompressionOption
return System

RelationshipExists() public method

public RelationshipExists ( string id ) : bool
id string
return bool