System.IO.Packaging already had full support for parsing [Content_Types].xml
if it contained both <Override> and <Default> nodes when specifying content
types for files. However we had taken a shortcut before by explicitly writing
the content type of each file using an <Override> attribute for every file. We
now properly write a <Default> element and only use <Override> attributes when
required.
Ensure we can call dispose multiple times without blowing up. Also
ensure that we do not close streams which are passed in by the user.
We should only close streams which are implicitly created by the API.
This is a modification of the patch proposed for bug #1464, which is
now fixed by this commit.
* WindowsBase/System.IO.Packaging/ZipPackage.cs:
* WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs: Remove
horrible hacks to load PackageProperties, PackageRelationships and
PackageParts from a read-only stream. Other benefit is that these are
now lazily loaded.
svn path=/trunk/mcs/; revision=118129