static private WriteRelationships ( PackageRelationship>.Dictionary |
||
relationships | PackageRelationship>.Dictionary | |
stream | Stream | |
return | void |
void WriteRelationships() { bool exists = Package.PartExists(RelationshipsPartUri); if (exists && Relationships.Count == 0) { Package.DeletePart(RelationshipsPartUri); return; } if (!exists) { PackagePart part = Package.CreatePart(RelationshipsPartUri, Package.RelationshipContentType); part.IsRelationship = true; } using (Stream s = Package.GetPart(RelationshipsPartUri).GetStream()) Package.WriteRelationships(Relationships, s); }