From: <fli...@us...> - 2008-08-25 19:54:36
|
Revision: 145 http://structuremap.svn.sourceforge.net/structuremap/?rev=145&view=rev Author: flimflan Date: 2008-08-25 19:47:23 +0000 (Mon, 25 Aug 2008) Log Message: ----------- Making sure all exceptions are serializable. Modified Paths: -------------- trunk/Source/StructureMap/Exceptions/InstancePropertyValueException.cs trunk/Source/StructureMap/Exceptions/MissingPluginFamilyException.cs trunk/Source/StructureMap/Exceptions/StructureMapConfigurationException.cs Modified: trunk/Source/StructureMap/Exceptions/InstancePropertyValueException.cs =================================================================== --- trunk/Source/StructureMap/Exceptions/InstancePropertyValueException.cs 2008-08-20 17:35:32 UTC (rev 144) +++ trunk/Source/StructureMap/Exceptions/InstancePropertyValueException.cs 2008-08-25 19:47:23 UTC (rev 145) @@ -6,6 +6,7 @@ /// Thrown by IProperty classes when an invalid value is applied to /// a property of an InstanceGraph /// </summary> + [Serializable] public class InstancePropertyValueException : ApplicationException { public InstancePropertyValueException(string msg, Exception ex) Modified: trunk/Source/StructureMap/Exceptions/MissingPluginFamilyException.cs =================================================================== --- trunk/Source/StructureMap/Exceptions/MissingPluginFamilyException.cs 2008-08-20 17:35:32 UTC (rev 144) +++ trunk/Source/StructureMap/Exceptions/MissingPluginFamilyException.cs 2008-08-25 19:47:23 UTC (rev 145) @@ -1,7 +1,9 @@ using System; +using System.Runtime.Serialization; namespace StructureMap.Exceptions { + [Serializable] public class MissingPluginFamilyException : ApplicationException { private string _message; @@ -15,5 +17,18 @@ { get { return _message; } } + + protected MissingPluginFamilyException(SerializationInfo info, StreamingContext context) : + base(info, context) + { + _message = info.GetString("message"); + } + + public override void GetObjectData(SerializationInfo info, StreamingContext context) + { + info.AddValue("message", _message, typeof(string)); + + base.GetObjectData(info, context); + } } } \ No newline at end of file Modified: trunk/Source/StructureMap/Exceptions/StructureMapConfigurationException.cs =================================================================== --- trunk/Source/StructureMap/Exceptions/StructureMapConfigurationException.cs 2008-08-20 17:35:32 UTC (rev 144) +++ trunk/Source/StructureMap/Exceptions/StructureMapConfigurationException.cs 2008-08-25 19:47:23 UTC (rev 145) @@ -1,9 +1,8 @@ using System; -using System.Collections.Generic; -using System.Text; namespace StructureMap.Exceptions { + [Serializable] public class StructureMapConfigurationException : ApplicationException { public StructureMapConfigurationException(string message) : base(message) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |