diff --git a/Spring.build b/Spring.build index 74f90bbe..00ea34d1 100644 --- a/Spring.build +++ b/Spring.build @@ -1,5 +1,28 @@ + @@ -10,22 +33,23 @@ - + + - + - + - + - + @@ -197,7 +221,7 @@ - + @@ -343,9 +367,9 @@ - - @@ -567,95 +591,95 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - + + + + @@ -717,7 +741,7 @@ - + @@ -876,7 +900,7 @@ - + @@ -950,9 +974,9 @@ - - - + + + @@ -1036,8 +1060,8 @@ - - + + @@ -1342,9 +1366,9 @@ - - - + + + diff --git a/build-support/solutions/Spring.Net.Core.2008.sln b/build-support/solutions/Spring.Net.Core.2008.sln index 3251e7fa..7bda6691 100644 --- a/build-support/solutions/Spring.Net.Core.2008.sln +++ b/build-support/solutions/Spring.Net.Core.2008.sln @@ -29,7 +29,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ..\..\changelog.txt = ..\..\changelog.txt ..\..\readme.txt = ..\..\readme.txt ..\..\Spring.build = ..\..\Spring.build - ..\..\Spring.include = ..\..\Spring.include EndProjectSection EndProject Global diff --git a/src/Spring/Spring.Core/AssemblyInfo.cs b/src/Spring/Spring.Core/AssemblyInfo.cs index 77d379c0..39510e5e 100644 --- a/src/Spring/Spring.Core/AssemblyInfo.cs +++ b/src/Spring/Spring.Core/AssemblyInfo.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2005 the original author or authors. + * Copyright © 2002-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ using System.Reflection; using System.Runtime.InteropServices; using System.Security.Permissions; + [assembly: ComVisible(false)] [assembly: AssemblyTitle("Spring.Net Core functionality")] [assembly: AssemblyDescription("Core functionality for Spring.Net IoC container")] diff --git a/src/Spring/Spring.Core/Objects/Factory/ObjectDefinitionStoreException.cs b/src/Spring/Spring.Core/Objects/Factory/ObjectDefinitionStoreException.cs index 93b67076..59119971 100644 --- a/src/Spring/Spring.Core/Objects/Factory/ObjectDefinitionStoreException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/ObjectDefinitionStoreException.cs @@ -1,5 +1,5 @@ -#region License - +#region License + /* * Copyright 2002-2005 the original author or authors. * @@ -14,246 +14,242 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ - -#endregion - -#region Imports - -using System; -using System.Globalization; -using System.Runtime.Serialization; -using System.Security.Permissions; -using Spring.Core.IO; - -#endregion - -namespace Spring.Objects.Factory -{ - /// - /// Thrown when an - /// encounters an internal error, and its definitions are invalid. - /// - /// - ///

- /// An example of a situation when this exception would be thrown is - /// in the case of an XML document containing object definitions being - /// malformed. - ///

