public static DomDocument Create(IServiceModel serviceModel, params Node <DomNodeType>[] domNodes) { Contract.Requires(serviceModel != null); var domDocument = NodesContainer <DomNodeType> .CreateRoot(() => new DomDocument(serviceModel), domNodes); return(domDocument); }
public static DomDocument Parse(Document apiDocument, IServiceModel serviceModel) { Contract.Requires(serviceModel != null); var domDocument = NodesContainer <DomNodeType> .CreateRoot(() => new DomDocument(serviceModel)); ParseDocumentType(domDocument, apiDocument); ParseDocumentJsonApi(domDocument, apiDocument); ParseDocumentMeta(domDocument, apiDocument); ParseDocumentLinks(domDocument, apiDocument); ParseDocumentData(domDocument, apiDocument); ParseDocumentIncluded(domDocument, apiDocument); ParseDocumentErrors(domDocument, apiDocument); return(domDocument); }
public static DocumentNode Create(params Node <TestNodeType>[] nodes) { var documentNode = NodesContainer.CreateRoot(() => new DocumentNode(), nodes); return(documentNode); }