// PUBLIC METHODS /////////////////////////////////////////////////// #region Extensions Methods public static void MapApiMetaToClrResource(this IResourceType resourceType, object clrResource, IGetMeta apiGetMeta) { Contract.Requires(resourceType != null); Contract.Requires(clrResource != null); Contract.Requires(apiGetMeta != null); var apiMeta = apiGetMeta.Meta; resourceType.SetClrMeta(clrResource, apiMeta); }
public static void MapDomResourceToClrMeta(this IResourceType resourceType, object clrResource, DomReadWriteResource domResource) { Contract.Requires(resourceType != null); Contract.Requires(clrResource != null); Contract.Requires(domResource != null); var domMetaNode = domResource.GetNode(DomNodeType.Meta); if (domMetaNode == null) { return; } var domMeta = (IDomMeta)domMetaNode; var clrMeta = domMeta.Meta; resourceType.SetClrMeta(clrResource, clrMeta); }