Interface IXmlContentTransformer<TPublish>
Interface for a content transformer that manipulates the Tableau XML file of a content item.
Inherited Members
Namespace: Tableau.Migration.Engine.Hooks.Transformers
Assembly: Tableau.Migration.dll
Syntax
public interface IXmlContentTransformer<TPublish> : IContentTransformer<TPublish>, IMigrationHook<TPublish> where TPublish : IFileContent
Type Parameters
| Name | Description |
|---|---|
| TPublish | The publishable content type. |
Methods
NeedsXmlTransforming(TPublish)
Finds whether the content item needs any XML changes, returning false prevents file IO from occurring.
Declaration
bool NeedsXmlTransforming(TPublish ctx)
Parameters
| Type | Name | Description |
|---|---|---|
| TPublish | ctx | The content item to inspect. |
Returns
| Type | Description |
|---|---|
| bool | Whether or not the content item needs XML changes. |
TransformAsync(TPublish, XDocument, CancellationToken)
Transforms the XML of the content item.
Declaration
Task TransformAsync(TPublish ctx, XDocument xml, CancellationToken cancel)
Parameters
| Type | Name | Description |
|---|---|---|
| TPublish | ctx | The content item being transformed. |
| XDocument | xml | The XML of the content item to transform. Any changes made to the XML are persisted back to the file before publishing. |
| CancellationToken | cancel | The cancellation token to obey. |
Returns
| Type | Description |
|---|---|
| Task | A task to await. |