using System.Xml;
using System;
namespace Wayne.Lib.Log
{
///
/// Output
///
public abstract class LogConfigOutput : ICloneable
{
internal abstract void WriteXml(XmlWriter xmlWriter);
internal static LogConfigOutput Create(XmlNode outputNode, string ns)
{
XmlNode parameterNode = outputNode["Parameters"];
if (parameterNode != null)
{
string type = outputNode.Attributes["Type"].Value;
switch (type)
{
case LogConfigTextFileOutput.XmlType: return new LogConfigTextFileOutput(parameterNode, ns);
case LogConfigEventLogSubscriptionOutput.XmlType: return new LogConfigEventLogSubscriptionOutput(parameterNode, ns);
case LogConfigExternalLogWriterOutput.XmlType: return new LogConfigExternalLogWriterOutput(parameterNode, ns);
}
}
return null;
}
///
/// Clones the object
///
///
public abstract object Clone();
}
}