using Inet.Viewer.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Inet.Viewer.Data
{
///
/// Page receiver for loading the meta data of a page only. The receiver saves the
/// parsed ReportInfo and PageInfo instances. Loading will be stopped before reaching
/// any rendering data of the page.
///
internal class PageMetaReceiver: IPageReceiver
{
///
/// Gets the report info or null if an error occured during loading.
///
internal ReportInfo ReportInfo
{
get;
private set;
}
///
/// Gets the page info or null if an error occured during loadin.
///
internal PageInfo PageInfo
{
get;
private set;
}
///
/// Gets the error as exception or null if the loading succeeded.
///
internal Exception Error
{
get;
private set;
}
///
public bool WriteReportInfo(ReportInfo info, Data.PageLoader loader)
{
ReportInfo = info;
return true;
}
///
public bool WritePageInfo(PageInfo info, Data.PageLoader loader)
{
PageInfo = info;
return false;
}
///
public System.Drawing.Font GetEmbeddedFont(int fontID, int fontRevision)
{
throw new NotImplementedException();
}
///
public void PageLoadFailure(Exception exception)
{
Error = exception;
}
}
}