Use context in prep xml

This commit is contained in:
Dolan
2021-03-11 01:06:55 +00:00
parent cf6c4998d0
commit 566ac03f9a
16 changed files with 216 additions and 87 deletions

View File

@ -1,6 +1,12 @@
import { IViewWrapper } from "../document-wrapper";
import { File } from "../file";
import { IXmlableObject } from "./xmlable-object";
export interface IContext {
readonly file: File;
readonly viewWrapper: IViewWrapper;
}
export abstract class BaseXmlComponent {
protected readonly rootKey: string;
// tslint:disable-next-line:readonly-keyword
@ -10,7 +16,7 @@ export abstract class BaseXmlComponent {
this.rootKey = rootKey;
}
public abstract prepForXml(file?: IViewWrapper): IXmlableObject | undefined;
public abstract prepForXml(context: IContext): IXmlableObject | undefined;
public get IsDeleted(): boolean {
return this.deleted;