Skip to content

Commit a233046

Browse files
carlossanlopRon Petrusha
authored andcommitted
Porting System.IO.Packaging source comments to Docs (#2303)
* Porting System.IO.Packaging source comments to Docs * Apply suggestions from code review Applying rpetrusha suggestions. Co-Authored-By: carlossanlop <[email protected]>
1 parent 5353305 commit a233046

File tree

4 files changed

+34
-23
lines changed

4 files changed

+34
-23
lines changed

xml/System.IO.Packaging/PackUriHelper.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,8 @@
475475
<altmember cref="M:System.IO.Packaging.PackUriHelper.ResolvePartUri(System.Uri,System.Uri)" />
476476
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkID=160055">Writing a Package Sample</related>
477477
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkID=71255">Open Packaging Conventions Specification</related>
478+
<exception cref="T:System.ArgumentNullException"><paramref name="partUri" /> is <see langword="null" />.</exception>
479+
<exception cref="T:System.ArgumentException"><paramref name="partUri" /> is not an absolute <see cref="T:System.Uri" />.</exception>
478480
</Docs>
479481
</Member>
480482
<Member MemberName="GetNormalizedPartUri">
@@ -523,6 +525,7 @@
523525
<altmember cref="M:System.IO.Packaging.PackUriHelper.GetPartUri(System.Uri)" />
524526
<altmember cref="M:System.IO.Packaging.PackUriHelper.GetPackageUri(System.Uri)" />
525527
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkID=71255">Open Packaging Conventions Specification</related>
528+
<exception cref="T:System.ArgumentException"><paramref name="partUri" /> does not have a valid <see cref="T:System.Uri" /> syntax.</exception>
526529
</Docs>
527530
</Member>
528531
<Member MemberName="GetPackageUri">
@@ -570,6 +573,8 @@
570573
<altmember cref="Overload:System.IO.Packaging.PackUriHelper.Create" />
571574
<altmember cref="M:System.IO.Packaging.PackUriHelper.GetPartUri(System.Uri)" />
572575
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkID=71255">Open Packaging Conventions Specification</related>
576+
<exception cref="T:System.ArgumentNullException"><paramref name="packUri" /> is <see langword="null" />.</exception>
577+
<exception cref="T:System.ArgumentException"><paramref name="packUri" /> is not an absolute <see cref="T:System.Uri" />.</exception>
573578
</Docs>
574579
</Member>
575580
<Member MemberName="GetPartUri">
@@ -733,6 +738,7 @@
733738
<paramref name="sourcePartUri" /> or <paramref name="targetPartUri" /> is <see langword="null" />.</exception>
734739
<altmember cref="M:System.IO.Packaging.PackUriHelper.ResolvePartUri(System.Uri,System.Uri)" />
735740
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkID=71255">Open Packaging Conventions Specification</related>
741+
<exception cref="T:System.ArgumentException">Either the <paramref name="sourcePartUri" /> or <paramref name="targetPartUri" /> does not have a valid <see cref="T:System.Uri" /> syntax.</exception>
736742
</Docs>
737743
</Member>
738744
<Member MemberName="GetSourcePartUriFromRelationshipPartUri">
@@ -939,4 +945,4 @@
939945
</Docs>
940946
</Member>
941947
</Members>
942-
</Type>
948+
</Type>

xml/System.IO.Packaging/PackageRelationshipSelector.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ The <paramref name="sourceUri" /> is not the <see cref="T:System.IO.Packaging.Pa
119119
<returns>A list of relationships that match the selection parameters specified to the <see cref="M:System.IO.Packaging.PackageRelationshipSelector.#ctor(System.Uri,System.IO.Packaging.PackageRelationshipSelectorType,System.String)" /> constructor.</returns>
120120
<remarks>To be added.</remarks>
121121
<related type="ExternalDocumentation" href="https://go.microsoft.com/fwlink/?LinkId=74494">Digital Signing Framework of the Open Packaging Conventions</related>
122+
<exception cref="T:System.ArgumentNullException"><paramref name="package" /> is <see langword="null" />.</exception>
122123
</Docs>
123124
</Member>
124125
<Member MemberName="SelectionCriteria">
@@ -234,4 +235,4 @@ The <paramref name="sourceUri" /> is not the <see cref="T:System.IO.Packaging.Pa
234235
</Docs>
235236
</Member>
236237
</Members>
237-
</Type>
238+
</Type>

xml/System.IO.Packaging/ZipPackage.xml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,15 @@
7878
<Parameter Name="compressionOption" Type="System.IO.Packaging.CompressionOption" />
7979
</Parameters>
8080
<Docs>
81-
<param name="partUri">To be added.</param>
82-
<param name="contentType">To be added.</param>
83-
<param name="compressionOption">To be added.</param>
84-
<summary>To be added.</summary>
81+
<param name="partUri">The Uri that represents the <see cref="T:System.IO.Packaging.PackagePart" />.</param>
82+
<param name="contentType">A string representing the content type of the <see cref="T:System.IO.Packaging.PackagePart" />.</param>
83+
<param name="compressionOption">The compression option to be used for this <see cref="T:System.IO.Packaging.PackagePart" />.</param>
84+
<summary>Custom implementation for the underlying file format. Adds a new item to the zip archive corresponding to the <see cref="T:System.IO.Packaging.PackagePart" /> in the <see cref="T:System.IO.Packaging.ZipPackage" />.</summary>
8585
<returns>To be added.</returns>
8686
<remarks>To be added.</remarks>
87+
<exception cref="T:System.ArgumentNullException"><paramref name="partUri" /> is <see langword="null" />.</exception>
88+
<exception cref="T:System.ArgumentException"><paramref name="partUri" /> does not have a valid <see cref="T:System.Uri" /> syntax.</exception>
89+
<exception cref="T:System.ArgumentOutOfRangeException"><paramref name="compressionOption" /> does not have a valid <see cref="T:System.IO.Packaging.CompressionOption" /> value.</exception>
8790
</Docs>
8891
</Member>
8992
<Member MemberName="DeletePartCore">
@@ -113,9 +116,11 @@
113116
<Parameter Name="partUri" Type="System.Uri" />
114117
</Parameters>
115118
<Docs>
116-
<param name="partUri">To be added.</param>
117-
<summary>To be added.</summary>
119+
<param name="partUri">The Uri that represents the <see cref="T:System.IO.Packaging.PackagePart" />.</param>
120+
<summary>This method is for a custom implementation specific to the file format. Deletes the <see cref="T:System.IO.Packaging.PackagePart" /> corresponding to the <see cref="T:System.Uri" /> specified. Attempting to delete a part that does not exist is not an error and so does not throw an exception.</summary>
118121
<remarks>To be added.</remarks>
122+
<exception cref="T:System.ArgumentNullException"><paramref name="partUri" /> is <see langword="null" />.</exception>
123+
<exception cref="T:System.ArgumentException"><paramref name="partUri" /> does not have a valid <see cref="T:System.Uri" /> syntax.</exception>
119124
</Docs>
120125
</Member>
121126
<Member MemberName="Dispose">
@@ -145,8 +150,8 @@
145150
<Parameter Name="disposing" Type="System.Boolean" />
146151
</Parameters>
147152
<Docs>
148-
<param name="disposing">To be added.</param>
149-
<summary>To be added.</summary>
153+
<param name="disposing"><see langword="true" /> if called during <see cref="M:System.IO.Packaging.ZipPackage.Dispose" />, <see langword="false" /> if called during <see cref="M:System.IO.Packaging.ZipPackage.Finalize" />.</param>
154+
<summary>Closes the underlying <see cref="T:System.IO.Packaging.ZipPackage" /> object for this container.</summary>
150155
<remarks>To be added.</remarks>
151156
</Docs>
152157
</Member>
@@ -175,7 +180,7 @@
175180
</ReturnValue>
176181
<Parameters />
177182
<Docs>
178-
<summary>To be added.</summary>
183+
<summary>This method is for a custom implementation corresponding to the underlying zip file format.</summary>
179184
<remarks>To be added.</remarks>
180185
</Docs>
181186
</Member>
@@ -206,8 +211,8 @@
206211
<Parameter Name="partUri" Type="System.Uri" />
207212
</Parameters>
208213
<Docs>
209-
<param name="partUri">To be added.</param>
210-
<summary>To be added.</summary>
214+
<param name="partUri">The Uri that represents the <see cref="T:System.IO.Packaging.PackagePart" />.</param>
215+
<summary>This method is for a custom implementation specific to the file format. Returns a <see cref="T:System.IO.Packaging.PackagePart" /> after reading the actual physical bits. The method returns <see langword="null" /> to indicate that the part corresponding to the specified <see cref="T:System.Uri" /> was not found in the container. This method does not throw an exception if a part does not exist.</summary>
211216
<returns>To be added.</returns>
212217
<remarks>To be added.</remarks>
213218
</Docs>
@@ -237,10 +242,10 @@
237242
</ReturnValue>
238243
<Parameters />
239244
<Docs>
240-
<summary>To be added.</summary>
241-
<returns>To be added.</returns>
245+
<summary>This method is for a custom implementation specific to the file format. This method retrieves the actual parts from the underlying <see cref="T:System.IO.Packaging.ZipPackage" />.</summary>
246+
<returns>An array of <see cref="T:System.IO.Packaging.ZipPackagePart" /> objects.</returns>
242247
<remarks>To be added.</remarks>
243248
</Docs>
244249
</Member>
245250
</Members>
246-
</Type>
251+
</Type>

xml/System.IO.Packaging/ZipPackagePart.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,14 +71,13 @@
7171
<Parameter Name="access" Type="System.IO.FileAccess" Index="1" FrameworkAlternate="netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
7272
</Parameters>
7373
<Docs>
74-
<param name="streamFileMode">To be added.</param>
75-
<param name="mode">To be added.</param>
76-
<param name="streamFileAccess">To be added.</param>
77-
<param name="access">To be added.</param>
78-
<summary>To be added.</summary>
79-
<returns>To be added.</returns>
74+
<param name="mode">The I/O mode in which to open the stream.</param>
75+
<param name="access">The access permissions with which the stream should be opened.</param>
76+
77+
<summary>Custom implementation for the GetStream method.</summary>
78+
<returns>A stream corresponding to this <see cref="T:System.IO.Packaging.ZipPackagePart" />.</returns>
8079
<remarks>To be added.</remarks>
8180
</Docs>
8281
</Member>
8382
</Members>
84-
</Type>
83+
</Type>

0 commit comments

Comments
 (0)