Class TableauFileXmlStream
Default ITableauFileXmlStream implementation.
Namespace: Tableau.Migration.Content.Files
Assembly: Tableau.Migration.dll
Syntax
public class TableauFileXmlStream : ITableauFileXmlStream, IAsyncDisposable
Constructors
TableauFileXmlStream(Stream, CancellationToken, bool)
Creates a new TableauFileXmlStream object.
Declaration
public TableauFileXmlStream(Stream xmlContent, CancellationToken disposalCancel, bool leaveOpen = false)
Parameters
Type | Name | Description |
---|---|---|
Stream | xmlContent | The XML stream. |
CancellationToken | disposalCancel | A cancellation tokey to obey, and to use when the editor is disposed. |
bool | leaveOpen | Whether or not to close the stream on disposal. |
Properties
XmlContent
Gets a read/write stream to the XML content.
Declaration
public Stream XmlContent { get; }
Property Value
Type | Description |
---|---|
Stream |
Methods
DisposeAsync()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.
Declaration
public virtual ValueTask DisposeAsync()
Returns
Type | Description |
---|---|
ValueTask | A task that represents the asynchronous dispose operation. |
GetXmlAsync(CancellationToken)
Gets the currently loaded XML of the file, parsing the file if necessary. Changes to the XML will be automatically saved before publishing.
Declaration
public Task<XDocument> GetXmlAsync(CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<XDocument> | The XML document. |