public void SetMetaData(IPageStyle style, IMetaData metaData) { foreach (var item in fList) { ISupportMetaData support = item.PageMaker as ISupportMetaData; if (support != null) { if (support.CanUseMetaData(style)) { support.SetMetaData(style, metaData); } } } }
public static bool CanUseMetaData(object data, IPageStyle style) { if (data == null) { return(false); } TkDebug.AssertArgumentNull(style, "style", null); ISupportMetaData supportMeta = data as ISupportMetaData; if (supportMeta != null) { return(supportMeta.CanUseMetaData(style)); } return(false); }
public static void SetMetaData(object data, IPageStyle style, IMetaData metaData) { if (metaData == null || data == null) { return; } TkDebug.AssertArgumentNull(style, "style", null); ISupportMetaData supportMeta = data as ISupportMetaData; if (supportMeta != null) { bool useIt = supportMeta.CanUseMetaData(style); if (useIt) { supportMeta.SetMetaData(style, metaData); } } }