using System.IO;
namespace FastReport.Import
{
///
/// Base class for all import plugins.
///
public class ImportBase
{
#region Fields
private string name;
private Report report;
#endregion // Fields
#region Properties
///
/// Gets or sets the name of plugin.
///
public string Name
{
get { return name; }
protected set { name = value; }
}
///
/// Gets or sets reference to the report.
///
public Report Report
{
get { return report; }
protected set { report = value; }
}
#endregion // Properties
#region Constructors
///
/// Initializes a new instance of the class with default settings.
///
public ImportBase()
{
}
#endregion // Constructors
#region Public Methods
///
/// Loads the specified file into specified report.
///
/// Report object.
/// File name.
public virtual void LoadReport(Report report, string filename)
{
report.Clear();
}
///
/// Loads the specified file into specified report from stream.
///
/// Report object
/// File stream
public virtual void LoadReport(Report report, Stream content)
{
report.Clear();
}
#endregion // Public Methods
}
}