- Timestamp:
- 3/31/2012 12:44:10 AM (14 months ago)
- Location:
- trunk/eraser
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Eraser.DefaultPlugins/ErasureTargets/ErasureTargetBase.cs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser
- Property svn:mergeinfo changed
/branches/eraser6/XmlTaskLists (added) merged: 2582-2605
- Property svn:mergeinfo changed
-
trunk/eraser/Eraser.DefaultPlugins/ErasureTargets/ErasureTargetBase.cs
r2515 r2606 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using System.Xml; 28 using System.Xml.Serialization; 27 29 using System.Security.Permissions; 28 30 … … 34 36 namespace Eraser.DefaultPlugins 35 37 { 36 abstract class ErasureTargetBase : IErasureTarget38 public abstract class ErasureTargetBase : IErasureTarget 37 39 { 38 40 #region IErasureTarget Members … … 82 84 { 83 85 info.AddValue("Method", Method.Guid); 86 } 87 88 public System.Xml.Schema.XmlSchema GetSchema() 89 { 90 return null; 91 } 92 93 /// <summary> 94 /// Reads the XML for the current Erasure Target. 95 /// </summary> 96 /// <param name="reader">The XML Reader containing the element to deserialise.</param> 97 /// <param name="advance">Whether to advance the element pointer. Set to false if 98 /// a derived class will be doing further processing on the element.</param> 99 /// <remarks>When inheriting and overriding this method, call the base method with 100 /// <paramref name="advance"/> set to false.</remarks> 101 protected virtual void ReadXml(XmlReader reader, bool advance) 102 { 103 Guid methodGuid = Guid.Empty; 104 if (reader.HasAttributes) 105 { 106 string method = reader.GetAttribute("method"); 107 if (method != null) 108 methodGuid = new Guid(method); 109 } 110 111 if (methodGuid == Guid.Empty) 112 Method = ErasureMethodRegistrar.Default; 113 else 114 Method = Host.Instance.ErasureMethods[methodGuid]; 115 116 if (advance) 117 reader.Read(); 118 } 119 120 public void ReadXml(XmlReader reader) 121 { 122 ReadXml(reader, true); 123 } 124 125 public virtual void WriteXml(XmlWriter writer) 126 { 127 if (method != ErasureMethodRegistrar.Default) 128 writer.WriteAttributeString("method", method.Guid.ToString()); 84 129 } 85 130 #endregion
Note: See TracChangeset
for help on using the changeset viewer.
