1+ // <auto-generated /> 
2+ #pragma warning disable
3+ 
4+ #if NETFRAMEWORK  ||  NETSTANDARD2_0 
5+ 
6+ using  System ; 
7+ using  System . Diagnostics . CodeAnalysis ; 
8+ using  System . Xml ; 
9+ using  System . IO ; 
10+ using  System . Threading ; 
11+ using  System . Threading . Tasks ; 
12+ using  System . Xml . Linq ; 
13+ using  Link  =  System . ComponentModel . DescriptionAttribute ; 
14+ 
15+ static partial  class  Polyfill 
16+ { 
17+     /// <summary> 
18+     /// Output this <see cref="XDocument"/> to an <see cref="XmlWriter"/>. 
19+     /// </summary> 
20+     /// <param name="writer"> 
21+     /// The <see cref="XmlWriter"/> to output the XML to. 
22+     /// </param> 
23+     /// <param name="cancellationToken"> 
24+     /// A cancellation token. 
25+     /// </param> 
26+     [ Link ( "https://learn.microsoft.com/en-us/dotnet/api/system.xml.linq.xdocument.saveasync#system-xml-linq-xdocument-saveasync(system-xml-xmlwriter-system-threading-cancellationtoken)" ) ] 
27+     public  static Task  SaveAsync ( 
28+         this  XDocument  target , 
29+         XmlWriter  writer , 
30+         CancellationToken  cancellationToken ) 
31+     { 
32+         cancellationToken . ThrowIfCancellationRequested ( ) ; 
33+         target . Save ( writer ) ; 
34+         return  Task . CompletedTask ; 
35+     } 
36+ 
37+     /// <summary> 
38+     /// Output this <see cref="XDocument"/> to a <see cref="Stream"/>. 
39+     /// </summary> 
40+     /// <param name="stream"> 
41+     /// The <see cref="Stream"/> to output the XML to. 
42+     /// </param> 
43+     /// <param name="options"> 
44+     /// If SaveOptions.DisableFormatting is enabled the output is not indented. 
45+     /// If SaveOptions.OmitDuplicateNamespaces is enabled duplicate namespace declarations will be removed. 
46+     /// </param> 
47+     /// <param name="cancellationToken">A cancellation token.</param> 
48+     [ Link ( "https://learn.microsoft.com/en-us/dotnet/api/system.xml.linq.xdocument.saveasync#system-xml-linq-xdocument-saveasync(system-io-stream-system-xml-linq-saveoptions-system-threading-cancellationtoken)" ) ] 
49+     public  static Task  SaveAsync ( 
50+         this  XDocument  target , 
51+         Stream  stream , 
52+         SaveOptions  options , 
53+         CancellationToken  cancellationToken ) 
54+     { 
55+         cancellationToken . ThrowIfCancellationRequested ( ) ; 
56+         target . Save ( stream ,  options ) ; 
57+         return  Task . CompletedTask ; 
58+     } 
59+ 
60+     /// <summary> 
61+     /// Output this <see cref="XDocument"/> to a <see cref="TextWriter"/>. 
62+     /// </summary> 
63+     /// <param name="textWriter"> 
64+     /// The <see cref="TextWriter"/> to output the XML to. 
65+     /// </param> 
66+     /// <param name="options"> 
67+     /// If SaveOptions.DisableFormatting is enabled the output is not indented. 
68+     /// If SaveOptions.OmitDuplicateNamespaces is enabled duplicate namespace declarations will be removed. 
69+     /// </param> 
70+     /// <param name="cancellationToken">A cancellation token.</param> 
71+     [ Link ( "https://learn.microsoft.com/en-us/dotnet/api/system.xml.linq.xdocument.saveasync#system-xml-linq-xdocument-saveasync(system-io-textwriter-system-xml-linq-saveoptions-system-threading-cancellationtoken)" ) ] 
72+     public  static Task  SaveAsync ( 
73+         this  XDocument  target , 
74+         TextWriter  textWriter , 
75+         SaveOptions  options , 
76+         CancellationToken  cancellationToken ) 
77+     { 
78+         cancellationToken . ThrowIfCancellationRequested ( ) ; 
79+         target . Save ( textWriter ,  options ) ; 
80+         return  Task . CompletedTask ; 
81+     } 
82+ } 
83+ #endif
0 commit comments