#region --------------- Copyright Dresser Wayne Pignone ------------- /* * $Log: /Wrk/WayneLibraries/Wrk/Log/DeserializedLogEntry.cs $ * * 2 08-02-13 9:25 Mattias.larsson * FxCop fixes. */ #endregion using System.Xml; using System.Diagnostics.CodeAnalysis; namespace Wayne.Lib.Log { /// /// An EventLog entry that has been deserialized from a serialized form. The /// additional data that is supplied with the data is now only accessible as /// an Xml element in the LogDataElement property. /// public sealed class DeserializedLogEntry : EventLogEntry { #region Fields XmlElement logDataElement; #endregion #region Construction /// /// Internal constructor. This class is only created with the EventLogEntry.Deserialize method. /// /// internal DeserializedLogEntry(XmlElement logEntryNode) : base(logEntryNode) { logDataElement = logEntryNode["LogData"]; } #endregion #region Properties /// /// Xml element that contains the additional data that was supplied with the event originally. /// [SuppressMessage("Microsoft.Design", "CA1059:MembersShouldNotExposeCertainConcreteTypes", MessageId = "System.Xml.XmlNode")] public XmlElement LogDataElement { get { return logDataElement; } } #endregion #region Methods /// /// Re-serializies the LogData element. /// /// protected override void WriteLogObjectData(XmlWriter xmlWriter) { base.WriteLogObjectData(xmlWriter); logDataElement.WriteContentTo(xmlWriter); } #endregion } }