- ///
- /// Rod Johnson - /// Juergen Hoeller - /// Rick Evans (.NET) - [Serializable] - public class ObjectDefinitionStoreException : FatalObjectException - { - /// - /// Creates a new instance of the ObjectDefinitionStoreException class. - /// - public ObjectDefinitionStoreException() - { - } - - /// - /// Creates a new instance of the ObjectDefinitionStoreException class. - /// - /// - /// A message about the exception. - /// - public ObjectDefinitionStoreException(string message) - : base(message) - { - } - - /// - /// Creates a new instance of the ObjectDefinitionStoreException class. - /// - /// - /// The description of the resource that the object definition came from - /// - /// - /// The name of the object that triggered the exception. - /// - /// - /// A message about the exception. - /// - public ObjectDefinitionStoreException( - string resourceDescription, string name, string message) - : this(resourceDescription, name, message, null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - /// The description of the resource that the object definition came from - /// - /// The detail message (used as exception message as-is) - /// The root cause. (may be null - public ObjectDefinitionStoreException(string resourceDescription, string msg, Exception cause) - : this(msg, cause) - { - _resourceDescription = resourceDescription; - } - - /// - /// Creates a new instance of the ObjectDefinitionStoreException class. - /// - /// - /// The resource location (e.g. an XML object definition file) associated - /// with the offending object definition. - /// - /// - /// A message about the exception. - /// - /// - /// The name of the object that triggered the exception. - /// - public ObjectDefinitionStoreException( - IResource resourceLocation, - string name, - string message) : this - (resourceLocation == null ? string.Empty : resourceLocation.Description, - name, message) - { - } - - /// - /// Creates a new instance of the ObjectDefinitionStoreException class. - /// - /// - /// The resource location (e.g. an XML object definition file) associated - /// with the offending object definition. - /// - /// - /// A message about the exception. - /// - /// - /// The name of the object that triggered the exception. - /// - /// - /// The root exception that is being wrapped. - /// - public ObjectDefinitionStoreException( - IResource resourceLocation, - string name, - string message, - Exception rootCause) - : this( (resourceLocation == null ? string.Empty : resourceLocation.Description), name, message, rootCause) - { - } - - /// - /// Creates a new instance of the ObjectDefinitionStoreException class. - /// - /// - /// The description of the resource that the object definition came from - /// - /// - /// A message about the exception. - /// - /// - /// The name of the object that triggered the exception. - /// - /// - /// The root exception that is being wrapped. - /// - public ObjectDefinitionStoreException( - string resourceDescription, - string name, - string message, - Exception rootCause) - : base( - string.Format( - "Error registering object {0}defined in '{1}' : {2}", - name == null ? string.Empty : string.Format("with name '{0}' ", name), - resourceDescription, - message), - rootCause) - { - _resourceDescription = resourceDescription; - _objectName = name; - } - - /// - /// Creates a new instance of the ObjectDefinitionStoreException class. - /// - /// - /// A message about the exception. - /// - /// - /// The root exception that is being wrapped. - /// - public ObjectDefinitionStoreException(string message, Exception rootCause) - : base(message, rootCause) - { - } - - /// - /// Creates a new instance of the ObjectDefinitionStoreException class. - /// - /// - /// The - /// that holds the serialized object data about the exception being thrown. - /// - /// - /// The - /// that contains contextual information about the source or destination. - /// - protected ObjectDefinitionStoreException( - SerializationInfo info, StreamingContext context) - : base(info, context) - { - _resourceDescription = info.GetValue ("_resourceDescription", typeof (object)) as string; - _objectName = info.GetValue ("_objectName", typeof (object)) as string; - } - - /// - /// Populates a with - /// the data needed to serialize the target object. - /// - /// - /// The to populate - /// with data. - /// - /// - /// The destination (see ) - /// for this serialization. - /// - [SecurityPermission (SecurityAction.Demand,SerializationFormatter=true)] - public override void GetObjectData ( - SerializationInfo info, StreamingContext context) - { - base.GetObjectData (info, context); - info.AddValue ("_resourceDescription", ResourceDescription); - info.AddValue ("_objectName", ObjectName); - } - - /// - /// The name of the object that triggered the exception (if any). - /// - public string ObjectName - { - get { return _objectName; } - } - - /// - /// The description of the resource associated with the object (if any). - /// - public string ResourceDescription - { - get { return _resourceDescription; } - } - - /// - /// The description of the resource associated with the object - /// - protected string _resourceDescription = string.Empty; - - /// - /// The name of the object that trigger the exception. - /// - protected string _objectName = string.Empty; - } -} + */ + +#endregion + +using System; +using System.Runtime.Serialization; +using System.Security.Permissions; +using Spring.Core.IO; + +namespace Spring.Objects.Factory +{ + /// + /// Thrown when an + /// encounters an internal error, and its definitions are invalid. + /// + /// + ///

+ /// An example of a situation when this exception would be thrown is + /// in the case of an XML document containing object definitions being + /// malformed. + ///

