@@ -137,8 +137,6 @@ protected OpenXmlWriter()
137137 /// </summary>
138138 public virtual Task WriteStartDocumentAsync ( )
139139 {
140- ThrowIfObjectDisposed ( ) ;
141-
142140 WriteStartDocument ( ) ;
143141
144142 return Task . CompletedTask ;
@@ -150,8 +148,6 @@ public virtual Task WriteStartDocumentAsync()
150148 /// <param name="standalone">If true, it writes "standalone=yes"; if false, it writes "standalone=no". </param>
151149 public virtual Task WriteStartDocumentAsync ( bool standalone )
152150 {
153- ThrowIfObjectDisposed ( ) ;
154-
155151 WriteStartDocument ( standalone ) ;
156152
157153 return Task . CompletedTask ;
@@ -163,8 +159,6 @@ public virtual Task WriteStartDocumentAsync(bool standalone)
163159 /// <param name="elementObject">The OpenXmlElement object to be written.</param>
164160 public virtual Task WriteStartElementAsync ( OpenXmlElement elementObject )
165161 {
166- ThrowIfObjectDisposed ( ) ;
167-
168162 WriteStartElement ( elementObject ) ;
169163
170164 return Task . CompletedTask ;
@@ -177,8 +171,6 @@ public virtual Task WriteStartElementAsync(OpenXmlElement elementObject)
177171 /// <param name="attributes">The attributes to be written.</param>
178172 public virtual Task WriteStartElementAsync ( OpenXmlElement elementObject , IEnumerable < OpenXmlAttribute > attributes )
179173 {
180- ThrowIfObjectDisposed ( ) ;
181-
182174 WriteStartElement ( elementObject , attributes ) ;
183175
184176 return Task . CompletedTask ;
@@ -192,8 +184,6 @@ public virtual Task WriteStartElementAsync(OpenXmlElement elementObject, IEnumer
192184 /// <param name="namespaceDeclarations">The namespace declarations to be written, can be null if no namespace declarations.</param>
193185 public virtual Task WriteStartElementAsync ( OpenXmlElement elementObject , IEnumerable < OpenXmlAttribute > attributes , IEnumerable < KeyValuePair < string , string > > namespaceDeclarations )
194186 {
195- ThrowIfObjectDisposed ( ) ;
196-
197187 WriteStartElement ( elementObject , attributes , namespaceDeclarations ) ;
198188
199189 return Task . CompletedTask ;
@@ -204,8 +194,6 @@ public virtual Task WriteStartElementAsync(OpenXmlElement elementObject, IEnumer
204194 /// </summary>
205195 public virtual Task WriteEndElementAsync ( )
206196 {
207- ThrowIfObjectDisposed ( ) ;
208-
209197 WriteEndElement ( ) ;
210198
211199 return Task . CompletedTask ;
@@ -217,8 +205,6 @@ public virtual Task WriteEndElementAsync()
217205 /// <param name="elementObject">The OpenXmlElement object to be written.</param>
218206 public virtual Task WriteElementAsync ( OpenXmlElement elementObject )
219207 {
220- ThrowIfObjectDisposed ( ) ;
221-
222208 WriteElement ( elementObject ) ;
223209
224210 return Task . CompletedTask ;
@@ -230,8 +216,6 @@ public virtual Task WriteElementAsync(OpenXmlElement elementObject)
230216 /// <param name="text">The text to write. </param>
231217 public virtual Task WriteStringAsync ( string text )
232218 {
233- ThrowIfObjectDisposed ( ) ;
234-
235219 WriteString ( text ) ;
236220
237221 return Task . CompletedTask ;
0 commit comments