+ ///
+ /// Rod Johnson + /// Juergen Hoeller + /// Rick Evans (.NET) + [Serializable] + public class ObjectDefinitionStoreException : FatalObjectException + { + /// + /// Creates a new instance of the ObjectDefinitionStoreException class. + /// + public ObjectDefinitionStoreException() + { + } + + /// + /// Creates a new instance of the ObjectDefinitionStoreException class. + /// + /// + /// A message about the exception. + /// + public ObjectDefinitionStoreException(string message) + : base(message) + { + } + + /// + /// Creates a new instance of the ObjectDefinitionStoreException class. + /// + /// + /// The description of the resource that the object definition came from + /// + /// + /// The name of the object that triggered the exception. + /// + /// + /// A message about the exception. + /// + public ObjectDefinitionStoreException( + string resourceDescription, string name, string message) + : this(resourceDescription, name, message, null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + /// The description of the resource that the object definition came from + /// + /// The detail message (used as exception message as-is) + /// The root cause. (may be null + public ObjectDefinitionStoreException(string resourceDescription, string msg, Exception cause) + : this(msg, cause) + { + _resourceDescription = resourceDescription; + } + + /// + /// Creates a new instance of the ObjectDefinitionStoreException class. + /// + /// + /// The resource location (e.g. an XML object definition file) associated + /// with the offending object definition. + /// + /// + /// A message about the exception. + /// + /// + /// The name of the object that triggered the exception. + /// + public ObjectDefinitionStoreException( + IResource resourceLocation, + string name, + string message) + : this + (resourceLocation == null ? string.Empty : resourceLocation.Description, + name, message) + { + } + + /// + /// Creates a new instance of the ObjectDefinitionStoreException class. + /// + /// + /// The resource location (e.g. an XML object definition file) associated + /// with the offending object definition. + /// + /// + /// A message about the exception. + /// + /// + /// The name of the object that triggered the exception. + /// + /// + /// The root exception that is being wrapped. + /// + public ObjectDefinitionStoreException( + IResource resourceLocation, + string name, + string message, + Exception rootCause) + : this((resourceLocation == null ? string.Empty : resourceLocation.Description), name, message, rootCause) + { + } + + /// + /// Creates a new instance of the ObjectDefinitionStoreException class. + /// + /// + /// The description of the resource that the object definition came from + /// + /// + /// A message about the exception. + /// + /// + /// The name of the object that triggered the exception. + /// + /// + /// The root exception that is being wrapped. + /// + public ObjectDefinitionStoreException( + string resourceDescription, + string name, + string message, + Exception rootCause) + : base( + string.Format( + "Error registering object {0}defined in '{1}' : {2}", + name == null ? string.Empty : string.Format("with name '{0}' ", name), + resourceDescription, + message), + rootCause) + { + _resourceDescription = resourceDescription; + _objectName = name; + } + + /// + /// Creates a new instance of the ObjectDefinitionStoreException class. + /// + /// + /// A message about the exception. + /// + /// + /// The root exception that is being wrapped. + /// + public ObjectDefinitionStoreException(string message, Exception rootCause) + : base(message, rootCause) + { + } + + /// + /// Creates a new instance of the ObjectDefinitionStoreException class. + /// + /// + /// The + /// that holds the serialized object data about the exception being thrown. + /// + /// + /// The + /// that contains contextual information about the source or destination. + /// + protected ObjectDefinitionStoreException( + SerializationInfo info, StreamingContext context) + : base(info, context) + { + _resourceDescription = info.GetValue("_resourceDescription", typeof(object)) as string; + _objectName = info.GetValue("_objectName", typeof(object)) as string; + } + + /// + /// Populates a with + /// the data needed to serialize the target object. + /// + /// + /// The to populate + /// with data. + /// + /// + /// The destination (see ) + /// for this serialization. + /// + [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] + public override void GetObjectData( + SerializationInfo info, StreamingContext context) + { + base.GetObjectData(info, context); + info.AddValue("_resourceDescription", ResourceDescription); + info.AddValue("_objectName", ObjectName); + } + + /// + /// The name of the object that triggered the exception (if any). + /// + public string ObjectName + { + get { return _objectName; } + } + + /// + /// The description of the resource associated with the object (if any). + /// + public string ResourceDescription + { + get { return _resourceDescription; } + } + + /// + /// The description of the resource associated with the object + /// + private readonly string _resourceDescription = string.Empty; + + /// + /// The name of the object that trigger the exception. + /// + private readonly string _objectName = string.Empty; + } +}