diff --git a/build-support/nuke-build/Configuration.cs b/build-support/nuke-build/Configuration.cs index 9c08b1ae..9b22a3bd 100644 --- a/build-support/nuke-build/Configuration.cs +++ b/build-support/nuke-build/Configuration.cs @@ -1,6 +1,4 @@ -using System; using System.ComponentModel; -using System.Linq; using Nuke.Common.Tooling; [TypeConverter(typeof(TypeConverter))] diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 9a2e6554..2dd98530 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -17,13 +17,13 @@ SpringSource Copyright 2002-2021 Spring.NET Framework Team. Apache License, Version 2.0 - + 3.4.1 SpringSource - SpringSource_Leaves32x32.png + SpringSource_Leaves32x32.png https://springframework.net/images/SpringSource_Leaves32x32.png - Apache-2.0 + Apache-2.0 https://www.springframework.net/ Library @@ -45,27 +45,29 @@ latest net462 + enable + - + - + - + - + - Full + Full $(DefineConstants);DEBUG_DYNAMIC; TRACE;$(DefineConstants) - + - + diff --git a/src/Spring/Spring.Aop/Aop/Config/AopNamespaceUtils.cs b/src/Spring/Spring.Aop/Aop/Config/AopNamespaceUtils.cs index c0e18702..9bb596c0 100644 --- a/src/Spring/Spring.Aop/Aop/Config/AopNamespaceUtils.cs +++ b/src/Spring/Spring.Aop/Aop/Config/AopNamespaceUtils.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.Xml; using Spring.Aop.Framework.AutoProxy; using Spring.Objects.Factory.Config; @@ -38,48 +37,48 @@ namespace Spring.Aop.Config /// /// Rob Harrop /// Juergen Hoeller - /// Mark Pollack (.NET) + /// Mark Pollack (.NET) /// Erich Eichinger (.NET) public class AopNamespaceUtils { /// /// The object name of the internally managed auto-proxy creator. /// - public static readonly string AUTO_PROXY_CREATOR_OBJECT_NAME = "Spring.Aop.Config.InternalAutoProxyCreator"; - - /// - /// The type of the APC that handles advisors with object role . - /// + public static readonly string AUTO_PROXY_CREATOR_OBJECT_NAME = "Spring.Aop.Config.InternalAutoProxyCreator"; + + /// + /// The type of the APC that handles advisors with object role . + /// private static readonly Type InfrastructureAutoProxyCreatorType = typeof(InfrastructureAdvisorAutoProxyCreator); - + /// /// Registers the internal auto proxy creator if necessary. /// /// The parser context. /// The source element. public static void RegisterAutoProxyCreatorIfNecessary(ParserContext parserContext, XmlElement sourceElement) - { - AssertUtils.ArgumentNotNull(parserContext, "parserContext"); - IObjectDefinitionRegistry registry = parserContext.Registry; + { + AssertUtils.ArgumentNotNull(parserContext, "parserContext"); + IObjectDefinitionRegistry registry = parserContext.Registry; RegisterAutoProxyCreatorIfNecessary(registry); - } - - /// - /// Registers the internal auto proxy creator if necessary. - /// - public static void RegisterAutoProxyCreatorIfNecessary(IObjectDefinitionRegistry registry) - { - AssertUtils.ArgumentNotNull(registry, "registry"); - - if (!registry.ContainsObjectDefinition(AUTO_PROXY_CREATOR_OBJECT_NAME)) - { - RootObjectDefinition objectDefinition = new RootObjectDefinition(InfrastructureAutoProxyCreatorType); - objectDefinition.Role = ObjectRole.ROLE_INFRASTRUCTURE; - objectDefinition.PropertyValues.Add("order", int.MaxValue); - registry.RegisterObjectDefinition(AUTO_PROXY_CREATOR_OBJECT_NAME, objectDefinition); - } - } - + } + + /// + /// Registers the internal auto proxy creator if necessary. + /// + public static void RegisterAutoProxyCreatorIfNecessary(IObjectDefinitionRegistry registry) + { + AssertUtils.ArgumentNotNull(registry, "registry"); + + if (!registry.ContainsObjectDefinition(AUTO_PROXY_CREATOR_OBJECT_NAME)) + { + RootObjectDefinition objectDefinition = new RootObjectDefinition(InfrastructureAutoProxyCreatorType); + objectDefinition.Role = ObjectRole.ROLE_INFRASTRUCTURE; + objectDefinition.PropertyValues.Add("order", int.MaxValue); + registry.RegisterObjectDefinition(AUTO_PROXY_CREATOR_OBJECT_NAME, objectDefinition); + } + } + /// /// Forces the auto proxy creator to use decorator proxy. /// diff --git a/src/Spring/Spring.Aop/Aop/Framework/AbstractMethodInvocation.cs b/src/Spring/Spring.Aop/Aop/Framework/AbstractMethodInvocation.cs index 2ea9aaad..e8fffbfb 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AbstractMethodInvocation.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AbstractMethodInvocation.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.Reflection; using System.Text; @@ -293,7 +292,7 @@ namespace Spring.Aop.Framework } /// - /// Retrieves a new instance + /// Retrieves a new instance /// for the next Proceed method call. /// /// @@ -318,7 +317,7 @@ namespace Spring.Aop.Framework protected virtual void AssertJoinpoint() { AssertUtils.ArgumentNotNull(target, "target"); -// if (this.method != null +// if (this.method != null // && !this.method.DeclaringType.IsAssignableFrom(target.GetType())) // { // // This means the target type doesn't implement the interface. @@ -351,9 +350,9 @@ namespace Spring.Aop.Framework /// ///

/// - /// Does not invoke on the + /// Does not invoke on the /// target - /// object, as that too may be proxied. + /// object, as that too may be proxied. /// ///

///
@@ -377,4 +376,4 @@ namespace Spring.Aop.Framework return buffer.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/Adapter/AfterReturningAdviceAdapter.cs b/src/Spring/Spring.Aop/Aop/Framework/Adapter/AfterReturningAdviceAdapter.cs index 67f02777..f9d0ef0f 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/Adapter/AfterReturningAdviceAdapter.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/Adapter/AfterReturningAdviceAdapter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using AopAlliance.Aop; using AopAlliance.Intercept; @@ -77,4 +76,4 @@ namespace Spring.Aop.Framework.Adapter return new AfterReturningAdviceInterceptor(advice); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/Adapter/AfterReturningAdviceInterceptor.cs b/src/Spring/Spring.Aop/Aop/Framework/Adapter/AfterReturningAdviceInterceptor.cs index 8e3482e6..4eaa8a96 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/Adapter/AfterReturningAdviceInterceptor.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/Adapter/AfterReturningAdviceInterceptor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using AopAlliance.Intercept; using Spring.Util; @@ -93,4 +92,4 @@ namespace Spring.Aop.Framework.Adapter return returnValue; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/Adapter/BeforeAdviceAdapter.cs b/src/Spring/Spring.Aop/Aop/Framework/Adapter/BeforeAdviceAdapter.cs index 6c8d3989..bafefeaf 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/Adapter/BeforeAdviceAdapter.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/Adapter/BeforeAdviceAdapter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using AopAlliance.Aop; using AopAlliance.Intercept; @@ -77,4 +76,4 @@ namespace Spring.Aop.Framework.Adapter return new MethodBeforeAdviceInterceptor(advice); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/Adapter/DefaultAdvisorAdapterRegistry.cs b/src/Spring/Spring.Aop/Aop/Framework/Adapter/DefaultAdvisorAdapterRegistry.cs index 396ff9c9..14519368 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/Adapter/DefaultAdvisorAdapterRegistry.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/Adapter/DefaultAdvisorAdapterRegistry.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,9 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; - using AopAlliance.Aop; using AopAlliance.Intercept; using Spring.Aop.Support; @@ -42,7 +39,7 @@ namespace Spring.Aop.Framework.Adapter public class DefaultAdvisorAdapterRegistry : IAdvisorAdapterRegistry { private readonly IList adapters = new List(); - + /// /// Creates a new instance of the /// class. @@ -61,7 +58,7 @@ namespace Spring.Aop.Framework.Adapter RegisterAdvisorAdapter(new AfterReturningAdviceAdapter()); RegisterAdvisorAdapter(new ThrowsAdviceAdapter()); } - + /// /// Returns an wrapping the supplied /// . @@ -71,7 +68,7 @@ namespace Spring.Aop.Framework.Adapter /// or /// . /// - /// + /// /// An wrapping the supplied /// . Never returns . If /// the parameter is an @@ -151,4 +148,4 @@ namespace Spring.Aop.Framework.Adapter this.adapters.Add(adapter); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/Adapter/GlobalAdvisorAdapterRegistry.cs b/src/Spring/Spring.Aop/Aop/Framework/Adapter/GlobalAdvisorAdapterRegistry.cs index a8606122..21395ccb 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/Adapter/GlobalAdvisorAdapterRegistry.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/Adapter/GlobalAdvisorAdapterRegistry.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Aop.Framework.Adapter { /// @@ -64,4 +62,4 @@ namespace Spring.Aop.Framework.Adapter #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/Adapter/MethodBeforeAdviceInterceptor.cs b/src/Spring/Spring.Aop/Aop/Framework/Adapter/MethodBeforeAdviceInterceptor.cs index fd7a4a4a..cafc93ed 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/Adapter/MethodBeforeAdviceInterceptor.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/Adapter/MethodBeforeAdviceInterceptor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using AopAlliance.Intercept; using Spring.Util; @@ -89,4 +88,4 @@ namespace Spring.Aop.Framework.Adapter return invocation.Proceed(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/Adapter/ThrowsAdviceAdapter.cs b/src/Spring/Spring.Aop/Aop/Framework/Adapter/ThrowsAdviceAdapter.cs index dace881f..28bdd9b0 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/Adapter/ThrowsAdviceAdapter.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/Adapter/ThrowsAdviceAdapter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using AopAlliance.Aop; using AopAlliance.Intercept; @@ -76,4 +75,4 @@ namespace Spring.Aop.Framework.Adapter return new ThrowsAdviceInterceptor(advisor.Advice); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/Adapter/ThrowsAdviceInterceptor.cs b/src/Spring/Spring.Aop/Aop/Framework/Adapter/ThrowsAdviceInterceptor.cs index 3f3306b1..abc51b8a 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/Adapter/ThrowsAdviceInterceptor.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/Adapter/ThrowsAdviceInterceptor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.Reflection; using AopAlliance.Intercept; @@ -37,7 +36,7 @@ namespace Spring.Aop.Framework.Adapter /// Implementations of the interface /// must define methods of the form... /// - /// AfterThrowing([MethodInfo method, Object[] args, Object target], Exception subclass); + /// AfterThrowing([MethodInfo method, Object[] args, Object target], Exception subclass); /// /// The method name is fixed (i.e. your methods must be named /// AfterThrowing. The first three arguments (as a whole) are @@ -84,7 +83,7 @@ namespace Spring.Aop.Framework.Adapter /// /// /// using System.Data; - /// + /// /// public class DataExceptionHandlingAdvice /// { /// public void AfterThrowing(ConstraintException ex) { @@ -315,4 +314,4 @@ namespace Spring.Aop.Framework.Adapter } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/Adapter/UnknownAdviceTypeException.cs b/src/Spring/Spring.Aop/Aop/Framework/Adapter/UnknownAdviceTypeException.cs index 2d09aa31..ffc69489 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/Adapter/UnknownAdviceTypeException.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/Adapter/UnknownAdviceTypeException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; #endregion @@ -90,4 +89,4 @@ namespace Spring.Aop.Framework.Adapter { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AdvisedSupport.cs b/src/Spring/Spring.Aop/Aop/Framework/AdvisedSupport.cs index 5920abd6..904a07ed 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AdvisedSupport.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AdvisedSupport.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Reflection; using System.Runtime.Serialization; using System.Text; @@ -60,19 +58,19 @@ namespace Spring.Aop.Framework /// ///

/// If an is added, it - /// will be wrapped in an advice before being added to this list. + /// will be wrapped in an advice before being added to this list. ///

///
private List _advisors = new List(); - /// + /// /// Array updated on changes to the advisors list, which is easier to /// manipulate internally /// private volatile IAdvisor[] _advisorsArray = new IAdvisor[] { }; - /// - /// List of introductions. + /// + /// List of introductions. /// private List _introductions = new List(); @@ -114,7 +112,7 @@ namespace Spring.Aop.Framework private IAdvisorChainFactory advisorChainFactory; /// - /// If no explicit interfaces are specified, interfaces will be automatically determined + /// If no explicit interfaces are specified, interfaces will be automatically determined /// from the target type /// private bool autoDetectInterfaces; @@ -137,7 +135,7 @@ namespace Spring.Aop.Framework /// /// The interfaces that are to be proxied. /// - /// If this + /// If this /// public AdvisedSupport(Type[] interfaces) : this() @@ -513,7 +511,7 @@ namespace Spring.Aop.Framework AddAdvisor(position, new DefaultPointcutAdvisor(advice)); } - /// + /// /// Return the index (0 based) of the supplied /// in the interceptor /// (advice) chain for this proxy. @@ -534,7 +532,7 @@ namespace Spring.Aop.Framework } } - /// + /// /// Return the index (0 based) of the supplied /// in the introductions /// for this proxy. @@ -775,7 +773,7 @@ namespace Spring.Aop.Framework } /// - /// Adds the advisors from the supplied + /// Adds the advisors from the supplied /// to the list of . /// /// @@ -905,7 +903,7 @@ namespace Spring.Aop.Framework } } - /// + /// /// Replaces the with the /// . /// @@ -976,7 +974,7 @@ namespace Spring.Aop.Framework buffer.Append("targetSource=[" + this.m_targetSource + "];\n"); buffer.Append("advisorChainFactory=" + this.advisorChainFactory + ";\n"); buffer.Append(base.ToString()); - return buffer.ToString(); + return buffer.ToString(); } /// @@ -990,7 +988,7 @@ namespace Spring.Aop.Framework } /// - /// If no explicit interfaces are specified, interfaces will be automatically determined + /// If no explicit interfaces are specified, interfaces will be automatically determined /// from the target type on proxy creation. Defaults to true /// public bool AutoDetectInterfaces @@ -1157,7 +1155,7 @@ namespace Spring.Aop.Framework return false; } - /// + /// /// Return the index (0 based) of the supplied /// in the interceptor /// (advice) chain for this proxy. @@ -1185,7 +1183,7 @@ namespace Spring.Aop.Framework } } - /// + /// /// Return the index (0 based) of the supplied /// in the interceptor /// (advice) chain for this proxy. @@ -1222,7 +1220,7 @@ namespace Spring.Aop.Framework return -1; } - /// + /// /// Return the index (0 based) of the supplied /// in the interceptor /// (advice) chain for this proxy. @@ -1243,7 +1241,7 @@ namespace Spring.Aop.Framework return this._advisors != null ? this._advisors.IndexOf(advisor) : -1; } - /// + /// /// Return the index (0 based) of the supplied /// in the introductions /// for this proxy. @@ -1427,7 +1425,7 @@ namespace Spring.Aop.Framework } } - /// + /// /// Creates an AOP proxy using this instance's configuration data. /// /// @@ -1443,7 +1441,7 @@ namespace Spring.Aop.Framework { lock (this.SyncRoot) { - if (this.autoDetectInterfaces && CountNonIntroductionInterfaces() == 0 + if (this.autoDetectInterfaces && CountNonIntroductionInterfaces() == 0 // && !this.ProxyTargetType ) { @@ -1657,4 +1655,4 @@ namespace Spring.Aop.Framework return ReflectionUtils.GetInterfaces(target is Type ? (Type)target : target.GetType()); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AdvisorChainFactoryUtils.cs b/src/Spring/Spring.Aop/Aop/Framework/AdvisorChainFactoryUtils.cs index 7f8c998b..339a9bfe 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AdvisorChainFactoryUtils.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AdvisorChainFactoryUtils.cs @@ -20,8 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; using System.Reflection; using AopAlliance.Intercept; @@ -120,4 +118,4 @@ namespace Spring.Aop.Framework #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AopConfigException.cs b/src/Spring/Spring.Aop/Aop/Framework/AopConfigException.cs index bf18fd18..4a6e4b12 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AopConfigException.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AopConfigException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; #endregion @@ -78,4 +77,4 @@ namespace Spring.Aop.Framework { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AopContext.cs b/src/Spring/Spring.Aop/Aop/Framework/AopContext.cs index 5c8cca18..5a5d289a 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AopContext.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AopContext.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; #endregion @@ -186,4 +185,4 @@ namespace Spring.Aop.Framework #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AopUtils.cs b/src/Spring/Spring.Aop/Aop/Framework/AopUtils.cs index 4242b401..b26b275e 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AopUtils.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AopUtils.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using Spring.Collections; @@ -47,7 +46,7 @@ namespace Spring.Aop.Framework private const string COMPOSITION_PROXY_TYPE_NAME = "CompositionAopProxy"; private const string DECORATOR_PROXY_TYPE_NAME = "DecoratorAopProxy"; - + private const string INHERITANCE_PROXY_TYPE_NAME = "InheritanceAopProxy"; /// @@ -67,7 +66,7 @@ namespace Spring.Aop.Framework /// Is the supplied an AOP proxy? /// /// - /// Return whether the given object is either + /// Return whether the given object is either /// a composition-based proxy or a decorator-based proxy. /// /// The instance to be checked. @@ -185,7 +184,7 @@ namespace Spring.Aop.Framework } /// - /// Gets all of the interfaces that the + /// Gets all of the interfaces that the /// supplied implements. /// /// @@ -220,7 +219,7 @@ namespace Spring.Aop.Framework return Type.EmptyTypes; } - /// + /// /// Can the supplied apply at all on the /// supplied ? /// @@ -248,7 +247,7 @@ namespace Spring.Aop.Framework { return CanApply(pointcut, targetType, proxyInterfaces, false); } - /// + /// /// Can the supplied apply at all on the /// supplied ? /// @@ -302,7 +301,7 @@ namespace Spring.Aop.Framework return false; } - /// + /// /// Can the supplied apply at all on the /// supplied ? /// @@ -326,7 +325,7 @@ namespace Spring.Aop.Framework return CanApply(advisor, targetType, proxyInterfaces, false); } - /// + /// /// Can the supplied apply at all on the /// supplied ? /// @@ -407,4 +406,4 @@ namespace Spring.Aop.Framework } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractAdvisorAutoProxyCreator.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractAdvisorAutoProxyCreator.cs index 34eabafa..1b46dd3c 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractAdvisorAutoProxyCreator.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractAdvisorAutoProxyCreator.cs @@ -18,16 +18,12 @@ #endregion -using System; -using System.Collections.Generic; using Common.Logging; using Spring.Core; using Spring.Objects.Factory; using Spring.Objects.Factory.Config; -using System.Linq; - namespace Spring.Aop.Framework.AutoProxy { /// @@ -57,7 +53,7 @@ namespace Spring.Aop.Framework.AutoProxy private IAdvisorRetrievalHelper _advisorRetrievalHelper; /// - /// Initialize + /// Initialize /// protected AbstractAdvisorAutoProxyCreator() { @@ -143,7 +139,7 @@ namespace Spring.Aop.Framework.AutoProxy /// the type of the object to be advised /// the name of the object to be advised /// - /// the empty list, not null, if there are no pointcuts or interceptors. + /// the empty list, not null, if there are no pointcuts or interceptors. /// The by-order sorted list of advisors otherwise /// protected IList FindEligibleAdvisors(Type targetType, string targetName) @@ -169,7 +165,7 @@ namespace Spring.Aop.Framework.AutoProxy } /// - /// From the given list of candidate advisors, select the ones that are applicable + /// From the given list of candidate advisors, select the ones that are applicable /// to the given target specified by targetType and name. /// /// the list of candidate advisors to date @@ -275,4 +271,4 @@ namespace Spring.Aop.Framework.AutoProxy } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractAutoProxyCreator.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractAutoProxyCreator.cs index 767698a2..8da31db3 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractAutoProxyCreator.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractAutoProxyCreator.cs @@ -14,12 +14,8 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Reflection; -using System.Runtime.Remoting; using AopAlliance.Aop; @@ -227,7 +223,7 @@ namespace Spring.Aop.Framework.AutoProxy #if NETSTANDARD var isTransparentProxy = false; #else - var isTransparentProxy = RemotingServices.IsTransparentProxy(obj); + var isTransparentProxy = System.Runtime.Remoting.RemotingServices.IsTransparentProxy(obj); #endif Type objectType = isTransparentProxy @@ -640,4 +636,4 @@ namespace Spring.Aop.Framework.AutoProxy return pvs; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractFilteringAutoProxyCreator.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractFilteringAutoProxyCreator.cs index 5c95302d..ed80d290 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractFilteringAutoProxyCreator.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AbstractFilteringAutoProxyCreator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,15 +20,12 @@ #region Imports -using System; -using System.Collections.Generic; - #endregion namespace Spring.Aop.Framework.AutoProxy { /// - /// The base class for AutoProxyCreator implementations that mark objects + /// The base class for AutoProxyCreator implementations that mark objects /// eligible for proxying based on arbitrary criteria. /// /// Erich Eichinger @@ -72,8 +69,8 @@ namespace Spring.Aop.Framework.AutoProxy /// /// the object's type /// the name of the object - /// + /// /// whether the given object shall be proxied. protected abstract bool IsEligibleForProxying( Type targetType, string targetName ); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AttributeAutoProxyCreator.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AttributeAutoProxyCreator.cs index 8764be79..60599f52 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AttributeAutoProxyCreator.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/AttributeAutoProxyCreator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - using Spring.Util; #endregion @@ -111,4 +109,4 @@ namespace Spring.Aop.Framework.AutoProxy } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/DefaultAdvisorAutoProxyCreator.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/DefaultAdvisorAutoProxyCreator.cs index 2816073c..81e3ca4f 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/DefaultAdvisorAutoProxyCreator.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/DefaultAdvisorAutoProxyCreator.cs @@ -20,8 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; using Spring.Objects.Factory; #endregion @@ -138,4 +136,4 @@ namespace Spring.Aop.Framework.AutoProxy cachedAdvisors = base.FindCandidateAdvisors(null, null); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/IAdvisorRetrievalHelper.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/IAdvisorRetrievalHelper.cs index 80bc0237..f97af4c6 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/IAdvisorRetrievalHelper.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/IAdvisorRetrievalHelper.cs @@ -1,11 +1,8 @@ -using System; -using System.Collections.Generic; - namespace Spring.Aop.Framework.AutoProxy { /// - /// Interface encapsulating the advisor retrieval strategy used by - /// an to retrieve the + /// Interface encapsulating the advisor retrieval strategy used by + /// an to retrieve the /// applicable list of advisor objects. /// public interface IAdvisorRetrievalHelper @@ -15,4 +12,4 @@ namespace Spring.Aop.Framework.AutoProxy /// List FindAdvisorObjects(Type targetType, string targetName); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/ITargetSourceCreator.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/ITargetSourceCreator.cs index b5bf6215..79089a4a 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/ITargetSourceCreator.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/ITargetSourceCreator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using Spring.Objects.Factory; #endregion @@ -49,4 +48,4 @@ namespace Spring.Aop.Framework.AutoProxy /// interested in the particular object ITargetSource GetTargetSource(Type objectType, string objectName, IObjectFactory factory); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/InfrastructureAdvisorAutoProxyCreator.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/InfrastructureAdvisorAutoProxyCreator.cs index 8af08ee4..ddfa2762 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/InfrastructureAdvisorAutoProxyCreator.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/InfrastructureAdvisorAutoProxyCreator.cs @@ -1,24 +1,23 @@ #region License -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. +/* + * Copyright 2002-2010 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 -using System; using Spring.Objects.Factory.Config; namespace Spring.Aop.Framework.AutoProxy @@ -40,7 +39,7 @@ namespace Spring.Aop.Framework.AutoProxy { return new InfrastructurAdvisorRetrievalHelper(this, objectFactory); } - + private class InfrastructurAdvisorRetrievalHelper : ObjectFactoryAdvisorRetrievalHelper { private readonly InfrastructureAdvisorAutoProxyCreator _owner; @@ -58,4 +57,4 @@ namespace Spring.Aop.Framework.AutoProxy } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/InheritanceBasedAopConfigurer.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/InheritanceBasedAopConfigurer.cs index 787835e0..260f4f25 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/InheritanceBasedAopConfigurer.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/InheritanceBasedAopConfigurer.cs @@ -14,9 +14,7 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Runtime.Serialization; using AopAlliance.Aop; @@ -32,8 +30,8 @@ using Spring.Core; namespace Spring.Aop.Framework.AutoProxy { /// - /// implementation that replaces a group of objects - /// with a 'true' inheritance based AOP mechanism that delegates + /// implementation that replaces a group of objects + /// with a 'true' inheritance based AOP mechanism that delegates /// to the given interceptors before invoking the object itself. /// /// Bruno Baia @@ -50,7 +48,7 @@ namespace Spring.Aop.Framework.AutoProxy private IAdvisorAdapterRegistry advisorAdapterRegistry = GlobalAdvisorAdapterRegistry.Instance; /// - /// Set the names of the objects in IList fashioned way + /// Set the names of the objects in IList fashioned way /// that should automatically get intercepted. /// /// @@ -62,19 +60,19 @@ namespace Spring.Aop.Framework.AutoProxy set { objectNames = value; } } - /// - /// Sets the common interceptors, a list of , + /// + /// Sets the common interceptors, a list of , /// and introduction object names. /// /// /// - /// If this property isn't set, there will be zero common interceptors. + /// If this property isn't set, there will be zero common interceptors. /// This is perfectly valid, if "specific" interceptors such as /// matching Advisors are all we want. /// /// /// - /// The list of , + /// The list of , /// and introduction object names. /// /// @@ -85,7 +83,7 @@ namespace Spring.Aop.Framework.AutoProxy } /// - /// Is target type attributes, method attributes, method's return type attributes + /// Is target type attributes, method attributes, method's return type attributes /// and method's parameter attributes to be proxied in addition /// to any interfaces declared on the proxied ? /// @@ -99,7 +97,7 @@ namespace Spring.Aop.Framework.AutoProxy /// Gets or sets a value indicating whether inherited members should be proxied. /// /// - /// if inherited members should be proxied; + /// if inherited members should be proxied; /// otherwise, . /// public bool ProxyDeclaredMembersOnly @@ -112,7 +110,7 @@ namespace Spring.Aop.Framework.AutoProxy /// Gets or sets a value indicating whether interfaces members should be proxied. /// /// - /// if interfaces members should be proxied; + /// if interfaces members should be proxied; /// otherwise, . /// public bool ProxyInterfaces @@ -301,14 +299,14 @@ namespace Spring.Aop.Framework.AutoProxy _targetType = targetType; } - + /// private InheritanceBasedAopTargetSource(SerializationInfo info, StreamingContext context) { var type = info.GetString("TargetType"); _targetType = type != null ? Type.GetType(type) : null; } - + /// public void GetObjectData(SerializationInfo info, StreamingContext context) { diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/ObjectFactoryAdvisorRetrievalHelper.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/ObjectFactoryAdvisorRetrievalHelper.cs index 20cff858..c08e4e64 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/ObjectFactoryAdvisorRetrievalHelper.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/ObjectFactoryAdvisorRetrievalHelper.cs @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections.Generic; - using Common.Logging; using Spring.Objects.Factory; using Spring.Objects.Factory.Config; @@ -73,7 +70,7 @@ namespace Spring.Aop.Framework.AutoProxy { return advisors; } - + for (int i = 0; i < advisorNames.Count; i++) { string name = advisorNames[i]; @@ -118,7 +115,7 @@ namespace Spring.Aop.Framework.AutoProxy if (advisorCandidate is IAdvisor) { advisors.Add((IAdvisor) advisorCandidate); - } + } else if (advisorCandidate is IAdvisors) { advisors.AddRange(((IAdvisors)advisorCandidate).Advisors); @@ -158,7 +155,7 @@ namespace Spring.Aop.Framework.AutoProxy /// /// Determine, whether the specified aspect object is eligible. - /// The default implementation accepts all except for advisors that are + /// The default implementation accepts all except for advisors that are /// part of the internal infrastructure. /// /// the name of the candidate advisor @@ -174,4 +171,4 @@ namespace Spring.Aop.Framework.AutoProxy return this.ObjectFactory.ContainsObject(advisorName); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/ObjectNameAutoProxyCreator.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/ObjectNameAutoProxyCreator.cs index 70b0a01f..6cf4e4bd 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/ObjectNameAutoProxyCreator.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/ObjectNameAutoProxyCreator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using Spring.Objects.Factory; using Spring.Util; @@ -35,7 +34,7 @@ namespace Spring.Aop.Framework.AutoProxy /// /// In case of a IFactoryObject, only the objects created by the /// FactoryBean will get proxied. If you intend to proxy a IFactoryObject instance itself - /// specify the object name of the IFactoryObject including + /// specify the object name of the IFactoryObject including /// the factory-object prefix "&" e.g. "&MyFactoryObject". /// /// @@ -54,7 +53,7 @@ namespace Spring.Aop.Framework.AutoProxy {} /// - /// Set the names of the objects in IList fashioned way that should automatically + /// Set the names of the objects in IList fashioned way that should automatically /// get wrapped with proxies. /// A name can specify a prefix to match by ending with "*", e.g. "myObject,tx*" /// will match the object named "myObject" and all objects whose name start with "tx". @@ -76,7 +75,7 @@ namespace Spring.Aop.Framework.AutoProxy /// Identify as object to proxy if the object name is in the configured list of names. /// protected override bool IsEligibleForProxying( Type targetType, string targetName ) - { + { bool shallProxy = IsObjectNameMatch(targetType, targetName, this.ObjectNames); return shallProxy; } @@ -103,10 +102,10 @@ namespace Spring.Aop.Framework.AutoProxy /// /// the object's type. Must not be null. /// the name of the object Must not be null. - /// the list of patterns, that shall be matched against. Must not be null. + /// the list of patterns, that shall be matched against. Must not be null. /// /// If is null, will always return true, otherwise - /// if matches any of the patterns specified in . + /// if matches any of the patterns specified in . /// protected bool IsObjectNameMatch(Type objType, string objectName, IList objectNamePatterns) { @@ -133,4 +132,4 @@ namespace Spring.Aop.Framework.AutoProxy return false; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/PointcutFilteringAutoProxyCreator.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/PointcutFilteringAutoProxyCreator.cs index 5d7ea845..5cb949a7 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/PointcutFilteringAutoProxyCreator.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/PointcutFilteringAutoProxyCreator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - using Spring.Util; #endregion @@ -56,4 +54,4 @@ namespace Spring.Aop.Framework.AutoProxy return shallProxy; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/Target/AbstractPrototypeTargetSourceCreator.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/Target/AbstractPrototypeTargetSourceCreator.cs index a60e0a4a..3cdea0f9 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/Target/AbstractPrototypeTargetSourceCreator.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/Target/AbstractPrototypeTargetSourceCreator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using Common.Logging; using Spring.Aop.Target; using Spring.Objects.Factory; @@ -104,4 +103,4 @@ namespace Spring.Aop.Framework.AutoProxy.Target IObjectFactory factory); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/TypeNameAutoProxyCreator.cs b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/TypeNameAutoProxyCreator.cs index 4748e2e9..0a5e2420 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/TypeNameAutoProxyCreator.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/AutoProxy/TypeNameAutoProxyCreator.cs @@ -20,7 +20,6 @@ #region Imports -using System; using Spring.Aop.Support; using Spring.Util; @@ -41,7 +40,7 @@ namespace Spring.Aop.Framework.AutoProxy /// public string[] TypeNames { - get + get { if (_typeNameFilter != null) { @@ -64,7 +63,7 @@ namespace Spring.Aop.Framework.AutoProxy /// /// the object's type /// the name of the object - /// + /// /// whether the given object shall be proxied. protected override bool IsEligibleForProxying(Type targetType, string targetName) { @@ -74,4 +73,4 @@ namespace Spring.Aop.Framework.AutoProxy return shallProxy; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicMethodInvocation.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicMethodInvocation.cs index 4cfd3c65..69d5a140 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicMethodInvocation.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicMethodInvocation.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.Reflection; @@ -116,8 +115,8 @@ namespace Spring.Aop.Framework } /// - /// Creates a new instance - /// from the specified and + /// Creates a new instance + /// from the specified and /// increments the interceptor index. /// /// @@ -134,4 +133,4 @@ namespace Spring.Aop.Framework return rmi; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyFactory.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyFactory.cs index 9d0d95fa..c7f60b63 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyFactory.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyFactory.cs @@ -1,6 +1,3 @@ -using System; -using System.Collections.Generic; - using Spring.Aop.Support; using Spring.Aop.Target; @@ -88,4 +85,4 @@ namespace Spring.Aop.Framework.DynamicProxy return AopUtils.IsAopProxyType(targetSource.TargetType); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyMethodBuilder.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyMethodBuilder.cs index dc5a2ef4..3a4c44cd 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyMethodBuilder.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyMethodBuilder.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; using System.Runtime.Serialization; @@ -41,13 +39,13 @@ namespace Spring.Aop.Framework.DynamicProxy protected IAopProxyTypeGenerator aopProxyGenerator; /// - /// The dictionary to cache the list of target + /// The dictionary to cache the list of target /// s. /// protected IDictionary targetMethods; /// - /// The dictionary to cache the list of target + /// The dictionary to cache the list of target /// s defined on the proxy. /// protected IDictionary onProxyTargetMethods; @@ -75,13 +73,13 @@ namespace Spring.Aop.Framework.DynamicProxy protected LocalBuilder returnValue; /// - /// The local variable to store the closed generic method + /// The local variable to store the closed generic method /// when the target method is generic. /// protected LocalBuilder genericTargetMethod; /// - /// The local variable to store the closed generic method + /// The local variable to store the closed generic method /// when the target method defined on the proxy is generic. /// protected LocalBuilder genericOnProxyTargetMethod; @@ -92,11 +90,11 @@ namespace Spring.Aop.Framework.DynamicProxy protected FieldBuilder targetMethodCacheField; /// - /// The field to cache the target + /// The field to cache the target /// defined on the proxy. /// protected FieldBuilder onProxyTargetMethodCacheField; - + // convinience fields /// @@ -137,7 +135,7 @@ namespace Spring.Aop.Framework.DynamicProxy /// implemented explicitly; otherwise . /// /// - /// The dictionary to cache the list of target + /// The dictionary to cache the list of target /// s. /// protected AbstractAopProxyMethodBuilder( @@ -159,11 +157,11 @@ namespace Spring.Aop.Framework.DynamicProxy /// implemented explicitly; otherwise . /// /// - /// The dictionary to cache the list of target + /// The dictionary to cache the list of target /// s. /// /// - /// The dictionary to cache the list of target + /// The dictionary to cache the list of target /// s defined on the proxy. /// protected AbstractAopProxyMethodBuilder( @@ -220,7 +218,7 @@ namespace Spring.Aop.Framework.DynamicProxy string methodId = GenerateMethodCacheFieldId(method); targetMethods.Add(methodId, method); - targetMethodCacheField = typeBuilder.DefineField(methodId, typeof(MethodInfo), + targetMethodCacheField = typeBuilder.DefineField(methodId, typeof(MethodInfo), FieldAttributes.Private | FieldAttributes.Static); MakeGenericMethod(il, method, targetMethodCacheField, genericTargetMethod); @@ -237,7 +235,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Create a closed generic method for the current call + /// Create a closed generic method for the current call /// if target method is a generic definition. /// /// The IL generator to use. @@ -283,7 +281,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the target type on stack. /// /// The IL generator to use. @@ -294,8 +292,8 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Generates the IL instructions that pushes - /// the current + /// Generates the IL instructions that pushes + /// the current /// instance on stack. /// /// The IL generator to use. @@ -351,7 +349,7 @@ namespace Spring.Aop.Framework.DynamicProxy interceptors = il.DeclareLocal(typeof(System.Collections.IList)); targetType = il.DeclareLocal(typeof(Type)); arguments = il.DeclareLocal(typeof(Object[])); - + if (method.IsGenericMethodDefinition) { genericTargetMethod = il.DeclareLocal(typeof(MethodInfo)); @@ -592,7 +590,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Emits MSIL instructions to load a value of the specified + /// Emits MSIL instructions to load a value of the specified /// onto the evaluation stack indirectly. /// /// The IL generator to use. @@ -619,7 +617,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Emit MSIL instructions to store a value of the specified + /// Emit MSIL instructions to store a value of the specified /// at a supplied address. /// /// The IL generator to use. @@ -645,7 +643,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Emits MSIL instructions to convert the boxed representation + /// Emits MSIL instructions to convert the boxed representation /// of the supplied to its unboxed form. /// /// The IL generator to use. @@ -715,7 +713,7 @@ namespace Spring.Aop.Framework.DynamicProxy public static readonly MethodInfo GetTypeMethod = typeof(Object).GetMethod("GetType", Type.EmptyTypes); - public static readonly MethodInfo GetTypeFromHandle = + public static readonly MethodInfo GetTypeFromHandle = typeof(Type).GetMethod("GetTypeFromHandle", new Type[] { typeof(RuntimeTypeHandle) }); public static readonly MethodInfo MakeGenericMethod = diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyTypeBuilder.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyTypeBuilder.cs index df233a07..21f97ae4 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyTypeBuilder.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AbstractAopProxyTypeBuilder.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.Reflection.Emit; @@ -32,17 +31,17 @@ using Spring.Proxy; namespace Spring.Aop.Framework.DynamicProxy { /// - /// Base class for proxy builders that can be used + /// Base class for proxy builders that can be used /// to create an AOP proxy for any object. /// /// Bruno Baia - public abstract class AbstractAopProxyTypeBuilder : + public abstract class AbstractAopProxyTypeBuilder : AbstractProxyTypeBuilder, IAopProxyTypeGenerator { #region IProxyTypeGenerator Members /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the target instance on which calls should be delegated to. /// /// The IL generator to use. @@ -58,8 +57,8 @@ namespace Spring.Aop.Framework.DynamicProxy #region IAopProxyTypeGenerator Members /// - /// Generates the IL instructions that pushes - /// the current + /// Generates the IL instructions that pushes + /// the current /// instance on stack. /// /// The IL generator to use. @@ -88,8 +87,8 @@ namespace Spring.Aop.Framework.DynamicProxy return attrs; } - + #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AdvisedProxy.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AdvisedProxy.cs index f20b45ef..a4ce5f5f 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AdvisedProxy.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/AdvisedProxy.cs @@ -14,9 +14,7 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.Reflection; @@ -56,7 +54,7 @@ namespace Spring.Aop.Framework.DynamicProxy public IAdvice[] m_introductions; /// - /// Target source + /// Target source /// public ITargetSource m_targetSource; @@ -390,4 +388,4 @@ namespace Spring.Aop.Framework.DynamicProxy get { return m_targetType; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/BaseAopProxyMethodBuilder.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/BaseAopProxyMethodBuilder.cs index a9a911ed..9abe70ff 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/BaseAopProxyMethodBuilder.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/BaseAopProxyMethodBuilder.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; @@ -27,7 +26,7 @@ using Spring.Util; namespace Spring.Aop.Framework.DynamicProxy { /// - /// implementation + /// implementation /// that delegates method calls to the base method. /// /// Bruno Baia @@ -41,15 +40,15 @@ namespace Spring.Aop.Framework.DynamicProxy /// The implementation to use. /// /// - /// The dictionary to cache the list of target + /// The dictionary to cache the list of target /// s. /// /// - /// The dictionary to cache the list of target + /// The dictionary to cache the list of target /// s defined on the proxy. /// public BaseAopProxyMethodBuilder( - TypeBuilder typeBuilder, IAopProxyTypeGenerator aopProxyGenerator, + TypeBuilder typeBuilder, IAopProxyTypeGenerator aopProxyGenerator, IDictionary targetMethods, IDictionary onProxyTargetMethods) : base(typeBuilder, aopProxyGenerator, false, targetMethods, onProxyTargetMethods) { diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/BaseCompositionAopProxy.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/BaseCompositionAopProxy.cs index 77e3f2c9..9ec14d0e 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/BaseCompositionAopProxy.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/BaseCompositionAopProxy.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; #endregion @@ -163,4 +162,4 @@ namespace Spring.Aop.Framework.DynamicProxy #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/CachedAopProxyFactory.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/CachedAopProxyFactory.cs index f6e3eb22..19c02ab3 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/CachedAopProxyFactory.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/CachedAopProxyFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; using System.Text; using System.Collections; @@ -33,7 +31,7 @@ using Spring.Proxy; namespace Spring.Aop.Framework.DynamicProxy { /// - /// Implementation of the + /// Implementation of the /// interface that caches the AOP proxy instance. /// /// @@ -210,4 +208,4 @@ namespace Spring.Aop.Framework.DynamicProxy #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/CompositionAopProxyTypeBuilder.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/CompositionAopProxyTypeBuilder.cs index cab04055..788e9f44 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/CompositionAopProxyTypeBuilder.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/CompositionAopProxyTypeBuilder.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; using System.Runtime.Serialization; @@ -40,14 +38,14 @@ namespace Spring.Aop.Framework.DynamicProxy private readonly IAdvised advised; /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// The proxy configuration. public CompositionAopProxyTypeBuilder(IAdvised advised) { this.advised = advised; - + Name = PROXY_TYPE_NAME; BaseType = typeof(BaseCompositionAopProxy); TargetType = advised.TargetSource.TargetType.IsInterface ? typeof(object) : advised.TargetSource.TargetType; @@ -86,8 +84,8 @@ namespace Spring.Aop.Framework.DynamicProxy if (target is null) { // implement interface - ImplementInterface(typeBuilder, - new TargetAopProxyMethodBuilder(typeBuilder, this, false, targetMethods), + ImplementInterface(typeBuilder, + new TargetAopProxyMethodBuilder(typeBuilder, this, false, targetMethods), intf, TargetType); } else if (target is IIntroductionAdvisor) @@ -112,8 +110,8 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Generates the IL instructions that pushes - /// the current + /// Generates the IL instructions that pushes + /// the current /// instance on stack. /// /// The IL generator to use. @@ -167,7 +165,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Determines if the specified + /// Determines if the specified /// is one of those generated by this builder. /// /// The type to check. @@ -180,4 +178,4 @@ namespace Spring.Aop.Framework.DynamicProxy return type.FullName.StartsWith(PROXY_TYPE_NAME); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/DecoratorAopProxyTypeBuilder.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/DecoratorAopProxyTypeBuilder.cs index 320c2136..72a9acbd 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/DecoratorAopProxyTypeBuilder.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/DecoratorAopProxyTypeBuilder.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; using System.Runtime.Serialization; @@ -45,7 +43,7 @@ namespace Spring.Aop.Framework.DynamicProxy protected FieldBuilder advisedProxyField; /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// The proxy configuration. @@ -122,8 +120,8 @@ namespace Spring.Aop.Framework.DynamicProxy } // inherit from target type - InheritType(typeBuilder, - new TargetAopProxyMethodBuilder(typeBuilder, this, false, targetMethods), + InheritType(typeBuilder, + new TargetAopProxyMethodBuilder(typeBuilder, this, false, targetMethods), TargetType); // implement IAdvised interface @@ -147,8 +145,8 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Generates the IL instructions that pushes - /// the current + /// Generates the IL instructions that pushes + /// the current /// instance on stack. /// /// The IL generator to use. @@ -180,7 +178,7 @@ namespace Spring.Aop.Framework.DynamicProxy MethodBuilder mb = typeBuilder.DefineMethod("GetObjectData", - MethodAttributes.Public | MethodAttributes.HideBySig | + MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.NewSlot | MethodAttributes.Virtual, typeof (void), new Type[] {typeof (SerializationInfo), typeof (StreamingContext)}); @@ -225,7 +223,7 @@ namespace Spring.Aop.Framework.DynamicProxy /// /// ///

- /// This implementation creates a new instance + /// This implementation creates a new instance /// of the class. ///

///
@@ -271,7 +269,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Determines if the specified + /// Determines if the specified /// is one of those generated by this builder. /// /// The type to check. @@ -284,4 +282,4 @@ namespace Spring.Aop.Framework.DynamicProxy return type.FullName.StartsWith(PROXY_TYPE_NAME); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/DefaultAopProxyFactory.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/DefaultAopProxyFactory.cs index 052597e9..7dde4460 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/DefaultAopProxyFactory.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/DefaultAopProxyFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Reflection; using Spring.Proxy; using Spring.Util; @@ -95,4 +94,4 @@ namespace Spring.Aop.Framework.DynamicProxy return typeBuilder.BuildProxyType(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/InheritanceAopProxyTypeBuilder.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/InheritanceAopProxyTypeBuilder.cs index e0d0c701..0664da06 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/InheritanceAopProxyTypeBuilder.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/InheritanceAopProxyTypeBuilder.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Runtime.Serialization; using System.Reflection; using System.Reflection.Emit; @@ -49,7 +47,7 @@ namespace Spring.Aop.Framework.DynamicProxy /// Gets or sets a value indicating whether inherited members should be proxied. ///
/// - /// if inherited members should be proxied; + /// if inherited members should be proxied; /// otherwise, . /// public bool ProxyDeclaredMembersOnly @@ -59,7 +57,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// The proxy configuration. @@ -78,7 +76,7 @@ namespace Spring.Aop.Framework.DynamicProxy advised.TargetSource.TargetType.FullName)); } this.advised = advised; - + Name = PROXY_TYPE_NAME; TargetType = advised.TargetSource.TargetType; BaseType = TargetType; @@ -171,7 +169,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the target instance on which calls should be delegated to. /// /// The IL generator to use. @@ -181,8 +179,8 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Generates the IL instructions that pushes - /// the current + /// Generates the IL instructions that pushes + /// the current /// instance on stack. /// /// The IL generator to use. @@ -321,7 +319,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Determines if the specified + /// Determines if the specified /// is one of those generated by this builder. /// /// The type to check. @@ -334,4 +332,4 @@ namespace Spring.Aop.Framework.DynamicProxy return type.FullName.StartsWith(PROXY_TYPE_NAME); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/IntroductionProxyMethodBuilder.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/IntroductionProxyMethodBuilder.cs index 5f3155ac..eaac84b2 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/IntroductionProxyMethodBuilder.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/IntroductionProxyMethodBuilder.cs @@ -18,14 +18,13 @@ #endregion -using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; namespace Spring.Aop.Framework.DynamicProxy { /// - /// implementation + /// implementation /// that delegates method calls to introduction object. /// /// Aleksandar Seovic @@ -45,7 +44,7 @@ namespace Spring.Aop.Framework.DynamicProxy /// The implementation to use. /// /// - /// + /// /// /// index of the introduction to delegate call to public IntroductionProxyMethodBuilder( @@ -57,7 +56,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the introduction type on stack. /// /// The IL generator to use. @@ -68,7 +67,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the introduction instance on stack. /// /// The IL generator to use. diff --git a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/TargetAopProxyMethodBuilder.cs b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/TargetAopProxyMethodBuilder.cs index 3d37b3fa..44f29965 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/TargetAopProxyMethodBuilder.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/DynamicProxy/TargetAopProxyMethodBuilder.cs @@ -18,14 +18,13 @@ #endregion -using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; namespace Spring.Aop.Framework.DynamicProxy { /// - /// implementation + /// implementation /// that delegates method calls to target object. /// /// Aleksandar Seovic @@ -49,10 +48,10 @@ namespace Spring.Aop.Framework.DynamicProxy /// implemented explicitly; otherwise . /// /// - /// The dictionary to cache the list of target + /// The dictionary to cache the list of target /// s. /// - public TargetAopProxyMethodBuilder(TypeBuilder typeBuilder, + public TargetAopProxyMethodBuilder(TypeBuilder typeBuilder, IAopProxyTypeGenerator aopProxyGenerator, bool explicitImplementation, IDictionary targetMethods) : base(typeBuilder, aopProxyGenerator, explicitImplementation, targetMethods) { @@ -74,7 +73,7 @@ namespace Spring.Aop.Framework.DynamicProxy } /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the target instance on which calls should be delegated to. /// /// The IL generator to use. diff --git a/src/Spring/Spring.Aop/Aop/Framework/HashtableCachingAdvisorChainFactory.cs b/src/Spring/Spring.Aop/Aop/Framework/HashtableCachingAdvisorChainFactory.cs index bb9080ba..f15b3a36 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/HashtableCachingAdvisorChainFactory.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/HashtableCachingAdvisorChainFactory.cs @@ -18,14 +18,12 @@ #endregion -using System; -using System.Collections.Generic; using System.Reflection; using System.Runtime.Serialization; namespace Spring.Aop.Framework { - /// + /// /// implementation /// that caches advisor chains on a per-advised-method basis. /// @@ -56,7 +54,7 @@ namespace Spring.Aop.Framework /// /// The of the target object. /// - /// + /// /// The list of and /// /// instances for the supplied . @@ -108,4 +106,4 @@ namespace Spring.Aop.Framework { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/IAdvised.cs b/src/Spring/Spring.Aop/Aop/Framework/IAdvised.cs index b73fd0c0..e96ab0c4 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/IAdvised.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/IAdvised.cs @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections.Generic; - using AopAlliance.Aop; using Spring.Proxy; @@ -83,7 +80,7 @@ namespace Spring.Aop.Framework bool ProxyTargetType { get; } /// - /// Is target type attributes, method attributes, method's return type attributes + /// Is target type attributes, method attributes, method's return type attributes /// and method's parameter attributes to be proxied in addition /// to any interfaces declared on the proxied ? /// @@ -184,7 +181,7 @@ namespace Spring.Aop.Framework /// ///

/// Please be aware that Spring.NET's AOP implementation only supports - /// method advice (as encapsulated by the + /// method advice (as encapsulated by the /// interface). ///

///
@@ -202,7 +199,7 @@ namespace Spring.Aop.Framework /// ///

/// Please be aware that Spring.NET's AOP implementation only supports - /// method advice (as encapsulated by the + /// method advice (as encapsulated by the /// interface). ///

///
@@ -234,7 +231,7 @@ namespace Spring.Aop.Framework bool IsInterfaceProxied(Type intf); /// - /// Adds the advisors from the supplied + /// Adds the advisors from the supplied /// to the list of . /// /// @@ -308,7 +305,7 @@ namespace Spring.Aop.Framework /// void AddIntroduction(int index, IIntroductionAdvisor introductionAdvisor); - /// + /// /// Return the index (0 based) of the supplied /// in the interceptor /// (advice) chain for this proxy. @@ -330,7 +327,7 @@ namespace Spring.Aop.Framework /// int IndexOf(IAdvisor advisor); - /// + /// /// Return the index (0 based) of the supplied /// in the introductions /// for this proxy. @@ -458,7 +455,7 @@ namespace Spring.Aop.Framework /// void ReplaceIntroduction(int index, IIntroductionAdvisor introduction); - /// + /// /// Replaces the with the /// . /// @@ -492,4 +489,4 @@ namespace Spring.Aop.Framework /// string ToProxyConfigString(); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/IAdvisorChainFactory.cs b/src/Spring/Spring.Aop/Aop/Framework/IAdvisorChainFactory.cs index 166603f1..8e93b624 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/IAdvisorChainFactory.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/IAdvisorChainFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; using System.Reflection; #endregion @@ -48,11 +46,11 @@ namespace Spring.Aop.Framework /// /// The of the target object. /// - /// + /// /// The list of and /// /// instances for the supplied . /// IList GetInterceptors(IAdvised advised, object proxy, MethodInfo method, Type targetType); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/InterceptorAndDynamicMethodMatcher.cs b/src/Spring/Spring.Aop/Aop/Framework/InterceptorAndDynamicMethodMatcher.cs index 7f2f8410..17be5ef6 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/InterceptorAndDynamicMethodMatcher.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/InterceptorAndDynamicMethodMatcher.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - using AopAlliance.Intercept; namespace Spring.Aop.Framework @@ -44,4 +42,4 @@ namespace Spring.Aop.Framework this.MethodMatcher = methodMatcher; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/ProxyConfig.cs b/src/Spring/Spring.Aop/Aop/Framework/ProxyConfig.cs index 80776167..ca0c266b 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/ProxyConfig.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/ProxyConfig.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Runtime.Serialization; using System.Text; @@ -29,7 +28,7 @@ namespace Spring.Aop.Framework /// /// ///

- /// Note that it is no longer possible to configure subclasses to + /// Note that it is no longer possible to configure subclasses to /// expose the . /// Interceptors should normally manage their own thread locals if they /// need to make resources available to advised objects. If it is @@ -102,7 +101,7 @@ namespace Spring.Aop.Framework } ///

- /// Is target type attributes, method attributes, method's return type attributes + /// Is target type attributes, method attributes, method's return type attributes /// and method's parameter attributes to be proxied in addition /// to any interfaces declared on the proxied ? /// @@ -169,7 +168,7 @@ namespace Spring.Aop.Framework /// implementation /// could return an /// using remoting proxies, Reflection.Emit or a code generation - /// strategy. + /// strategy. ///

///
public virtual IAopProxyFactory AopProxyFactory @@ -235,4 +234,4 @@ namespace Spring.Aop.Framework return buffer.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/ProxyFactory.cs b/src/Spring/Spring.Aop/Aop/Framework/ProxyFactory.cs index da5e83ec..885ea4f6 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/ProxyFactory.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/ProxyFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using AopAlliance.Intercept; @@ -76,7 +75,7 @@ namespace Spring.Aop.Framework } /// - /// Creates a new instance of the class for the + /// Creates a new instance of the class for the /// given interface and interceptor. /// /// Convenience method for creating a proxy for a single interceptor @@ -160,4 +159,4 @@ namespace Spring.Aop.Framework return proxyFactory.GetProxy(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/ProxyFactoryObject.cs b/src/Spring/Spring.Aop/Aop/Framework/ProxyFactoryObject.cs index 7686b53e..993be28f 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/ProxyFactoryObject.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/ProxyFactoryObject.cs @@ -14,8 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; using System.Runtime.Serialization; using AopAlliance.Aop; @@ -152,7 +150,7 @@ namespace Spring.Aop.Framework private bool initialized; /// - /// Indicate whether this config shall be frozen upon creation + /// Indicate whether this config shall be frozen upon creation /// of the first proxy instance /// private bool freezeProxy; @@ -188,7 +186,7 @@ namespace Spring.Aop.Framework } /// - /// Indicate whether this config shall be frozen upon creation + /// Indicate whether this config shall be frozen upon creation /// of the first proxy instance /// public bool FreezeProxy @@ -264,7 +262,7 @@ namespace Spring.Aop.Framework set { targetName = value; } } - /// + /// /// Sets the list of and /// object names. /// @@ -288,8 +286,8 @@ namespace Spring.Aop.Framework set { interceptorNames = value; } } - /// - /// Sets the list of introduction object names. + /// + /// Sets the list of introduction object names. /// /// ///

@@ -339,7 +337,7 @@ namespace Spring.Aop.Framework } - ///

+ /// /// Creates an instance of the AOP proxy to be returned by this factory /// /// @@ -379,10 +377,10 @@ namespace Spring.Aop.Framework } /// - /// Return the of the proxy. + /// Return the of the proxy. /// /// - /// Will check the singleton instance if already created, + /// Will check the singleton instance if already created, /// else fall back to the proxy interface (if a single one), /// the target bean type, or the TargetSource's target class. /// @@ -488,7 +486,7 @@ namespace Spring.Aop.Framework /// Create the advisor (interceptor) chain. /// /// The advisors that are sourced from an ObjectFactory will be refreshed each time - /// a new prototype instance is added. Interceptors added programmatically through + /// a new prototype instance is added. Interceptors added programmatically through /// the factory API are unaffected by such changes. /// private void InitializeAdvisorChain() @@ -611,7 +609,7 @@ namespace Spring.Aop.Framework ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors(objectFactory, typeof(IAdvisor)); var globalInterceptorNames = ObjectFactoryUtils.ObjectNamesForTypeIncludingAncestors(objectFactory, typeof(IInterceptor)); - + List objects = new List(); Dictionary names = new Dictionary(); for (int i = 0; i < globalAspectNames.Count; i++) @@ -1024,4 +1022,4 @@ namespace Spring.Aop.Framework } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Framework/ReflectiveMethodInvocation.cs b/src/Spring/Spring.Aop/Aop/Framework/ReflectiveMethodInvocation.cs index 16d02018..ce91d6fb 100644 --- a/src/Spring/Spring.Aop/Aop/Framework/ReflectiveMethodInvocation.cs +++ b/src/Spring/Spring.Aop/Aop/Framework/ReflectiveMethodInvocation.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.Reflection; @@ -66,7 +65,7 @@ namespace Spring.Aop.Framework /// parameters is . /// public ReflectiveMethodInvocation( - object proxy, object target, MethodInfo method, MethodInfo proxyMethod, + object proxy, object target, MethodInfo method, MethodInfo proxyMethod, object[] arguments, Type targetType, IList interceptors) : base(proxy, target, method, arguments, targetType, interceptors) { @@ -102,7 +101,7 @@ namespace Spring.Aop.Framework try { MethodInfo targetMethodInfo = ProxyMethod ?? Method; - + AssertUtils.Understands(Target, "target", targetMethodInfo); return targetMethodInfo.Invoke(Target, Arguments); } @@ -113,8 +112,8 @@ namespace Spring.Aop.Framework } /// - /// Creates a new instance - /// from the specified and + /// Creates a new instance + /// from the specified and /// increments the interceptor index. /// /// @@ -131,4 +130,4 @@ namespace Spring.Aop.Framework return rmi; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/IAdvisors.cs b/src/Spring/Spring.Aop/Aop/IAdvisors.cs index 8a521a36..708a104e 100644 --- a/src/Spring/Spring.Aop/Aop/IAdvisors.cs +++ b/src/Spring/Spring.Aop/Aop/IAdvisors.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System.Collections.Generic; - #endregion namespace Spring.Aop @@ -41,4 +39,4 @@ namespace Spring.Aop /// IList Advisors { get; set; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/IIntroductionAdvisor.cs b/src/Spring/Spring.Aop/Aop/IIntroductionAdvisor.cs index cb7b20fa..b36f249d 100644 --- a/src/Spring/Spring.Aop/Aop/IIntroductionAdvisor.cs +++ b/src/Spring/Spring.Aop/Aop/IIntroductionAdvisor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Aop @@ -47,7 +45,7 @@ namespace Spring.Aop { /// /// Returns the filter determining which target classes this - /// introduction should apply to. + /// introduction should apply to. /// /// ///

@@ -58,7 +56,7 @@ namespace Spring.Aop /// /// /// The filter determining which target classes this introduction - /// should apply to. + /// should apply to. /// ITypeFilter TypeFilter { get; } @@ -89,4 +87,4 @@ namespace Spring.Aop /// void ValidateInterfaces(); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/IIntroductionInterceptor.cs b/src/Spring/Spring.Aop/Aop/IIntroductionInterceptor.cs index 7ab3f605..f68a9603 100644 --- a/src/Spring/Spring.Aop/Aop/IIntroductionInterceptor.cs +++ b/src/Spring/Spring.Aop/Aop/IIntroductionInterceptor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,14 +20,13 @@ #region Imports -using System; using AopAlliance.Intercept; #endregion namespace Spring.Aop { - ///

+ /// /// Subinterface of the AOP Alliance /// interface that /// allows additional interfaces to be implemented by the interceptor, and @@ -58,4 +57,4 @@ namespace Spring.Aop /// bool ImplementsInterface(Type intf); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/IMethodMatcher.cs b/src/Spring/Spring.Aop/Aop/IMethodMatcher.cs index 35fe4b3b..b1bf07f5 100644 --- a/src/Spring/Spring.Aop/Aop/IMethodMatcher.cs +++ b/src/Spring/Spring.Aop/Aop/IMethodMatcher.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; #endregion @@ -147,4 +146,4 @@ namespace Spring.Aop /// if there is a runtime match. bool Matches(MethodInfo method, Type targetType, object[] args); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/ITargetSource.cs b/src/Spring/Spring.Aop/Aop/ITargetSource.cs index 4d1ba7e7..7291ccea 100644 --- a/src/Spring/Spring.Aop/Aop/ITargetSource.cs +++ b/src/Spring/Spring.Aop/Aop/ITargetSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Aop @@ -76,4 +74,4 @@ namespace Spring.Aop /// The target object to release. void ReleaseTarget(object target); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/ITypeFilter.cs b/src/Spring/Spring.Aop/Aop/ITypeFilter.cs index c142c61d..c7117ea7 100644 --- a/src/Spring/Spring.Aop/Aop/ITypeFilter.cs +++ b/src/Spring/Spring.Aop/Aop/ITypeFilter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Aop @@ -55,4 +53,4 @@ namespace Spring.Aop /// bool Matches(Type type); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/AbstractGenericPointcutAdvisor.cs b/src/Spring/Spring.Aop/Aop/Support/AbstractGenericPointcutAdvisor.cs index c6d06dc5..b6d226d5 100644 --- a/src/Spring/Spring.Aop/Aop/Support/AbstractGenericPointcutAdvisor.cs +++ b/src/Spring/Spring.Aop/Aop/Support/AbstractGenericPointcutAdvisor.cs @@ -18,7 +18,6 @@ #endregion -using System; using AopAlliance.Aop; namespace Spring.Aop.Support @@ -47,7 +46,7 @@ namespace Spring.Aop.Support } /// - /// 2 s are considered equals, if + /// 2 s are considered equals, if /// a) their pointcuts are equal /// b) their advices are equal /// @@ -76,4 +75,4 @@ namespace Spring.Aop.Support return GetType().Name + ": advice=[" + Advice + "]"; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/AbstractPointcutAdvisor.cs b/src/Spring/Spring.Aop/Aop/Support/AbstractPointcutAdvisor.cs index 47acfff8..0e45713d 100644 --- a/src/Spring/Spring.Aop/Aop/Support/AbstractPointcutAdvisor.cs +++ b/src/Spring/Spring.Aop/Aop/Support/AbstractPointcutAdvisor.cs @@ -14,14 +14,13 @@ * limitations under the License. */ -using System; using AopAlliance.Aop; using Spring.Core; namespace Spring.Aop.Support { /// - /// Abstract base class for implementations. + /// Abstract base class for implementations. /// /// /// Can be subclassed for returning a specific pointcut/advice or a freely configurable pointcut/advice. @@ -93,7 +92,7 @@ namespace Spring.Aop.Support /// /// Determines whether the specified - /// is equal to the current . + /// is equal to the current . /// /// The advisor to compare with. /// @@ -150,4 +149,4 @@ namespace Spring.Aop.Support + 31 * Order.GetHashCode(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/AbstractRegularExpressionMethodPointcut.cs b/src/Spring/Spring.Aop/Aop/Support/AbstractRegularExpressionMethodPointcut.cs index 808e7883..c560d87c 100644 --- a/src/Spring/Spring.Aop/Aop/Support/AbstractRegularExpressionMethodPointcut.cs +++ b/src/Spring/Spring.Aop/Aop/Support/AbstractRegularExpressionMethodPointcut.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Reflection; using System.Runtime.Serialization; using System.Security.Permissions; @@ -250,4 +249,4 @@ namespace Spring.Aop.Support return true; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/AttributeMatchMethodPointcut.cs b/src/Spring/Spring.Aop/Aop/Support/AttributeMatchMethodPointcut.cs index 848efd5b..ce4d3f2b 100644 --- a/src/Spring/Spring.Aop/Aop/Support/AttributeMatchMethodPointcut.cs +++ b/src/Spring/Spring.Aop/Aop/Support/AttributeMatchMethodPointcut.cs @@ -2,13 +2,13 @@ /* * Copyright 2002-2010 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. * You may obtain a copy of the License at -* +* * http://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using System.Runtime.Serialization; @@ -30,7 +29,7 @@ using Spring.Util; namespace Spring.Aop.Support { - /// + /// /// implementation that matches methods /// that have been decorated with a specified . /// @@ -111,7 +110,7 @@ namespace Spring.Aop.Support var type = info.GetString("Attribute"); Attribute = type != null ? Type.GetType(type) : null; } - + /// public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { @@ -162,7 +161,7 @@ namespace Spring.Aop.Support } /// - /// Is the interfaces attributes of the method to be included in the search for theg + /// Is the interfaces attributes of the method to be included in the search for theg /// ? /// /// @@ -229,4 +228,4 @@ namespace Spring.Aop.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/AttributeMatchMethodPointcutAdvisor.cs b/src/Spring/Spring.Aop/Aop/Support/AttributeMatchMethodPointcutAdvisor.cs index 2ccbc600..cfe9276f 100644 --- a/src/Spring/Spring.Aop/Aop/Support/AttributeMatchMethodPointcutAdvisor.cs +++ b/src/Spring/Spring.Aop/Aop/Support/AttributeMatchMethodPointcutAdvisor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; using AopAlliance.Aop; @@ -30,7 +29,7 @@ using Spring.Core; namespace Spring.Aop.Support { - /// + /// /// Convenient class for attribute-match method pointcuts that hold an Interceptor, /// making them an Advisor. /// @@ -87,7 +86,7 @@ namespace Spring.Aop.Support Order = info.GetInt32("Order"); Advice = (IAdvice) info.GetValue("Advice", typeof(IAdvice)); } - + /// public override void GetObjectData(SerializationInfo info, StreamingContext context) { @@ -151,4 +150,4 @@ namespace Spring.Aop.Support get { return this; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/AttributeMatchingPointcut.cs b/src/Spring/Spring.Aop/Aop/Support/AttributeMatchingPointcut.cs index 04a6d7ec..66adfacb 100644 --- a/src/Spring/Spring.Aop/Aop/Support/AttributeMatchingPointcut.cs +++ b/src/Spring/Spring.Aop/Aop/Support/AttributeMatchingPointcut.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Util; namespace Spring.Aop.Support @@ -119,4 +118,4 @@ namespace Spring.Aop.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/AttributeMethodMatcher.cs b/src/Spring/Spring.Aop/Aop/Support/AttributeMethodMatcher.cs index 2970841b..0162fc4a 100644 --- a/src/Spring/Spring.Aop/Aop/Support/AttributeMethodMatcher.cs +++ b/src/Spring/Spring.Aop/Aop/Support/AttributeMethodMatcher.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Reflection; using System.Runtime.Serialization; @@ -41,7 +40,7 @@ namespace Spring.Aop.Support /// - /// Initializes a new instance of the class for the + /// Initializes a new instance of the class for the /// given atribute type. /// /// Type of the attribute to look for. @@ -57,7 +56,7 @@ namespace Spring.Aop.Support var type = info.GetString("AttributeType"); attributeType = type != null ? Type.GetType(type) : null; } - + /// public void GetObjectData(SerializationInfo info, StreamingContext context) { @@ -90,7 +89,7 @@ namespace Spring.Aop.Support } else { - + Type[] parameterTypes = ReflectionUtils.GetParameterTypes(method); // Also check whether the attribute is defined on a method implemented from an interface. @@ -105,7 +104,7 @@ namespace Spring.Aop.Support return true; } } - + return false; } } @@ -122,4 +121,4 @@ namespace Spring.Aop.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/AttributeTypeFilter.cs b/src/Spring/Spring.Aop/Aop/Support/AttributeTypeFilter.cs index 65a86099..acd7f7e8 100644 --- a/src/Spring/Spring.Aop/Aop/Support/AttributeTypeFilter.cs +++ b/src/Spring/Spring.Aop/Aop/Support/AttributeTypeFilter.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Util; namespace Spring.Aop.Support @@ -51,12 +50,12 @@ namespace Spring.Aop.Support /// /// Initializes a new instance of the class for the - /// given attribute type. + /// given attribute type. /// /// Type of the attribute to look for. public AttributeTypeFilter(Type attributeType) : this(attributeType, false) { - + } /// @@ -94,15 +93,15 @@ namespace Spring.Aop.Support { if (checkInherited) { - return AttributeUtils.FindAttribute(type, attributeType) != null; + return AttributeUtils.FindAttribute(type, attributeType) != null; } else { object[] atts = type.GetCustomAttributes(attributeType, false); return ArrayUtils.HasLength(atts); - } + } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/ComposablePointcut.cs b/src/Spring/Spring.Aop/Aop/Support/ComposablePointcut.cs index fab2ba1a..d97cebca 100644 --- a/src/Spring/Spring.Aop/Aop/Support/ComposablePointcut.cs +++ b/src/Spring/Spring.Aop/Aop/Support/ComposablePointcut.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Aop.Support @@ -44,7 +42,7 @@ namespace Spring.Aop.Support /// There is no Union() method on this class. Use the /// method for such functionality. ///

- /// + /// /// Rod Johnson /// Aleksandar Seovic (.NET) [Serializable] @@ -54,7 +52,7 @@ namespace Spring.Aop.Support private IMethodMatcher _methodMatcher; /// - /// Creates a new instance of the + /// Creates a new instance of the /// class /// that matches all the methods on all s. /// @@ -65,7 +63,7 @@ namespace Spring.Aop.Support } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class /// that uses the supplied and /// . @@ -172,4 +170,4 @@ namespace Spring.Aop.Support return this; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/ControlFlowPointcut.cs b/src/Spring/Spring.Aop/Aop/Support/ControlFlowPointcut.cs index 88ec1c7c..f3725bcc 100644 --- a/src/Spring/Spring.Aop/Aop/Support/ControlFlowPointcut.cs +++ b/src/Spring/Spring.Aop/Aop/Support/ControlFlowPointcut.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Reflection; using System.Runtime.Serialization; @@ -84,7 +83,7 @@ namespace Spring.Aop.Support _methodName = info.GetString("MethodName"); _evaluationCount = info.GetInt32("EvaluationCount"); } - + /// public void GetObjectData(SerializationInfo info, StreamingContext context) { @@ -235,4 +234,4 @@ namespace Spring.Aop.Support : cflow.Under(_type); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/DefaultIntroductionAdvisor.cs b/src/Spring/Spring.Aop/Aop/Support/DefaultIntroductionAdvisor.cs index 2a5f7e09..44de008d 100644 --- a/src/Spring/Spring.Aop/Aop/Support/DefaultIntroductionAdvisor.cs +++ b/src/Spring/Spring.Aop/Aop/Support/DefaultIntroductionAdvisor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using AopAlliance.Aop; using Spring.Collections; @@ -103,11 +102,11 @@ namespace Spring.Aop.Support /// /// Returns the filter determining which target classes this - /// introduction should apply to. + /// introduction should apply to. /// /// /// The filter determining which target classes this introduction - /// should apply to. + /// should apply to. /// public virtual ITypeFilter TypeFilter { @@ -170,7 +169,7 @@ namespace Spring.Aop.Support /// public virtual void AddInterface(Type intf) { - if(intf != null) + if(intf != null) { BailIfNotAnInterfaceType(intf); _interfaces.Add(intf); @@ -277,4 +276,4 @@ namespace Spring.Aop.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/DefaultPointcutAdvisor.cs b/src/Spring/Spring.Aop/Aop/Support/DefaultPointcutAdvisor.cs index 88d8027d..5ab0f752 100644 --- a/src/Spring/Spring.Aop/Aop/Support/DefaultPointcutAdvisor.cs +++ b/src/Spring/Spring.Aop/Aop/Support/DefaultPointcutAdvisor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using AopAlliance.Aop; #endregion @@ -93,7 +92,7 @@ namespace Spring.Aop.Support /// - /// 2 s are considered equal, if + /// 2 s are considered equal, if /// a) their pointcuts are equal /// b) their advices are equal /// @@ -122,4 +121,4 @@ namespace Spring.Aop.Support return GetType().Name + ": pointcut=[" + pointcut + "] advice=[" + Advice + "]"; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/DynamicMethodMatcher.cs b/src/Spring/Spring.Aop/Aop/Support/DynamicMethodMatcher.cs index 4f72ced2..4ff9ab31 100644 --- a/src/Spring/Spring.Aop/Aop/Support/DynamicMethodMatcher.cs +++ b/src/Spring/Spring.Aop/Aop/Support/DynamicMethodMatcher.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; #endregion @@ -111,4 +110,4 @@ namespace Spring.Aop.Support /// if there is a runtime match. public abstract bool Matches(MethodInfo method, Type targetType, object[] args); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/DynamicMethodMatcherPointcutAdvisor.cs b/src/Spring/Spring.Aop/Aop/Support/DynamicMethodMatcherPointcutAdvisor.cs index 03e3ec2f..e30a73f9 100644 --- a/src/Spring/Spring.Aop/Aop/Support/DynamicMethodMatcherPointcutAdvisor.cs +++ b/src/Spring/Spring.Aop/Aop/Support/DynamicMethodMatcherPointcutAdvisor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using AopAlliance.Aop; using Spring.Core; @@ -172,4 +171,4 @@ namespace Spring.Aop.Support get { return this; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/MethodMatchers.cs b/src/Spring/Spring.Aop/Aop/Support/MethodMatchers.cs index 84e8e61d..51ebbae1 100644 --- a/src/Spring/Spring.Aop/Aop/Support/MethodMatchers.cs +++ b/src/Spring/Spring.Aop/Aop/Support/MethodMatchers.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; #endregion @@ -48,7 +47,7 @@ namespace Spring.Aop.Support /// /// ///

- /// The newly created matcher will match all the methods that either of the two + /// The newly created matcher will match all the methods that either of the two /// supplied matchers would match. ///

///
@@ -177,4 +176,4 @@ namespace Spring.Aop.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/NameMatchMethodPointcut.cs b/src/Spring/Spring.Aop/Aop/Support/NameMatchMethodPointcut.cs index 5018ebdf..cadcfd2c 100644 --- a/src/Spring/Spring.Aop/Aop/Support/NameMatchMethodPointcut.cs +++ b/src/Spring/Spring.Aop/Aop/Support/NameMatchMethodPointcut.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using Spring.Util; @@ -28,7 +27,7 @@ using Spring.Util; namespace Spring.Aop.Support { - /// + /// /// Pointcut object for simple method name matches, useful as an alternative to pure /// regular expression based patterns. /// @@ -118,4 +117,4 @@ namespace Spring.Aop.Support return PatternMatchUtils.SimpleMatch(mappedName, methodName); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/NameMatchMethodPointcutAdvisor.cs b/src/Spring/Spring.Aop/Aop/Support/NameMatchMethodPointcutAdvisor.cs index 4e56dc8f..0d021a1b 100644 --- a/src/Spring/Spring.Aop/Aop/Support/NameMatchMethodPointcutAdvisor.cs +++ b/src/Spring/Spring.Aop/Aop/Support/NameMatchMethodPointcutAdvisor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - using AopAlliance.Aop; using Spring.Util; @@ -127,4 +125,4 @@ namespace Spring.Aop.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/Pointcuts.cs b/src/Spring/Spring.Aop/Aop/Support/Pointcuts.cs index 8d43c3f2..03f947e1 100644 --- a/src/Spring/Spring.Aop/Aop/Support/Pointcuts.cs +++ b/src/Spring/Spring.Aop/Aop/Support/Pointcuts.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,14 +20,13 @@ #region Imports -using System; using System.Reflection; #endregion namespace Spring.Aop.Support { - /// + /// /// Various related utility methods. /// /// @@ -87,7 +86,7 @@ namespace Spring.Aop.Support public static bool Matches( IPointcut pointcut, MethodInfo method, Type targetType, object[] args) { - if(pointcut != null) + if(pointcut != null) { if (pointcut == TruePointcut.True) { @@ -142,4 +141,4 @@ namespace Spring.Aop.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/RegularExpressionMethodPointcutAdvisor.cs b/src/Spring/Spring.Aop/Aop/Support/RegularExpressionMethodPointcutAdvisor.cs index da837609..b08fb642 100644 --- a/src/Spring/Spring.Aop/Aop/Support/RegularExpressionMethodPointcutAdvisor.cs +++ b/src/Spring/Spring.Aop/Aop/Support/RegularExpressionMethodPointcutAdvisor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using AopAlliance.Aop; using Spring.Util; @@ -120,8 +119,8 @@ namespace Spring.Aop.Support public override IPointcut Pointcut { get { return pointcut; } - set { - AssertUtils.AssertArgumentType(value, "pointcut", typeof(AbstractRegularExpressionMethodPointcut), + set { + AssertUtils.AssertArgumentType(value, "pointcut", typeof(AbstractRegularExpressionMethodPointcut), "Pointcut most be compatible with type AbstractRegularExpressionMethodPointuct"); pointcut = value as AbstractRegularExpressionMethodPointcut; } @@ -137,4 +136,4 @@ namespace Spring.Aop.Support pointcut = new SdkRegularExpressionMethodPointcut(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/RootTypeFilter.cs b/src/Spring/Spring.Aop/Aop/Support/RootTypeFilter.cs index 401bcf97..b5112497 100644 --- a/src/Spring/Spring.Aop/Aop/Support/RootTypeFilter.cs +++ b/src/Spring/Spring.Aop/Aop/Support/RootTypeFilter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using Spring.Util; #endregion @@ -76,4 +75,4 @@ namespace Spring.Aop.Support return _rootType.IsAssignableFrom(type); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/SdkRegularExpressionMethodPointcut.cs b/src/Spring/Spring.Aop/Aop/Support/SdkRegularExpressionMethodPointcut.cs index 3d23b50c..02c3c678 100644 --- a/src/Spring/Spring.Aop/Aop/Support/SdkRegularExpressionMethodPointcut.cs +++ b/src/Spring/Spring.Aop/Aop/Support/SdkRegularExpressionMethodPointcut.cs @@ -1,12 +1,12 @@ /* * Copyright 2002-2010 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Runtime.Serialization; using System.Text.RegularExpressions; using Common.Logging; @@ -78,7 +77,7 @@ namespace Spring.Aop.Support /// regular expressions that don't have options explicitly set. /// /// - /// Default options that should be used by regular expressions + /// Default options that should be used by regular expressions /// that don't have options explicitly set. /// public RegexOptions DefaultOptions @@ -168,4 +167,4 @@ namespace Spring.Aop.Support return matched; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/StaticMethodMatcher.cs b/src/Spring/Spring.Aop/Aop/Support/StaticMethodMatcher.cs index 6bf5400d..a19c981b 100644 --- a/src/Spring/Spring.Aop/Aop/Support/StaticMethodMatcher.cs +++ b/src/Spring/Spring.Aop/Aop/Support/StaticMethodMatcher.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using System.Runtime.Serialization; @@ -28,9 +27,9 @@ using System.Runtime.Serialization; namespace Spring.Aop.Support { - /// + /// /// Convenient abstract superclass for static method matchers that don't care - /// about arguments at runtime. + /// about arguments at runtime. /// /// Rod Johnson /// Aleksandar Seovic (.NET) @@ -113,4 +112,4 @@ namespace Spring.Aop.Support { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/StaticMethodMatcherPointcut.cs b/src/Spring/Spring.Aop/Aop/Support/StaticMethodMatcherPointcut.cs index ed9743ba..62148d8e 100644 --- a/src/Spring/Spring.Aop/Aop/Support/StaticMethodMatcherPointcut.cs +++ b/src/Spring/Spring.Aop/Aop/Support/StaticMethodMatcherPointcut.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,11 +18,9 @@ #endregion -using System; - namespace Spring.Aop.Support { - /// + /// /// Convenient superclass when one wants to force subclasses to /// implement the interface /// but subclasses will still want to be pointcuts. @@ -80,4 +78,4 @@ namespace Spring.Aop.Support get { return this; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/StaticMethodMatcherPointcutAdvisor.cs b/src/Spring/Spring.Aop/Aop/Support/StaticMethodMatcherPointcutAdvisor.cs index d3b03b7b..06286ff1 100644 --- a/src/Spring/Spring.Aop/Aop/Support/StaticMethodMatcherPointcutAdvisor.cs +++ b/src/Spring/Spring.Aop/Aop/Support/StaticMethodMatcherPointcutAdvisor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using AopAlliance.Aop; using Spring.Core; @@ -130,4 +129,4 @@ namespace Spring.Aop.Support get { return this; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/TypeFilters.cs b/src/Spring/Spring.Aop/Aop/Support/TypeFilters.cs index 92cec090..8ad15a88 100644 --- a/src/Spring/Spring.Aop/Aop/Support/TypeFilters.cs +++ b/src/Spring/Spring.Aop/Aop/Support/TypeFilters.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Aop.Support @@ -154,4 +152,4 @@ namespace Spring.Aop.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/TypeNameTypeFilter.cs b/src/Spring/Spring.Aop/Aop/Support/TypeNameTypeFilter.cs index 4121a88a..43463c51 100644 --- a/src/Spring/Spring.Aop/Aop/Support/TypeNameTypeFilter.cs +++ b/src/Spring/Spring.Aop/Aop/Support/TypeNameTypeFilter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using Spring.Util; #endregion @@ -72,4 +71,4 @@ namespace Spring.Aop.Support return PatternMatchUtils.SimpleMatch(_typeNamePatterns, type.FullName); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Support/UnionPointcut.cs b/src/Spring/Spring.Aop/Aop/Support/UnionPointcut.cs index a9b1fdcc..f21fb147 100644 --- a/src/Spring/Spring.Aop/Aop/Support/UnionPointcut.cs +++ b/src/Spring/Spring.Aop/Aop/Support/UnionPointcut.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,14 +20,13 @@ #region Imports -using System; using System.Reflection; #endregion namespace Spring.Aop.Support { - /// + /// /// A union. /// /// @@ -121,4 +120,4 @@ namespace Spring.Aop.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Target/AbstractPoolingTargetSource.cs b/src/Spring/Spring.Aop/Aop/Target/AbstractPoolingTargetSource.cs index 7e3e017f..1ada25f6 100644 --- a/src/Spring/Spring.Aop/Aop/Target/AbstractPoolingTargetSource.cs +++ b/src/Spring/Spring.Aop/Aop/Target/AbstractPoolingTargetSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using AopAlliance.Aop; using Spring.Aop.Support; using Spring.Objects; @@ -36,7 +35,7 @@ namespace Spring.Aop.Target /// ///

/// Maintains a pool of target instances, acquiring and releasing a target - /// object from the pool for each method invocation. + /// object from the pool for each method invocation. ///

///

/// This class is independent of pooling technology. @@ -162,7 +161,7 @@ namespace Spring.Aop.Target } } } - + ///

/// Create the pool. /// @@ -193,11 +192,11 @@ namespace Spring.Aop.Target ///
/// ///

- /// Disposes of the pool. + /// Disposes of the pool. ///

///
public abstract void Dispose(); private int _maxSize; } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Target/AbstractPrototypeTargetSource.cs b/src/Spring/Spring.Aop/Aop/Target/AbstractPrototypeTargetSource.cs index 20a73fd5..870067be 100644 --- a/src/Spring/Spring.Aop/Aop/Target/AbstractPrototypeTargetSource.cs +++ b/src/Spring/Spring.Aop/Aop/Target/AbstractPrototypeTargetSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - using Common.Logging; using Spring.Objects.Factory; @@ -82,7 +80,7 @@ namespace Spring.Aop.Target public virtual string TargetObjectName { get { return _targetObjectName; } - set { + set { _targetObjectName = value; } } @@ -147,7 +145,7 @@ namespace Spring.Aop.Target } #endregion - + _targetType = _owningObjectFactory.GetType(TargetObjectName); } } @@ -251,4 +249,4 @@ namespace Spring.Aop.Target #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Target/EmptyTargetSource.cs b/src/Spring/Spring.Aop/Aop/Target/EmptyTargetSource.cs index ce3ca769..87b81c47 100644 --- a/src/Spring/Spring.Aop/Aop/Target/EmptyTargetSource.cs +++ b/src/Spring/Spring.Aop/Aop/Target/EmptyTargetSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; using System.Security.Permissions; diff --git a/src/Spring/Spring.Aop/Aop/Target/HotSwappableTargetSource.cs b/src/Spring/Spring.Aop/Aop/Target/HotSwappableTargetSource.cs index 5777f281..25a659bf 100644 --- a/src/Spring/Spring.Aop/Aop/Target/HotSwappableTargetSource.cs +++ b/src/Spring/Spring.Aop/Aop/Target/HotSwappableTargetSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using Spring.Util; #endregion @@ -174,4 +173,4 @@ namespace Spring.Aop.Target (_target == null ? 0 : _target.GetHashCode()); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Target/PrototypeTargetSource.cs b/src/Spring/Spring.Aop/Aop/Target/PrototypeTargetSource.cs index c142631c..0e3f49de 100644 --- a/src/Spring/Spring.Aop/Aop/Target/PrototypeTargetSource.cs +++ b/src/Spring/Spring.Aop/Aop/Target/PrototypeTargetSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Aop.Target @@ -75,4 +73,4 @@ namespace Spring.Aop.Target get { return false; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Target/SimplePoolTargetSource.cs b/src/Spring/Spring.Aop/Aop/Target/SimplePoolTargetSource.cs index 362265cd..4b0a8eea 100644 --- a/src/Spring/Spring.Aop/Aop/Target/SimplePoolTargetSource.cs +++ b/src/Spring/Spring.Aop/Aop/Target/SimplePoolTargetSource.cs @@ -20,7 +20,6 @@ #region Imports -using System; using Spring.Objects.Factory; using Spring.Pool; using Spring.Pool.Support; @@ -204,4 +203,4 @@ namespace Spring.Aop.Target { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Target/SingletonTargetSource.cs b/src/Spring/Spring.Aop/Aop/Target/SingletonTargetSource.cs index 96db4197..e8f3a29b 100644 --- a/src/Spring/Spring.Aop/Aop/Target/SingletonTargetSource.cs +++ b/src/Spring/Spring.Aop/Aop/Target/SingletonTargetSource.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Runtime.Serialization; using Spring.Util; @@ -124,7 +123,7 @@ namespace Spring.Aop.Target /// The target object to release. public void ReleaseTarget(object target) { - + } /// @@ -147,7 +146,7 @@ namespace Spring.Aop.Target /// /// Determines whether the specified - /// is equal to the current . + /// is equal to the current . /// /// The target source to compare with. /// @@ -181,4 +180,4 @@ namespace Spring.Aop.Target (target == null ? 0 : target.GetHashCode()); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/Target/ThreadLocalTargetSource.cs b/src/Spring/Spring.Aop/Aop/Target/ThreadLocalTargetSource.cs index 6b03f9e2..4ee1d7fe 100644 --- a/src/Spring/Spring.Aop/Aop/Target/ThreadLocalTargetSource.cs +++ b/src/Spring/Spring.Aop/Aop/Target/ThreadLocalTargetSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,9 +20,6 @@ #region Imports -using System; -using System.Threading; - using AopAlliance.Intercept; using Spring.Aop.Support; @@ -49,7 +46,7 @@ namespace Spring.Aop.Target /// AOP proxy. ///

///

- /// This class act both as an introduction and as an interceptor, so it + /// This class act both as an introduction and as an interceptor, so it /// should be added twice, once as an introduction and once as an /// interceptor. ///

@@ -241,4 +238,4 @@ namespace Spring.Aop.Target #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aop/TrueMethodMatcher.cs b/src/Spring/Spring.Aop/Aop/TrueMethodMatcher.cs index 0532e6fa..b5b00530 100644 --- a/src/Spring/Spring.Aop/Aop/TrueMethodMatcher.cs +++ b/src/Spring/Spring.Aop/Aop/TrueMethodMatcher.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using System.Runtime.Serialization; using System.Security.Permissions; diff --git a/src/Spring/Spring.Aop/Aop/TruePointcut.cs b/src/Spring/Spring.Aop/Aop/TruePointcut.cs index d108b661..cf439ca3 100644 --- a/src/Spring/Spring.Aop/Aop/TruePointcut.cs +++ b/src/Spring/Spring.Aop/Aop/TruePointcut.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; using System.Security.Permissions; diff --git a/src/Spring/Spring.Aop/Aop/TrueTypeFilter.cs b/src/Spring/Spring.Aop/Aop/TrueTypeFilter.cs index b130cf9c..8539a134 100644 --- a/src/Spring/Spring.Aop/Aop/TrueTypeFilter.cs +++ b/src/Spring/Spring.Aop/Aop/TrueTypeFilter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; using System.Security.Permissions; @@ -109,4 +108,4 @@ namespace Spring.Aop } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/AopAlliance/Aop/AspectException.cs b/src/Spring/Spring.Aop/AopAlliance/Aop/AspectException.cs index 7fc3c31e..b399741a 100644 --- a/src/Spring/Spring.Aop/AopAlliance/Aop/AspectException.cs +++ b/src/Spring/Spring.Aop/AopAlliance/Aop/AspectException.cs @@ -11,7 +11,6 @@ #region Imports -using System; using System.Runtime.Serialization; #endregion @@ -65,4 +64,4 @@ namespace AopAlliance.Aop { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/AopAlliance/Intercept/IMethodInvocation.cs b/src/Spring/Spring.Aop/AopAlliance/Intercept/IMethodInvocation.cs index 689ce09e..0d88f632 100644 --- a/src/Spring/Spring.Aop/AopAlliance/Intercept/IMethodInvocation.cs +++ b/src/Spring/Spring.Aop/AopAlliance/Intercept/IMethodInvocation.cs @@ -2,16 +2,15 @@ /* * All the source code provided by AOP Alliance is Public Domain. - * + * * http://aopalliance.sourceforge.net/ - * + * */ #endregion #region Imports -using System; using System.Reflection; #endregion @@ -74,4 +73,4 @@ namespace AopAlliance.Intercept Type TargetType { get; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/AbstractExceptionHandler.cs b/src/Spring/Spring.Aop/Aspects/AbstractExceptionHandler.cs index 29a52edb..a69ef046 100644 --- a/src/Spring/Spring.Aop/Aspects/AbstractExceptionHandler.cs +++ b/src/Spring/Spring.Aop/Aspects/AbstractExceptionHandler.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using Common.Logging; using Spring.Expressions; @@ -150,7 +148,7 @@ namespace Spring.Aspects } } if (ConstraintExpressionText != null) - { + { bool canProcess; try { @@ -179,4 +177,4 @@ namespace Spring.Aspects #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/AbstractExceptionHandlerAdvice.cs b/src/Spring/Spring.Aop/Aspects/AbstractExceptionHandlerAdvice.cs index b8bc1b0f..8aa30e13 100644 --- a/src/Spring/Spring.Aop/Aspects/AbstractExceptionHandlerAdvice.cs +++ b/src/Spring/Spring.Aop/Aspects/AbstractExceptionHandlerAdvice.cs @@ -18,8 +18,7 @@ #endregion -using System; -using System.Runtime.Serialization; +using System.Runtime.Serialization; using System.Text.RegularExpressions; using AopAlliance.Intercept; using Spring.Objects.Factory; @@ -28,12 +27,12 @@ using Spring.Util; namespace Spring.Aspects { /// - /// This is + /// This is /// /// /// /// - /// Mark Pollack + /// Mark Pollack [Serializable] public abstract class AbstractExceptionHandlerAdvice : IMethodInterceptor, IInitializingObject, IDeserializationCallback { @@ -62,7 +61,7 @@ namespace Spring.Aspects /// ///

/// Polite implementations would certainly like to invoke - /// . + /// . ///

///
/// @@ -154,22 +153,22 @@ namespace Spring.Aspects RegexOptions options = ((RegexOptions.IgnorePatternWhitespace | RegexOptions.Multiline) | RegexOptions.IgnoreCase); Regex reg = new Regex(regexString, options); return reg.Match(adviceExpressionString); - } - - #region Serialization - - void IDeserializationCallback.OnDeserialization(object sender) - { - OnDeserialization(sender); - } - - /// - /// Override in case you need to initialized non-serialized fields on deserialization. - /// - protected virtual void OnDeserialization(object sender) - { } - - #endregion + + #region Serialization + + void IDeserializationCallback.OnDeserialization(object sender) + { + OnDeserialization(sender); + } + + /// + /// Override in case you need to initialized non-serialized fields on deserialization. + /// + protected virtual void OnDeserialization(object sender) + { + } + + #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Cache/BaseCacheAdvice.cs b/src/Spring/Spring.Aop/Aspects/Cache/BaseCacheAdvice.cs index bd1ab35e..f9f6c18f 100644 --- a/src/Spring/Spring.Aop/Aspects/Cache/BaseCacheAdvice.cs +++ b/src/Spring/Spring.Aop/Aspects/Cache/BaseCacheAdvice.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; using System.Reflection; using Common.Logging; @@ -94,7 +92,7 @@ namespace Spring.Aspects.Cache } /// - /// Prepares variables for expression evaluation by packaging all + /// Prepares variables for expression evaluation by packaging all /// method arguments into a dictionary, keyed by argument name. /// /// @@ -142,7 +140,7 @@ namespace Spring.Aspects.Cache /// /// If the SpEL expression could not be successfuly resolved to a boolean. /// - protected static bool EvalCondition(string condition, + protected static bool EvalCondition(string condition, IExpression conditionExpression, object context, IDictionary variables) { if (conditionExpression == null) @@ -159,7 +157,7 @@ namespace Spring.Aspects.Cache else { throw new InvalidOperationException(String.Format( - "The SpEL expression '{0}' could not be successfuly resolved to a boolean.", + "The SpEL expression '{0}' could not be successfuly resolved to a boolean.", condition)); } } @@ -205,4 +203,4 @@ namespace Spring.Aspects.Cache return attributes; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Cache/CacheAspect.cs b/src/Spring/Spring.Aop/Aspects/Cache/CacheAspect.cs index eda880bf..34b35cc4 100644 --- a/src/Spring/Spring.Aop/Aspects/Cache/CacheAspect.cs +++ b/src/Spring/Spring.Aop/Aspects/Cache/CacheAspect.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,9 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; - using Spring.Aop; using Spring.Context; @@ -104,4 +101,4 @@ namespace Spring.Aspects.Cache } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Cache/CacheParameterAdvice.cs b/src/Spring/Spring.Aop/Aspects/Cache/CacheParameterAdvice.cs index e387bcdc..d7b8b932 100644 --- a/src/Spring/Spring.Aop/Aspects/Cache/CacheParameterAdvice.cs +++ b/src/Spring/Spring.Aop/Aspects/Cache/CacheParameterAdvice.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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,7 +21,6 @@ #region Imports using System.Collections; -using System.Collections.Generic; using System.Reflection; using Spring.Aop; @@ -37,11 +36,11 @@ namespace Spring.Aspects.Cache ///
/// ///

- /// This advice can be used to cache the parameter of the method. + /// This advice can be used to cache the parameter of the method. ///

///

- /// Information that determines where, how and for how long the return value - /// will be cached are retrieved from the s + /// Information that determines where, how and for how long the return value + /// will be cached are retrieved from the s /// that are defined on the pointcut. ///

///

@@ -151,4 +150,4 @@ namespace Spring.Aspects.Cache } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Cache/CacheParameterAdvisor.cs b/src/Spring/Spring.Aop/Aspects/Cache/CacheParameterAdvisor.cs index 48335baf..ec42fc35 100644 --- a/src/Spring/Spring.Aop/Aspects/Cache/CacheParameterAdvisor.cs +++ b/src/Spring/Spring.Aop/Aspects/Cache/CacheParameterAdvisor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using Spring.Aop.Support; using Spring.Caching; @@ -108,4 +107,4 @@ namespace Spring.Aspects.Cache return false; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Cache/CacheResultAdvice.cs b/src/Spring/Spring.Aop/Aspects/Cache/CacheResultAdvice.cs index ecbefe14..2f1c3085 100644 --- a/src/Spring/Spring.Aop/Aspects/Cache/CacheResultAdvice.cs +++ b/src/Spring/Spring.Aop/Aspects/Cache/CacheResultAdvice.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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,14 +21,12 @@ #region Imports using System.Collections; -using System.Collections.Generic; using System.Reflection; using AopAlliance.Intercept; using Spring.Caching; using Spring.Util; -using System; using System.Collections.Concurrent; #endregion @@ -40,11 +38,11 @@ namespace Spring.Aspects.Cache ///

/// ///

- /// This advice can be used to cache the return value of the method. + /// This advice can be used to cache the return value of the method. ///

///

- /// Parameters that determine where, how and for how long the return value - /// will be cached are retrieved from the and/or + /// Parameters that determine where, how and for how long the return value + /// will be cached are retrieved from the and/or /// that are defined on the pointcut. ///

///
@@ -159,7 +157,7 @@ namespace Spring.Aspects.Cache /// /// /// Attribute specifying where and how to cache return value. Can be null, - /// in which case no caching of the result as a whole will be performed + /// in which case no caching of the result as a whole will be performed /// (if the result is collection, individual items could still be cached separately). /// /// @@ -178,13 +176,13 @@ namespace Spring.Aspects.Cache #region Instrumentation bool isLogDebugEnabled = logger.IsDebugEnabled; #endregion - - AssertUtils.ArgumentNotNull(resultInfo.KeyExpression, "Key", + + AssertUtils.ArgumentNotNull(resultInfo.KeyExpression, "Key", "The cache attribute is missing the key definition."); object returnValue = null; object resultKey = resultInfo.KeyExpression.GetValue(null, vars); - + ICache cache = GetCache(resultInfo.CacheName); returnValue = cache.Get(resultKey); cacheHit = (returnValue != null); @@ -207,7 +205,7 @@ namespace Spring.Aspects.Cache cacheHit = false; returnValue = null; } - + if (!cacheHit) { #region Instrumentation @@ -262,7 +260,7 @@ namespace Spring.Aspects.Cache { foreach (CacheResultItemsAttribute itemInfo in itemInfoArray) { - AssertUtils.ArgumentNotNull(itemInfo.KeyExpression, "Key", + AssertUtils.ArgumentNotNull(itemInfo.KeyExpression, "Key", "The cache attribute is missing the key definition."); ICache cache = GetCache(itemInfo.CacheName); @@ -287,4 +285,4 @@ namespace Spring.Aspects.Cache } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Cache/CacheResultAdvisor.cs b/src/Spring/Spring.Aop/Aspects/Cache/CacheResultAdvisor.cs index bd063b78..0c79b9a6 100644 --- a/src/Spring/Spring.Aop/Aspects/Cache/CacheResultAdvisor.cs +++ b/src/Spring/Spring.Aop/Aspects/Cache/CacheResultAdvisor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using Spring.Aop.Support; using Spring.Caching; using Spring.Context; @@ -77,8 +76,8 @@ namespace Spring.Aspects.Cache } /// - /// Returns true if either or - /// is applied to the + /// Returns true if either or + /// is applied to the /// . /// /// @@ -88,8 +87,8 @@ namespace Spring.Aspects.Cache /// Type of target object. /// /// - /// true if either or - /// is applied to the + /// true if either or + /// is applied to the /// ; false otherwise. /// public override bool Matches(System.Reflection.MethodInfo method, Type targetType) @@ -98,4 +97,4 @@ namespace Spring.Aspects.Cache || method.IsDefined(typeof (CacheResultItemsAttribute), Inherit); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Cache/InvalidateCacheAdvice.cs b/src/Spring/Spring.Aop/Aspects/Cache/InvalidateCacheAdvice.cs index b66cabb7..55837094 100644 --- a/src/Spring/Spring.Aop/Aspects/Cache/InvalidateCacheAdvice.cs +++ b/src/Spring/Spring.Aop/Aspects/Cache/InvalidateCacheAdvice.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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,7 +21,6 @@ #region Imports using System.Collections; -using System.Collections.Generic; using System.Reflection; using Spring.Aop; @@ -36,17 +35,17 @@ namespace Spring.Aspects.Cache ///
/// ///

- /// This advice can be used to evict items from the cache. + /// This advice can be used to evict items from the cache. ///

///

/// Information that determines which items should be evicted and from which cache - /// are retrieved from the s that are defined + /// are retrieved from the s that are defined /// on the pointcut. ///

///

- /// Items are evicted *after* target method is invoked. Return value of the method, + /// Items are evicted *after* target method is invoked. Return value of the method, /// as well as method arguments, can be used to determine a list of keys for the items - /// that should be evicted (return value will be passed as a context for + /// that should be evicted (return value will be passed as a context for /// expression evaluation, and method /// arguments will be passed as variables, keyed by argument name). ///

@@ -149,4 +148,4 @@ namespace Spring.Aspects.Cache } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Exceptions/ExceptionHandlerAdvice.cs b/src/Spring/Spring.Aop/Aspects/Exceptions/ExceptionHandlerAdvice.cs index 4a34a6c3..b2a23229 100644 --- a/src/Spring/Spring.Aop/Aspects/Exceptions/ExceptionHandlerAdvice.cs +++ b/src/Spring/Spring.Aop/Aspects/Exceptions/ExceptionHandlerAdvice.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; using AopAlliance.Intercept; @@ -67,7 +65,7 @@ namespace Spring.Aspects.Exceptions /// /// /// - /// + /// ///
/// Mark Pollack [Serializable] @@ -128,16 +126,16 @@ namespace Spring.Aspects.Exceptions /// /// Gets the exception handler dictionary. Allows for registration of a specific handler where the key - /// is the action type. This makes configuration of a custom exception handler easier, for example + /// is the action type. This makes configuration of a custom exception handler easier, for example /// LogExceptionHandler, in that only 'user friendly' properties such as LogName, etc., need to be configured - /// and not 'user unfriendly' properties such as ConstraintExpressionText and ActionExpressionText. + /// and not 'user unfriendly' properties such as ConstraintExpressionText and ActionExpressionText. /// /// The exception handler dictionary. public ExceptionHandlerTable ExceptionHandlerDictionary { get { return exceptionHandlerTable; } } - + #endregion #region IMethodInterceptor implementation @@ -149,7 +147,7 @@ namespace Spring.Aspects.Exceptions /// ///

/// Polite implementations would certainly like to invoke - /// . + /// . ///

///
/// @@ -193,7 +191,7 @@ namespace Spring.Aspects.Exceptions } //only here if we only are swallowing, returning alternative value, no matching handler was found. - + // no matching handler. if (returnVal.Equals("nomatch")) { @@ -207,7 +205,7 @@ namespace Spring.Aspects.Exceptions return returnVal; } else - { + { Type returnType = invocation.Method.ReturnType; return returnType.IsValueType && !returnType.Equals(typeof(void))? Activator.CreateInstance(returnType) : null; } @@ -336,7 +334,7 @@ namespace Spring.Aspects.Exceptions ///
/// The parsed advice expression. /// The exception handler instance - protected virtual IExceptionHandler CreateExceptionHandler(ParsedAdviceExpression parsedAdviceExpression) + protected virtual IExceptionHandler CreateExceptionHandler(ParsedAdviceExpression parsedAdviceExpression) { if (parsedAdviceExpression.ActionText.IndexOf("log") >= 0) { @@ -348,7 +346,7 @@ namespace Spring.Aspects.Exceptions } else { handler = CreateLogExceptionHandler(parsedAdviceExpression.ExceptionNames); - } + } handler.ConstraintExpressionText = parsedAdviceExpression.ConstraintExpression; handler.ActionExpressionText = parsedAdviceExpression.ActionExpressionText; return handler; @@ -364,7 +362,7 @@ namespace Spring.Aspects.Exceptions else { handler = CreateTranslationExceptionHandler(parsedAdviceExpression.ExceptionNames); - } + } handler.ConstraintExpressionText = parsedAdviceExpression.ConstraintExpression; handler.ActionExpressionText = parsedAdviceExpression.ActionExpressionText; return handler; @@ -381,10 +379,10 @@ namespace Spring.Aspects.Exceptions else { handler = CreateTranslationExceptionHandler(parsedAdviceExpression.ExceptionNames); - } + } handler.ConstraintExpressionText = parsedAdviceExpression.ConstraintExpression; - handler.ActionExpressionText = ParseWrappedExceptionExpression("wrap", parsedAdviceExpression.AdviceExpression); - return handler; + handler.ActionExpressionText = ParseWrappedExceptionExpression("wrap", parsedAdviceExpression.AdviceExpression); + return handler; } else if (parsedAdviceExpression.ActionText.IndexOf("replace") >= 0) { @@ -397,7 +395,7 @@ namespace Spring.Aspects.Exceptions } else { handler = CreateTranslationExceptionHandler(parsedAdviceExpression.ExceptionNames); - } + } handler.ConstraintExpressionText = parsedAdviceExpression.ConstraintExpression; handler.ActionExpressionText = ParseWrappedExceptionExpression("replace", parsedAdviceExpression.AdviceExpression); return handler; @@ -608,7 +606,7 @@ namespace Spring.Aspects.Exceptions /// The value of the element to add. The value can be null. /// /// is null. - /// An element with the same key already exists in the . + /// An element with the same key already exists in the . /// or key is not a string or value is not an IExceptionHandler. /// The is read-only.-or- The has a fixed size. public override void Add(object key, object value) @@ -635,4 +633,4 @@ namespace Spring.Aspects.Exceptions } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Exceptions/ExecuteSpelExceptionHandler.cs b/src/Spring/Spring.Aop/Aspects/Exceptions/ExecuteSpelExceptionHandler.cs index c1bc1bfe..2b14ea49 100644 --- a/src/Spring/Spring.Aop/Aspects/Exceptions/ExecuteSpelExceptionHandler.cs +++ b/src/Spring/Spring.Aop/Aspects/Exceptions/ExecuteSpelExceptionHandler.cs @@ -1,8 +1,3 @@ - - -using System; -using System.Collections.Generic; - using Spring.Expressions; namespace Spring.Aspects.Exceptions @@ -12,20 +7,20 @@ namespace Spring.Aspects.Exceptions ///
public class ExecuteSpelExceptionHandler : AbstractExceptionHandler { - /// - /// Initializes a new instance of the class. - /// - public ExecuteSpelExceptionHandler() - { - } - - /// - /// Initializes a new instance of the class. - /// + /// + /// Initializes a new instance of the class. + /// + public ExecuteSpelExceptionHandler() + { + } + + /// + /// Initializes a new instance of the class. + /// /// The exception names. public ExecuteSpelExceptionHandler(string[] exceptionNames) - : base(exceptionNames) - { + : base(exceptionNames) + { } /// @@ -46,4 +41,4 @@ namespace Spring.Aspects.Exceptions return null; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Exceptions/LogExceptionHandler.cs b/src/Spring/Spring.Aop/Aspects/Exceptions/LogExceptionHandler.cs index 6d196e0c..841e4417 100644 --- a/src/Spring/Spring.Aop/Aspects/Exceptions/LogExceptionHandler.cs +++ b/src/Spring/Spring.Aop/Aspects/Exceptions/LogExceptionHandler.cs @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections.Generic; - using Common.Logging; using Spring.Expressions; @@ -28,7 +25,7 @@ using Spring.Expressions; namespace Spring.Aspects.Exceptions { /// - /// Log the exceptions. Default log nameis "LogExceptionHandler" and log level is Debug + /// Log the exceptions. Default log nameis "LogExceptionHandler" and log level is Debug /// /// Mark Pollack public class LogExceptionHandler : AbstractExceptionHandler @@ -88,7 +85,7 @@ namespace Spring.Aspects.Exceptions } /// - /// Gets or sets a value indicating whether to log message only, and not pass in the + /// Gets or sets a value indicating whether to log message only, and not pass in the /// exception to the logging API /// /// true if log message only; otherwise, false. @@ -103,7 +100,7 @@ namespace Spring.Aspects.Exceptions /// Gets the action translation expression text. Overridden to add approprate settings to /// the SpEL expression that does the logging so that it depends on the values of LogLevel and /// LogMessageOnly. Those properties must be set to the desired values before calling this method. - /// + /// /// /// The action translation expression. public override string ActionExpressionText @@ -123,7 +120,7 @@ namespace Spring.Aspects.Exceptions { actionExpressionText = textPart1 + ", #e)"; } - } + } } } @@ -146,10 +143,10 @@ namespace Spring.Aspects.Exceptions } catch (Exception e) { - log.Warn("Was not able to evaluate action expression [" + ActionExpressionText + "]", e); + log.Warn("Was not able to evaluate action expression [" + ActionExpressionText + "]", e); } - return "logged"; + return "logged"; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Exceptions/ReturnValueExceptionHandler.cs b/src/Spring/Spring.Aop/Aspects/Exceptions/ReturnValueExceptionHandler.cs index b7bfa7b4..03d64b08 100644 --- a/src/Spring/Spring.Aop/Aspects/Exceptions/ReturnValueExceptionHandler.cs +++ b/src/Spring/Spring.Aop/Aspects/Exceptions/ReturnValueExceptionHandler.cs @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections.Generic; - using Spring.Expressions; namespace Spring.Aspects.Exceptions @@ -68,4 +65,4 @@ namespace Spring.Aspects.Exceptions return returnVal; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Exceptions/SwallowExceptionHandler.cs b/src/Spring/Spring.Aop/Aspects/Exceptions/SwallowExceptionHandler.cs index f1259bbf..8bc1cc36 100644 --- a/src/Spring/Spring.Aop/Aspects/Exceptions/SwallowExceptionHandler.cs +++ b/src/Spring/Spring.Aop/Aspects/Exceptions/SwallowExceptionHandler.cs @@ -18,8 +18,6 @@ #endregion -using System.Collections.Generic; - namespace Spring.Aspects.Exceptions { /// @@ -54,4 +52,4 @@ namespace Spring.Aspects.Exceptions return "swallow"; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Exceptions/TranslationExceptionHandler.cs b/src/Spring/Spring.Aop/Aspects/Exceptions/TranslationExceptionHandler.cs index c275f42a..df1d2dd8 100644 --- a/src/Spring/Spring.Aop/Aspects/Exceptions/TranslationExceptionHandler.cs +++ b/src/Spring/Spring.Aop/Aspects/Exceptions/TranslationExceptionHandler.cs @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections.Generic; - using Spring.Expressions; namespace Spring.Aspects.Exceptions @@ -76,4 +73,4 @@ namespace Spring.Aspects.Exceptions throw exception; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/IExceptionHandler.cs b/src/Spring/Spring.Aop/Aspects/IExceptionHandler.cs index d17667c7..1bee57d3 100644 --- a/src/Spring/Spring.Aop/Aspects/IExceptionHandler.cs +++ b/src/Spring/Spring.Aop/Aspects/IExceptionHandler.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; namespace Spring.Aspects { @@ -94,4 +92,4 @@ namespace Spring.Aspects get; set; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Logging/AbstractLoggingAdvice.cs b/src/Spring/Spring.Aop/Aspects/Logging/AbstractLoggingAdvice.cs index 7b0a58bb..cdf12a8d 100644 --- a/src/Spring/Spring.Aop/Aspects/Logging/AbstractLoggingAdvice.cs +++ b/src/Spring/Spring.Aop/Aspects/Logging/AbstractLoggingAdvice.cs @@ -18,9 +18,8 @@ #endregion -using System; using System.Reflection; -using System.Runtime.Serialization; +using System.Runtime.Serialization; using AopAlliance.Intercept; using Common.Logging; using Spring.Aop.Framework; @@ -33,7 +32,7 @@ namespace Spring.Aspects.Logging /// /// /// - /// Mark Pollack + /// Mark Pollack [Serializable] public abstract class AbstractLoggingAdvice : IMethodInterceptor, IDeserializationCallback { @@ -41,13 +40,13 @@ namespace Spring.Aspects.Logging /// /// The default ILog instance used to write logging messages. - /// + /// [NonSerialized] - protected ILog defaultLogger; - - /// - /// The name of the logger instance to use for obtaining from . - /// + protected ILog defaultLogger; + + /// + /// The name of the logger instance to use for obtaining from . + /// private string defaultLoggerName; /// @@ -55,30 +54,30 @@ namespace Spring.Aspects.Logging /// private bool hideProxyTypeNames = false; - #endregion - - #region Constructor - - /// - /// Creates a new advice instance using this advice type's name for logging by default. - /// - protected AbstractLoggingAdvice() - { - SetDefaultLogger(MethodBase.GetCurrentMethod().DeclaringType.FullName); - } - - /// - /// Creates a new advice instance using the given logger by default. - /// - protected AbstractLoggingAdvice(ILog defaultLogger) - { - this.defaultLogger = defaultLogger; - } - - #endregion - - #region Properties - + #endregion + + #region Constructor + + /// + /// Creates a new advice instance using this advice type's name for logging by default. + /// + protected AbstractLoggingAdvice() + { + SetDefaultLogger(MethodBase.GetCurrentMethod().DeclaringType.FullName); + } + + /// + /// Creates a new advice instance using the given logger by default. + /// + protected AbstractLoggingAdvice(ILog defaultLogger) + { + this.defaultLogger = defaultLogger; + } + + #endregion + + #region Properties + /// /// Sets a value indicating whether to use a dynamic logger or static logger /// @@ -96,7 +95,7 @@ namespace Spring.Aspects.Logging public bool UseDynamicLogger { set - { + { SetDefaultLogger(value ? null : this.GetType().FullName); } } @@ -119,8 +118,8 @@ namespace Spring.Aspects.Logging public string LoggerName { set - { - SetDefaultLogger(value); + { + SetDefaultLogger(value); } } @@ -140,13 +139,13 @@ namespace Spring.Aspects.Logging #region Methods /// - /// Adds logging to the method invocation. + /// Adds logging to the method invocation. /// /// /// The method IsInterceptorEnabled is called - /// as an optimization to determine if logging should be applied. If logging should be + /// as an optimization to determine if logging should be applied. If logging should be /// applied, the method invocation is passed to the InvokeUnderLog method for handling. - /// If not, the method proceeds as normal. + /// If not, the method proceeds as normal. /// /// /// The method invocation that is being intercepted. @@ -262,29 +261,29 @@ namespace Spring.Aspects.Logging } } - #endregion - - /// - /// Sets the default logger to the given name. - /// - /// if null, the default logger is removed. - protected void SetDefaultLogger(string name) - { - defaultLogger = (name == null ? null : LogManager.GetLogger(name)); - defaultLoggerName = name; - } - - void IDeserializationCallback.OnDeserialization(object sender) - { - OnDeserialization(sender); - } - - /// - /// Override in case you need to initialized non-serialized fields on deserialization. - /// - protected virtual void OnDeserialization(object sender) - { - SetDefaultLogger(this.defaultLoggerName); - } + #endregion + + /// + /// Sets the default logger to the given name. + /// + /// if null, the default logger is removed. + protected void SetDefaultLogger(string name) + { + defaultLogger = (name == null ? null : LogManager.GetLogger(name)); + defaultLoggerName = name; + } + + void IDeserializationCallback.OnDeserialization(object sender) + { + OnDeserialization(sender); + } + + /// + /// Override in case you need to initialized non-serialized fields on deserialization. + /// + protected virtual void OnDeserialization(object sender) + { + SetDefaultLogger(this.defaultLoggerName); + } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Logging/SimpleLoggingAdvice.cs b/src/Spring/Spring.Aop/Aspects/Logging/SimpleLoggingAdvice.cs index abddf2e3..90c0dd37 100644 --- a/src/Spring/Spring.Aop/Aspects/Logging/SimpleLoggingAdvice.cs +++ b/src/Spring/Spring.Aop/Aspects/Logging/SimpleLoggingAdvice.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Reflection; using System.Text; using AopAlliance.Intercept; @@ -32,7 +31,7 @@ namespace Spring.Aspects.Logging /// /// /// - /// Mark Pollack + /// Mark Pollack [Serializable] public class SimpleLoggingAdvice : AbstractLoggingAdvice { @@ -89,16 +88,16 @@ namespace Spring.Aspects.Logging public SimpleLoggingAdvice(bool useDynamicLogger) { UseDynamicLogger = useDynamicLogger; - } - - /// - /// Initializes a new instance of the class. - /// - /// the default logger to use - public SimpleLoggingAdvice(ILog defaultLogger) + } + + /// + /// Initializes a new instance of the class. + /// + /// the default logger to use + public SimpleLoggingAdvice(ILog defaultLogger) : base(defaultLogger) - {} - + {} + #endregion #region Properties @@ -194,13 +193,13 @@ namespace Spring.Aspects.Logging { object returnValue = null; bool exitThroughException = false; - + DateTime startTime = DateTime.Now; string uniqueIdentifier = null; if (LogUniqueIdentifier) { - uniqueIdentifier = CreateUniqueIdentifier(); + uniqueIdentifier = CreateUniqueIdentifier(); } try { @@ -303,7 +302,7 @@ namespace Spring.Aspects.Logging /// The id string. /// The entry log message protected virtual string GetEntryMessage(IMethodInvocation invocation, string idString) - { + { StringBuilder sb = new StringBuilder(128); sb.Append("Entering "); AppendCommonInformation(sb, invocation, idString); @@ -464,4 +463,4 @@ namespace Spring.Aspects.Logging #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/RetryAdvice.cs b/src/Spring/Spring.Aop/Aspects/RetryAdvice.cs index 5887a772..1d44034e 100644 --- a/src/Spring/Spring.Aop/Aspects/RetryAdvice.cs +++ b/src/Spring/Spring.Aop/Aspects/RetryAdvice.cs @@ -18,11 +18,7 @@ #endregion -using System; -using System.Collections.Generic; using System.Text.RegularExpressions; -using System.Threading; - using AopAlliance.Intercept; using Common.Logging; @@ -48,14 +44,14 @@ namespace Spring.Aspects ///The type of the callback that is called for delaying retries. ///
public delegate void SleepHandler(TimeSpan duration); - + private static readonly ILog log; private static readonly TimeSpanConverter timeSpanConverter; static RetryAdvice() { log = LogManager.GetLogger(typeof(RetryAdvice)); - timeSpanConverter = new TimeSpanConverter(); + timeSpanConverter = new TimeSpanConverter(); } #region Fields @@ -206,7 +202,7 @@ namespace Spring.Aspects sleepHandler(handler.DelayTimeSpan); } else - { + { try { IExpression expression = Expression.Parse(handler.DelayRateExpression); @@ -294,9 +290,9 @@ namespace Spring.Aspects RetryExceptionHandler handler = new RetryExceptionHandler(parsedAdviceExpression.ExceptionNames); handler.ConstraintExpressionText = parsedAdviceExpression.ConstraintExpression; handler.ActionExpressionText = parsedAdviceExpression.AdviceExpression; - + Match match = GetMatchForActionExpression(parsedAdviceExpression.ActionExpressionText, delayRegex); - + if (match.Success) { handler.MaximumRetryCount = int.Parse(match.Groups[1].Value.Trim()); @@ -356,4 +352,4 @@ namespace Spring.Aspects } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/RetryExceptionHandler.cs b/src/Spring/Spring.Aop/Aspects/RetryExceptionHandler.cs index b21b04d5..418b87fb 100644 --- a/src/Spring/Spring.Aop/Aspects/RetryExceptionHandler.cs +++ b/src/Spring/Spring.Aop/Aspects/RetryExceptionHandler.cs @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections.Generic; - namespace Spring.Aspects { /// @@ -126,4 +123,4 @@ namespace Spring.Aspects #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Aspects/Validation/ParameterValidationAdvisor.cs b/src/Spring/Spring.Aop/Aspects/Validation/ParameterValidationAdvisor.cs index a7877517..1381d207 100644 --- a/src/Spring/Spring.Aop/Aspects/Validation/ParameterValidationAdvisor.cs +++ b/src/Spring/Spring.Aop/Aspects/Validation/ParameterValidationAdvisor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using Spring.Aop.Support; @@ -109,4 +108,4 @@ namespace Spring.Aspects.Validation return false; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Aop/Spring.Aop.csproj b/src/Spring/Spring.Aop/Spring.Aop.csproj index 2909993a..aa14c597 100644 --- a/src/Spring/Spring.Aop/Spring.Aop.csproj +++ b/src/Spring/Spring.Aop/Spring.Aop.csproj @@ -1,18 +1,25 @@  + netstandard2.0;$(TargetFullFrameworkVersion) Interfaces and classes that provide AOP support in Spring.Net + + + - - spring-aop-1.1.xsd - + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.Core/Caching/AbstractCache.cs b/src/Spring/Spring.Core/Caching/AbstractCache.cs index a38489b4..d8ea5b6f 100644 --- a/src/Spring/Spring.Core/Caching/AbstractCache.cs +++ b/src/Spring/Spring.Core/Caching/AbstractCache.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; namespace Spring.Caching @@ -41,7 +40,7 @@ namespace Spring.Caching #region Properties /// - /// Gets/Set the Default time-to-live (TTL) for items inserted into this cache. + /// Gets/Set the Default time-to-live (TTL) for items inserted into this cache. /// Used by /// public TimeSpan TimeToLive @@ -51,8 +50,8 @@ namespace Spring.Caching } /// - /// Gets/Sets a value, whether the this cache instance's - /// shall be applied to all items, regardless of their individual TTL + /// Gets/Sets a value, whether the this cache instance's + /// shall be applied to all items, regardless of their individual TTL /// when is called. /// public bool EnforceTimeToLive @@ -65,7 +64,7 @@ namespace Spring.Caching #region ICache Implementation - #region + #region /// /// Gets the number of items in the cache. @@ -80,7 +79,7 @@ namespace Spring.Caching return Keys.Count; } } - + /// /// Gets a collection of all cache item keys. /// @@ -151,8 +150,8 @@ namespace Spring.Caching /// Inserts an item into the cache. /// /// - /// If equals , - /// or is true, this cache + /// If equals , + /// or is true, this cache /// instance's value will be applied. /// /// @@ -198,4 +197,4 @@ namespace Spring.Caching #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Caching/BaseCacheAttribute.cs b/src/Spring/Spring.Core/Caching/BaseCacheAttribute.cs index 130a7bc0..03fc290d 100644 --- a/src/Spring/Spring.Core/Caching/BaseCacheAttribute.cs +++ b/src/Spring/Spring.Core/Caching/BaseCacheAttribute.cs @@ -1,4 +1,3 @@ -using System; using Spring.Core.TypeConversion; using Spring.Expressions; @@ -83,7 +82,7 @@ namespace Spring.Caching } /// - /// Gets or sets a SpEL expression that should be evaluated in order + /// Gets or sets a SpEL expression that should be evaluated in order /// to determine the cache key for the item. /// /// @@ -101,7 +100,7 @@ namespace Spring.Caching } /// - /// Gets an expression instance that should be evaluated in order + /// Gets an expression instance that should be evaluated in order /// to determine the cache key for the item. /// /// @@ -114,7 +113,7 @@ namespace Spring.Caching } /// - /// Gets or sets a SpEL expression that should be evaluated in order + /// Gets or sets a SpEL expression that should be evaluated in order /// to determine whether the item should be cached. /// /// @@ -132,7 +131,7 @@ namespace Spring.Caching } /// - /// Gets an expression instance that should be evaluated in order + /// Gets an expression instance that should be evaluated in order /// to determine whether the item should be cached. /// /// @@ -148,11 +147,11 @@ namespace Spring.Caching /// The amount of time an object should remain in the cache. /// /// - /// If no TTL is specified, the default TTL defined by the + /// If no TTL is specified, the default TTL defined by the /// cache's policy will be applied. /// /// - /// The amount of time object should remain in the cache + /// The amount of time object should remain in the cache /// formatted to be recognizable by . /// public string TimeToLive @@ -170,7 +169,7 @@ namespace Spring.Caching /// The amount of time an object should remain in the cache (in seconds). ///
/// - /// If no TTL is specified, the default TTL defined by the + /// If no TTL is specified, the default TTL defined by the /// cache's policy will be applied. /// /// @@ -183,4 +182,4 @@ namespace Spring.Caching #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Caching/CacheParameterAttribute.cs b/src/Spring/Spring.Core/Caching/CacheParameterAttribute.cs index 1185152a..8f52f4f0 100644 --- a/src/Spring/Spring.Core/Caching/CacheParameterAttribute.cs +++ b/src/Spring/Spring.Core/Caching/CacheParameterAttribute.cs @@ -18,17 +18,15 @@ #endregion -using System; - namespace Spring.Caching { /// - /// This attribute should be used to mark methods whose argument(s) + /// This attribute should be used to mark methods whose argument(s) /// need to be cached. /// /// ///

- /// This attribute allows application developers to specify that an argument + /// This attribute allows application developers to specify that an argument /// of the method should be cached, but it will not do any caching by itself. ///

///

@@ -68,4 +66,4 @@ namespace Spring.Caching { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Caching/CacheResultAttribute.cs b/src/Spring/Spring.Core/Caching/CacheResultAttribute.cs index 14162a34..5757e2b4 100644 --- a/src/Spring/Spring.Core/Caching/CacheResultAttribute.cs +++ b/src/Spring/Spring.Core/Caching/CacheResultAttribute.cs @@ -18,17 +18,15 @@ #endregion -using System; - namespace Spring.Caching { ///

- /// This attribute should be used to mark methods whose result + /// This attribute should be used to mark methods whose result /// needs to be cached. /// /// ///

- /// This attribute allows application developers to mark that a result + /// This attribute allows application developers to mark that a result /// of the method invocation should be cached, but it will not do any /// caching by itself. ///

@@ -65,4 +63,4 @@ namespace Spring.Caching { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Caching/CacheResultItemsAttribute.cs b/src/Spring/Spring.Core/Caching/CacheResultItemsAttribute.cs index 388891d8..a7fde887 100644 --- a/src/Spring/Spring.Core/Caching/CacheResultItemsAttribute.cs +++ b/src/Spring/Spring.Core/Caching/CacheResultItemsAttribute.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; namespace Spring.Caching @@ -30,7 +29,7 @@ namespace Spring.Caching /// ///

/// This attribute allows application developers to specify that each item - /// from the collection returned by the method should be cached, + /// from the collection returned by the method should be cached, /// but it will not do any caching by itself. ///

///

@@ -66,4 +65,4 @@ namespace Spring.Caching { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Caching/ICache.cs b/src/Spring/Spring.Core/Caching/ICache.cs index 5cbc3a45..a3446218 100644 --- a/src/Spring/Spring.Core/Caching/ICache.cs +++ b/src/Spring/Spring.Core/Caching/ICache.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; namespace Spring.Caching @@ -104,4 +103,4 @@ namespace Spring.Caching /// void Insert(object key, object value, TimeSpan timeToLive); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Caching/InvalidateCacheAttribute.cs b/src/Spring/Spring.Core/Caching/InvalidateCacheAttribute.cs index 76210ee4..d68bd501 100644 --- a/src/Spring/Spring.Core/Caching/InvalidateCacheAttribute.cs +++ b/src/Spring/Spring.Core/Caching/InvalidateCacheAttribute.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Expressions; namespace Spring.Caching @@ -142,4 +141,4 @@ namespace Spring.Caching get { return conditionExpression; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Caching/NonExpiringCache.cs b/src/Spring/Spring.Core/Caching/NonExpiringCache.cs index b55ce730..49bb65f1 100644 --- a/src/Spring/Spring.Core/Caching/NonExpiringCache.cs +++ b/src/Spring/Spring.Core/Caching/NonExpiringCache.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; namespace Spring.Caching { @@ -143,4 +141,4 @@ namespace Spring.Caching } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/AbstractQueue.cs b/src/Spring/Spring.Core/Collections/AbstractQueue.cs index 50190f4d..246f1768 100644 --- a/src/Spring/Spring.Core/Collections/AbstractQueue.cs +++ b/src/Spring/Spring.Core/Collections/AbstractQueue.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Collections; -#endregion - namespace Spring.Collections { - ///

+ /// /// This class provides skeletal implementations of some /// operations. /// @@ -43,11 +38,11 @@ namespace Spring.Collections /// methods /// respectively but throw exceptions instead of indicating failure via /// or returns. - ///

+ ///

/// An implementation that extends this class must /// minimally define a method /// which does - /// not permit the insertion of elements, along with methods + /// not permit the insertion of elements, along with methods /// , and /// . Typically, /// additional methods will be overridden as well. If these requirements @@ -72,14 +67,14 @@ namespace Spring.Collections protected AbstractQueue() {} - ///

+ /// /// Inserts the specified element into this queue if it is possible /// to do so immediately without violating capacity restrictions. /// /// /// The element to add. /// - /// + /// /// if successful. /// /// @@ -97,7 +92,7 @@ namespace Spring.Collections } } - /// + /// /// Retrieves and removes the head of this queue. /// /// @@ -107,7 +102,7 @@ namespace Spring.Collections /// it throws an exception if this queue is empty. ///

///
- /// + /// /// The head of this queue /// /// @@ -127,7 +122,7 @@ namespace Spring.Collections } - /// + /// /// Retrieves, but does not remove, the head of this queue. /// /// @@ -158,7 +153,7 @@ namespace Spring.Collections } } - /// + /// /// Removes all of the elements from this queue. /// /// @@ -179,7 +174,7 @@ namespace Spring.Collections } } - /// + /// /// Adds all of the elements in the supplied /// to this queue. /// @@ -210,7 +205,7 @@ namespace Spring.Collections /// If the supplied or any one of its elements are . /// /// - /// If the collection is the current or + /// If the collection is the current or /// the collection size is greater than the queue capacity. /// public virtual bool AddAll(ICollection collection) @@ -242,7 +237,7 @@ namespace Spring.Collections return modified; } - /// + /// /// Inserts the specified element into this queue if it is possible to do /// so immediately without violating capacity restrictions. /// @@ -272,20 +267,20 @@ namespace Spring.Collections /// public abstract bool Offer(object objectToAdd); - /// + /// /// Retrieves, but does not remove, the head of this queue, /// or returns if this queue is empty. /// - /// + /// /// The head of this queue, or if this queue is empty. /// public abstract object Peek(); - /// + /// /// Retrieves and removes the head of this queue, /// or returns if this queue is empty. /// - /// + /// /// The head of this queue, or if this queue is empty. /// public abstract object Poll(); @@ -343,4 +338,4 @@ namespace Spring.Collections /// public abstract IEnumerator GetEnumerator(); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/CaseInsensitiveHashtable.cs b/src/Spring/Spring.Core/Collections/CaseInsensitiveHashtable.cs index 1c17287d..ef489754 100644 --- a/src/Spring/Spring.Core/Collections/CaseInsensitiveHashtable.cs +++ b/src/Spring/Spring.Core/Collections/CaseInsensitiveHashtable.cs @@ -1,4 +1,3 @@ -using System; using System.Collections; using System.Globalization; using System.Runtime.Serialization; diff --git a/src/Spring/Spring.Core/Collections/DictionarySet.cs b/src/Spring/Spring.Core/Collections/DictionarySet.cs index f68ee4b7..79153d81 100644 --- a/src/Spring/Spring.Core/Collections/DictionarySet.cs +++ b/src/Spring/Spring.Core/Collections/DictionarySet.cs @@ -16,7 +16,6 @@ * limitations under the License. */ -using System; using System.Collections; namespace Spring.Collections @@ -352,4 +351,4 @@ namespace Spring.Collections private readonly IEnumerator _enumerator; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/Generic/AbstractDictionary.cs b/src/Spring/Spring.Core/Collections/Generic/AbstractDictionary.cs index 1475b882..6f60cde5 100644 --- a/src/Spring/Spring.Core/Collections/Generic/AbstractDictionary.cs +++ b/src/Spring/Spring.Core/Collections/Generic/AbstractDictionary.cs @@ -18,9 +18,6 @@ #endregion -using System.Collections.Generic; -using System.Linq; - namespace Spring.Collections.Generic { /// diff --git a/src/Spring/Spring.Core/Collections/Generic/DictionarySet.cs b/src/Spring/Spring.Core/Collections/Generic/DictionarySet.cs index 78944080..f53f3eb1 100644 --- a/src/Spring/Spring.Core/Collections/Generic/DictionarySet.cs +++ b/src/Spring/Spring.Core/Collections/Generic/DictionarySet.cs @@ -1,8 +1,6 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ -using System; using System.Collections; -using System.Collections.Generic; namespace Spring.Collections.Generic { diff --git a/src/Spring/Spring.Core/Collections/Generic/HashedSet.cs b/src/Spring/Spring.Core/Collections/Generic/HashedSet.cs index ee0cdc74..85bc87ae 100644 --- a/src/Spring/Spring.Core/Collections/Generic/HashedSet.cs +++ b/src/Spring/Spring.Core/Collections/Generic/HashedSet.cs @@ -1,7 +1,4 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ - -using System; -using System.Collections.Generic; +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ namespace Spring.Collections.Generic { diff --git a/src/Spring/Spring.Core/Collections/Generic/ISet.cs b/src/Spring/Spring.Core/Collections/Generic/ISet.cs index 28b96e4a..175ba7a1 100644 --- a/src/Spring/Spring.Core/Collections/Generic/ISet.cs +++ b/src/Spring/Spring.Core/Collections/Generic/ISet.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; namespace Spring.Collections.Generic { diff --git a/src/Spring/Spring.Core/Collections/Generic/ImmutableSet.cs b/src/Spring/Spring.Core/Collections/Generic/ImmutableSet.cs index c5c07c46..8dfe317c 100644 --- a/src/Spring/Spring.Core/Collections/Generic/ImmutableSet.cs +++ b/src/Spring/Spring.Core/Collections/Generic/ImmutableSet.cs @@ -1,8 +1,6 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ -using System; using System.Collections; -using System.Collections.Generic; namespace Spring.Collections.Generic { diff --git a/src/Spring/Spring.Core/Collections/Generic/LinkedHashDictionary.cs b/src/Spring/Spring.Core/Collections/Generic/LinkedHashDictionary.cs index db0f17d1..20ca7e07 100644 --- a/src/Spring/Spring.Core/Collections/Generic/LinkedHashDictionary.cs +++ b/src/Spring/Spring.Core/Collections/Generic/LinkedHashDictionary.cs @@ -18,8 +18,6 @@ #endregion -using System.Collections.Generic; - namespace Spring.Collections.Generic { /// diff --git a/src/Spring/Spring.Core/Collections/Generic/OrderedSet.cs b/src/Spring/Spring.Core/Collections/Generic/OrderedSet.cs index 854960f3..94c6e5a9 100644 --- a/src/Spring/Spring.Core/Collections/Generic/OrderedSet.cs +++ b/src/Spring/Spring.Core/Collections/Generic/OrderedSet.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections.Generic; - namespace Spring.Collections.Generic { /// diff --git a/src/Spring/Spring.Core/Collections/Generic/ReadOnlyDictionary.cs b/src/Spring/Spring.Core/Collections/Generic/ReadOnlyDictionary.cs index 19c42aae..e7e8d5a6 100644 --- a/src/Spring/Spring.Core/Collections/Generic/ReadOnlyDictionary.cs +++ b/src/Spring/Spring.Core/Collections/Generic/ReadOnlyDictionary.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Runtime.Serialization; using Spring.Util; diff --git a/src/Spring/Spring.Core/Collections/Generic/Set.cs b/src/Spring/Spring.Core/Collections/Generic/Set.cs index a8587f16..3b1d8d5c 100644 --- a/src/Spring/Spring.Core/Collections/Generic/Set.cs +++ b/src/Spring/Spring.Core/Collections/Generic/Set.cs @@ -1,8 +1,6 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ -using System; using System.Collections; -using System.Collections.Generic; namespace Spring.Collections.Generic { diff --git a/src/Spring/Spring.Core/Collections/Generic/SortedSet.cs b/src/Spring/Spring.Core/Collections/Generic/SortedSet.cs index 1be8c746..b7bfaafd 100644 --- a/src/Spring/Spring.Core/Collections/Generic/SortedSet.cs +++ b/src/Spring/Spring.Core/Collections/Generic/SortedSet.cs @@ -1,8 +1,6 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ -using System; using System.Collections; -using System.Collections.Generic; namespace Spring.Collections.Generic { diff --git a/src/Spring/Spring.Core/Collections/Generic/SynchronizedSet.cs b/src/Spring/Spring.Core/Collections/Generic/SynchronizedSet.cs index ffd10d5f..13a97224 100644 --- a/src/Spring/Spring.Core/Collections/Generic/SynchronizedSet.cs +++ b/src/Spring/Spring.Core/Collections/Generic/SynchronizedSet.cs @@ -1,8 +1,6 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ -using System; using System.Collections; -using System.Collections.Generic; namespace Spring.Collections.Generic { diff --git a/src/Spring/Spring.Core/Collections/HashedSet.cs b/src/Spring/Spring.Core/Collections/HashedSet.cs index 20e467fb..31d7f67b 100644 --- a/src/Spring/Spring.Core/Collections/HashedSet.cs +++ b/src/Spring/Spring.Core/Collections/HashedSet.cs @@ -1,9 +1,9 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,13 +20,8 @@ #endregion -#region Imports - -using System; using System.Collections; -#endregion - namespace Spring.Collections { /// @@ -63,4 +58,4 @@ namespace Spring.Collections this.AddAll(initialValues); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/HybridSet.cs b/src/Spring/Spring.Core/Collections/HybridSet.cs index a7994ac1..a87dcde3 100644 --- a/src/Spring/Spring.Core/Collections/HybridSet.cs +++ b/src/Spring/Spring.Core/Collections/HybridSet.cs @@ -1,9 +1,9 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,14 +20,9 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Collections.Specialized; -#endregion - namespace Spring.Collections { /// @@ -81,4 +76,4 @@ namespace Spring.Collections this.AddAll(initialValues); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/IQueue.cs b/src/Spring/Spring.Core/Collections/IQueue.cs index 0bfa9fc3..d01c6a1b 100644 --- a/src/Spring/Spring.Core/Collections/IQueue.cs +++ b/src/Spring/Spring.Core/Collections/IQueue.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Collections; -#endregion - namespace Spring.Collections { /// @@ -61,7 +56,7 @@ namespace Spring.Collections ///

///

/// The method inserts an - /// element if possible, otherwise returning . This differs from the + /// element if possible, otherwise returning . This differs from the /// method, which can fail to /// add an element only by throwing an exception. The /// method is designed for @@ -102,7 +97,7 @@ namespace Spring.Collections ///

///

/// implementations generally do not define - /// element-based versions of methods + /// element-based versions of methods /// and , but instead inherit the /// identity based versions from the class object, because element-based equality /// is not always well-defined for queues with the same elements but different @@ -116,7 +111,7 @@ namespace Spring.Collections /// Griffin Caprio (.NET) public interface IQueue : ICollection { - ///

+ /// /// Inserts the specified element into this queue if it is possible to do so /// immediately without violating capacity restrictions, returning /// upon success and throwing an @@ -126,7 +121,7 @@ namespace Spring.Collections /// /// The element to add. /// - /// + /// /// if successful. /// /// @@ -146,7 +141,7 @@ namespace Spring.Collections /// bool Add(object objectToAdd); - /// + /// /// Inserts the specified element into this queue if it is possible to do /// so immediately without violating capacity restrictions. /// @@ -176,7 +171,7 @@ namespace Spring.Collections /// bool Offer(object objectToAdd); - /// + /// /// Retrieves and removes the head of this queue. /// /// @@ -185,22 +180,22 @@ namespace Spring.Collections /// only in that it throws an exception if this queue is empty. ///

///
- /// + /// /// The head of this queue /// /// if this queue is empty object Remove(); - /// + /// /// Retrieves and removes the head of this queue, /// or returns if this queue is empty. /// - /// + /// /// The head of this queue, or if this queue is empty. /// object Poll(); - /// + /// /// Retrieves, but does not remove, the head of this queue. /// /// @@ -209,24 +204,24 @@ namespace Spring.Collections /// only in that it throws an exception if this queue is empty. ///

///
- /// + /// /// The head of this queue. /// /// If this queue is empty. object Element(); - /// + /// /// Retrieves, but does not remove, the head of this queue, /// or returns if this queue is empty. /// - /// + /// /// The head of this queue, or if this queue is empty. /// object Peek(); - + /// /// Returns if there are no elements in the , otherwise. /// bool IsEmpty { get; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/ISet.cs b/src/Spring/Spring.Core/Collections/ISet.cs index ebe347e2..438cc622 100644 --- a/src/Spring/Spring.Core/Collections/ISet.cs +++ b/src/Spring/Spring.Core/Collections/ISet.cs @@ -1,9 +1,9 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,13 +20,8 @@ #endregion -#region Imports - -using System; using System.Collections; -#endregion - namespace Spring.Collections { /// @@ -36,7 +31,7 @@ namespace Spring.Collections ///

/// This interface models the mathematical /// abstraction. The order of - /// elements in a set is dependant on (a)the data-structure implementation, and + /// elements in a set is dependant on (a)the data-structure implementation, and /// (b)the implementation of the various /// methods, and thus is not /// guaranteed. @@ -111,7 +106,7 @@ namespace Spring.Collections { ///

/// Performs a "union" of the two sets, where all the elements - /// in both sets are present. + /// in both sets are present. /// /// ///

@@ -271,4 +266,4 @@ namespace Spring.Collections ///

void Clear(); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/ImmutableSet.cs b/src/Spring/Spring.Core/Collections/ImmutableSet.cs index c2bcc415..5aa9a34f 100644 --- a/src/Spring/Spring.Core/Collections/ImmutableSet.cs +++ b/src/Spring/Spring.Core/Collections/ImmutableSet.cs @@ -1,9 +1,9 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,13 +20,8 @@ #endregion -#region Imports - -using System; using System.Collections; -#endregion - namespace Spring.Collections { /// @@ -275,7 +270,7 @@ namespace Spring.Collections /// /// Performs a "union" of the two sets, where all the elements - /// in both sets are present. + /// in both sets are present. /// /// A collection of elements. /// @@ -287,7 +282,7 @@ namespace Spring.Collections public override sealed ISet Union(ISet setOne) { ISet m = this; - while (m is ImmutableSet) + while (m is ImmutableSet) { m = ((ImmutableSet) m).BasisSet; } @@ -306,7 +301,7 @@ namespace Spring.Collections public override sealed ISet Intersect(ISet setOne) { ISet m = this; - while (m is ImmutableSet) + while (m is ImmutableSet) { m = ((ImmutableSet) m).BasisSet; } @@ -326,7 +321,7 @@ namespace Spring.Collections public override sealed ISet Minus(ISet setOne) { ISet m = this; - while (m is ImmutableSet) + while (m is ImmutableSet) { m = ((ImmutableSet) m).BasisSet; } @@ -346,11 +341,11 @@ namespace Spring.Collections public override sealed ISet ExclusiveOr(ISet setOne) { ISet m = this; - while (m is ImmutableSet) + while (m is ImmutableSet) { m = ((ImmutableSet) m).BasisSet; } return new ImmutableSet(m.ExclusiveOr(setOne)); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/LinkedList.cs b/src/Spring/Spring.Core/Collections/LinkedList.cs index 4f32e057..0d7e0a8a 100644 --- a/src/Spring/Spring.Core/Collections/LinkedList.cs +++ b/src/Spring/Spring.Core/Collections/LinkedList.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Collections; -#endregion - namespace Spring.Collections { /// @@ -307,7 +302,7 @@ namespace Spring.Collections for (Node n = _rootNode.NextNode; n != _rootNode; n = n.NextNode) { - if (value.Equals(n.Value)) + if (value.Equals(n.Value)) { return new NodeHolder(n, i); } @@ -541,4 +536,4 @@ namespace Spring.Collections #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/ListSet.cs b/src/Spring/Spring.Core/Collections/ListSet.cs index 921fa81e..760a0d91 100644 --- a/src/Spring/Spring.Core/Collections/ListSet.cs +++ b/src/Spring/Spring.Core/Collections/ListSet.cs @@ -1,9 +1,9 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,14 +20,9 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Collections.Specialized; -#endregion - namespace Spring.Collections { /// @@ -41,7 +36,7 @@ namespace Spring.Collections /// instead if you are not sure your data-set /// will always remain very small. Iteration produces elements in the order they were added. /// However, element order is not guaranteed to be maintained by the various - /// mathematical operators. + /// mathematical operators. ///

/// [Serializable] diff --git a/src/Spring/Spring.Core/Collections/NoElementsException.cs b/src/Spring/Spring.Core/Collections/NoElementsException.cs index 3aeb122b..27a2890c 100644 --- a/src/Spring/Spring.Core/Collections/NoElementsException.cs +++ b/src/Spring/Spring.Core/Collections/NoElementsException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Collections { /// @@ -87,4 +82,4 @@ namespace Spring.Collections { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/PriorityQueue.cs b/src/Spring/Spring.Core/Collections/PriorityQueue.cs index 9679d4ea..e3218c25 100644 --- a/src/Spring/Spring.Core/Collections/PriorityQueue.cs +++ b/src/Spring/Spring.Core/Collections/PriorityQueue.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Diagnostics; using System.Reflection; @@ -830,4 +829,4 @@ namespace Spring.Collections #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/Set.cs b/src/Spring/Spring.Core/Collections/Set.cs index 7f053dc4..60555932 100644 --- a/src/Spring/Spring.Core/Collections/Set.cs +++ b/src/Spring/Spring.Core/Collections/Set.cs @@ -1,9 +1,9 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,13 +20,8 @@ #endregion -#region Imports - -using System; using System.Collections; -#endregion - namespace Spring.Collections { /// @@ -38,7 +33,7 @@ namespace Spring.Collections { /// /// Performs a "union" of the two sets, where all the elements - /// in both sets are present. + /// in both sets are present. /// /// A collection of elements. /// @@ -50,7 +45,7 @@ namespace Spring.Collections public virtual ISet Union(ISet setOne) { ISet resultSet = (ISet) this.Clone(); - if (setOne != null) + if (setOne != null) { resultSet.AddAll(setOne); } @@ -137,7 +132,7 @@ namespace Spring.Collections /// /// Performs an "intersection" of the two sets, where only the elements - /// that are present in both sets remain. + /// that are present in both sets remain. /// /// ///

@@ -173,7 +168,7 @@ namespace Spring.Collections ///

/// Performs an "intersection" of the two sets, where only the elements - /// that are present in both sets remain. + /// that are present in both sets remain. /// /// A set of elements. /// A set of elements. @@ -217,7 +212,7 @@ namespace Spring.Collections /// , removing the elements that are also in /// set . The original sets are not modified /// during this operation. The result set is a clone of set - /// containing the elements from the operation. + /// containing the elements from the operation. ///

///
/// A set of elements. @@ -521,7 +516,7 @@ namespace Spring.Collections /// If you wish to check for "equivalent" /// instances, use /// Equals(). If you wish to check to see if two references are - /// actually the same object, use "==" and "!=". + /// actually the same object, use "==" and "!=". ///

/// /// @@ -564,4 +559,4 @@ namespace Spring.Collections return count + hashCode; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/SortedSet.cs b/src/Spring/Spring.Core/Collections/SortedSet.cs index 6729ad97..8dbbe375 100644 --- a/src/Spring/Spring.Core/Collections/SortedSet.cs +++ b/src/Spring/Spring.Core/Collections/SortedSet.cs @@ -1,9 +1,9 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,14 +20,9 @@ #endregion -#region Imports - -using System; using System.Collections; using Spring.Util; -#endregion - namespace Spring.Collections { /// @@ -85,4 +80,4 @@ namespace Spring.Collections this.AddAll(initialValues); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/SynchronizedHashtable.cs b/src/Spring/Spring.Core/Collections/SynchronizedHashtable.cs index a239e06e..8e7fcd1b 100644 --- a/src/Spring/Spring.Core/Collections/SynchronizedHashtable.cs +++ b/src/Spring/Spring.Core/Collections/SynchronizedHashtable.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Collections; using System.Collections.Specialized; using Spring.Util; @@ -370,4 +369,4 @@ namespace Spring.Collections } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Collections/SynchronizedSet.cs b/src/Spring/Spring.Core/Collections/SynchronizedSet.cs index 5932d3f6..bbc2c5d6 100644 --- a/src/Spring/Spring.Core/Collections/SynchronizedSet.cs +++ b/src/Spring/Spring.Core/Collections/SynchronizedSet.cs @@ -1,9 +1,9 @@ -/* Copyright © 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ +/* Copyright � 2002-2011 by Aidant Systems, Inc., and by Jason Smith. */ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,13 +20,8 @@ #endregion -#region Imports - -using System; using System.Collections; -#endregion - namespace Spring.Collections { /// @@ -98,7 +93,7 @@ namespace Spring.Collections /// public override sealed bool AddAll(ICollection collection) { - if(collection == null) + if(collection == null) { return false; } @@ -152,7 +147,7 @@ namespace Spring.Collections /// public override sealed bool ContainsAll(ICollection collection) { - if(collection == null) + if(collection == null) { return false; } @@ -319,7 +314,7 @@ namespace Spring.Collections } /// - /// Returns a clone of the instance. + /// Returns a clone of the instance. /// /// A clone of this object. public override object Clone() @@ -327,4 +322,4 @@ namespace Spring.Collections return new SynchronizedSet((ISet) _mBasisSet.Clone()); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/ApplicationContextException.cs b/src/Spring/Spring.Core/Context/ApplicationContextException.cs index bbf1e61e..3f3b45e8 100644 --- a/src/Spring/Spring.Core/Context/ApplicationContextException.cs +++ b/src/Spring/Spring.Core/Context/ApplicationContextException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; using Spring.Objects; diff --git a/src/Spring/Spring.Core/Context/ApplicationEventArgs.cs b/src/Spring/Spring.Core/Context/ApplicationEventArgs.cs index a3f83974..b517d217 100644 --- a/src/Spring/Spring.Core/Context/ApplicationEventArgs.cs +++ b/src/Spring/Spring.Core/Context/ApplicationEventArgs.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Context { /// diff --git a/src/Spring/Spring.Core/Context/Attributes/AssemblyObjectDefinitionScanner.cs b/src/Spring/Spring.Core/Context/Attributes/AssemblyObjectDefinitionScanner.cs index 72beed14..9ce70e62 100644 --- a/src/Spring/Spring.Core/Context/Attributes/AssemblyObjectDefinitionScanner.cs +++ b/src/Spring/Spring.Core/Context/Attributes/AssemblyObjectDefinitionScanner.cs @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections.Generic; -using System.Linq; using System.Reflection; using Spring.Objects.Factory.Support; using Spring.Stereotype; @@ -247,4 +244,4 @@ namespace Spring.Context.Attributes AssertUtils.ArgumentNotNull(assembliesToInclude, "assembliesToInclude"); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Attributes/AssemblyTypeScanner.cs b/src/Spring/Spring.Core/Context/Attributes/AssemblyTypeScanner.cs index 488ff976..7a914c50 100644 --- a/src/Spring/Spring.Core/Context/Attributes/AssemblyTypeScanner.cs +++ b/src/Spring/Spring.Core/Context/Attributes/AssemblyTypeScanner.cs @@ -18,10 +18,6 @@ #endregion -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; using System.Reflection; using Common.Logging; using Spring.Context.Attributes.TypeFilters; @@ -448,4 +444,4 @@ namespace Spring.Context.Attributes return assemblies; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Attributes/AssemblyTypeSource.cs b/src/Spring/Spring.Core/Context/Attributes/AssemblyTypeSource.cs index 58f09b34..e70c5fe0 100644 --- a/src/Spring/Spring.Core/Context/Attributes/AssemblyTypeSource.cs +++ b/src/Spring/Spring.Core/Context/Attributes/AssemblyTypeSource.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; using Common.Logging; using Spring.Util; @@ -86,4 +84,4 @@ namespace Spring.Context.Attributes #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Attributes/ConfigurationAttribute.cs b/src/Spring/Spring.Core/Context/Attributes/ConfigurationAttribute.cs index 8a4fa6fb..c18d0443 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ConfigurationAttribute.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ConfigurationAttribute.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Stereotype; namespace Spring.Context.Attributes diff --git a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClass.cs b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClass.cs index 59e19b92..5c7e6e8d 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClass.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClass.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Reflection; using System.Text; using Spring.Core.IO; diff --git a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassAssemblyResource.cs b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassAssemblyResource.cs index 5a93bf07..4fcd0063 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassAssemblyResource.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassAssemblyResource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2010-2011 the original author or authors. + * Copyright � 2010-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; -using System.IO; using System.Reflection; using Spring.Core.IO; @@ -200,4 +198,4 @@ namespace Spring.Context.Attributes #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassEnhancer.cs b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassEnhancer.cs index 02d256dd..7f8b6c6d 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassEnhancer.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassEnhancer.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Reflection; using System.Reflection.Emit; diff --git a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassMethod.cs b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassMethod.cs index 305041e6..ba44c5b5 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassMethod.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassMethod.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Reflection; using Spring.Objects.Factory.Parsing; @@ -142,4 +141,4 @@ namespace Spring.Context.Attributes } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassObjectDefinitionReader.cs b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassObjectDefinitionReader.cs index c8051af0..68ea2bbe 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassObjectDefinitionReader.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassObjectDefinitionReader.cs @@ -20,8 +20,6 @@ #region -using System; -using System.Collections.Generic; using System.Reflection; using Common.Logging; @@ -305,4 +303,4 @@ namespace Spring.Context.Attributes { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassParser.cs b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassParser.cs index 2385ec2d..814d07eb 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassParser.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassParser.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using Spring.Objects.Factory.Parsing; using Spring.Collections.Generic; using System.Reflection; diff --git a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassPostProcessor.cs b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassPostProcessor.cs index 934fef32..cc294b7f 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassPostProcessor.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ConfigurationClassPostProcessor.cs @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections.Generic; - using Common.Logging; using Spring.Core; diff --git a/src/Spring/Spring.Core/Context/Attributes/DependsOnAttribute.cs b/src/Spring/Spring.Core/Context/Attributes/DependsOnAttribute.cs index 749750e9..fd0c24e2 100644 --- a/src/Spring/Spring.Core/Context/Attributes/DependsOnAttribute.cs +++ b/src/Spring/Spring.Core/Context/Attributes/DependsOnAttribute.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Context.Attributes { /// diff --git a/src/Spring/Spring.Core/Context/Attributes/IAssemblyTypeScanner.cs b/src/Spring/Spring.Core/Context/Attributes/IAssemblyTypeScanner.cs index 09684f5a..b941f0b5 100644 --- a/src/Spring/Spring.Core/Context/Attributes/IAssemblyTypeScanner.cs +++ b/src/Spring/Spring.Core/Context/Attributes/IAssemblyTypeScanner.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Reflection; namespace Spring.Context.Attributes @@ -86,4 +84,4 @@ namespace Spring.Context.Attributes /// IEnumerable Scan(); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Attributes/ImportAttribute.cs b/src/Spring/Spring.Core/Context/Attributes/ImportAttribute.cs index b4ad6cdc..9376e443 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ImportAttribute.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ImportAttribute.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Context.Attributes { /// diff --git a/src/Spring/Spring.Core/Context/Attributes/ImportResourceAttribute.cs b/src/Spring/Spring.Core/Context/Attributes/ImportResourceAttribute.cs index 70497763..b78d829f 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ImportResourceAttribute.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ImportResourceAttribute.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Core.IO; using Spring.Objects.Factory.Support; using Spring.Objects.Factory.Xml; diff --git a/src/Spring/Spring.Core/Context/Attributes/LazyAttribute.cs b/src/Spring/Spring.Core/Context/Attributes/LazyAttribute.cs index a15b997a..e6dc094f 100644 --- a/src/Spring/Spring.Core/Context/Attributes/LazyAttribute.cs +++ b/src/Spring/Spring.Core/Context/Attributes/LazyAttribute.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Context.Attributes { /// diff --git a/src/Spring/Spring.Core/Context/Attributes/ObjectDefAttribute.cs b/src/Spring/Spring.Core/Context/Attributes/ObjectDefAttribute.cs index 44bbaf86..370e804e 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ObjectDefAttribute.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ObjectDefAttribute.cs @@ -18,8 +18,6 @@ #endregion -using System; - using Spring.Util; namespace Spring.Context.Attributes diff --git a/src/Spring/Spring.Core/Context/Attributes/RequiredConstraintAssemblyTypeScanner.cs b/src/Spring/Spring.Core/Context/Attributes/RequiredConstraintAssemblyTypeScanner.cs index bcf61b6a..5cb2f8fb 100644 --- a/src/Spring/Spring.Core/Context/Attributes/RequiredConstraintAssemblyTypeScanner.cs +++ b/src/Spring/Spring.Core/Context/Attributes/RequiredConstraintAssemblyTypeScanner.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Context.Attributes { /// @@ -51,4 +49,4 @@ namespace Spring.Context.Attributes /// protected abstract bool IsRequiredConstraintSatisfiedBy(Type type); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Attributes/ScannedGenericObjectDefinition.cs b/src/Spring/Spring.Core/Context/Attributes/ScannedGenericObjectDefinition.cs index abd823d5..4cd8a55d 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ScannedGenericObjectDefinition.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ScannedGenericObjectDefinition.cs @@ -18,8 +18,6 @@ #endregion -using System; - using Common.Logging; using Spring.Objects; diff --git a/src/Spring/Spring.Core/Context/Attributes/ScopeAttribute.cs b/src/Spring/Spring.Core/Context/Attributes/ScopeAttribute.cs index 3cb343da..f3dc87d1 100644 --- a/src/Spring/Spring.Core/Context/Attributes/ScopeAttribute.cs +++ b/src/Spring/Spring.Core/Context/Attributes/ScopeAttribute.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Objects.Factory.Support; namespace Spring.Context.Attributes diff --git a/src/Spring/Spring.Core/Context/Attributes/TypeFilters/AbstractLoadTypeFilter.cs b/src/Spring/Spring.Core/Context/Attributes/TypeFilters/AbstractLoadTypeFilter.cs index 07371a22..c968e4d6 100644 --- a/src/Spring/Spring.Core/Context/Attributes/TypeFilters/AbstractLoadTypeFilter.cs +++ b/src/Spring/Spring.Core/Context/Attributes/TypeFilters/AbstractLoadTypeFilter.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Core.TypeResolution; using Common.Logging; diff --git a/src/Spring/Spring.Core/Context/Attributes/TypeFilters/AssignableTypeFilter.cs b/src/Spring/Spring.Core/Context/Attributes/TypeFilters/AssignableTypeFilter.cs index d0ea77c2..4c3e5d46 100644 --- a/src/Spring/Spring.Core/Context/Attributes/TypeFilters/AssignableTypeFilter.cs +++ b/src/Spring/Spring.Core/Context/Attributes/TypeFilters/AssignableTypeFilter.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Context.Attributes.TypeFilters { diff --git a/src/Spring/Spring.Core/Context/Attributes/TypeFilters/AttributeTypeFilter.cs b/src/Spring/Spring.Core/Context/Attributes/TypeFilters/AttributeTypeFilter.cs index d5343a58..21cfd518 100644 --- a/src/Spring/Spring.Core/Context/Attributes/TypeFilters/AttributeTypeFilter.cs +++ b/src/Spring/Spring.Core/Context/Attributes/TypeFilters/AttributeTypeFilter.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Context.Attributes.TypeFilters { diff --git a/src/Spring/Spring.Core/Context/Attributes/TypeFilters/CustomTypeFactory.cs b/src/Spring/Spring.Core/Context/Attributes/TypeFilters/CustomTypeFactory.cs index 69464f06..568e43dd 100644 --- a/src/Spring/Spring.Core/Context/Attributes/TypeFilters/CustomTypeFactory.cs +++ b/src/Spring/Spring.Core/Context/Attributes/TypeFilters/CustomTypeFactory.cs @@ -18,7 +18,6 @@ #endregion -using System; using Common.Logging; using Spring.Core.TypeResolution; using Spring.Util; diff --git a/src/Spring/Spring.Core/Context/Attributes/TypeFilters/ITypeFilter.cs b/src/Spring/Spring.Core/Context/Attributes/TypeFilters/ITypeFilter.cs index 58294a61..eca8a730 100644 --- a/src/Spring/Spring.Core/Context/Attributes/TypeFilters/ITypeFilter.cs +++ b/src/Spring/Spring.Core/Context/Attributes/TypeFilters/ITypeFilter.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Context.Attributes.TypeFilters { /// diff --git a/src/Spring/Spring.Core/Context/Attributes/TypeFilters/RegexPatternTypeFilter.cs b/src/Spring/Spring.Core/Context/Attributes/TypeFilters/RegexPatternTypeFilter.cs index 0b26bd0a..549da9b7 100644 --- a/src/Spring/Spring.Core/Context/Attributes/TypeFilters/RegexPatternTypeFilter.cs +++ b/src/Spring/Spring.Core/Context/Attributes/TypeFilters/RegexPatternTypeFilter.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Text.RegularExpressions; namespace Spring.Context.Attributes.TypeFilters diff --git a/src/Spring/Spring.Core/Context/EventListenerAttribute.cs b/src/Spring/Spring.Core/Context/EventListenerAttribute.cs index bf54feca..455d2274 100644 --- a/src/Spring/Spring.Core/Context/EventListenerAttribute.cs +++ b/src/Spring/Spring.Core/Context/EventListenerAttribute.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Context diff --git a/src/Spring/Spring.Core/Context/Events/ConsoleListener.cs b/src/Spring/Spring.Core/Context/Events/ConsoleListener.cs index bdd4ec8e..96d6c431 100644 --- a/src/Spring/Spring.Core/Context/Events/ConsoleListener.cs +++ b/src/Spring/Spring.Core/Context/Events/ConsoleListener.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,6 @@ #endregion -#region Imports - -using System; - -#endregion - namespace Spring.Context.Events { /// @@ -40,7 +34,7 @@ namespace Spring.Context.Events public sealed class ConsoleListener : IApplicationEventListener { /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// public ConsoleListener() @@ -62,4 +56,4 @@ namespace Spring.Context.Events Console.WriteLine("Event fired : " + e.TimeStamp); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Extension/GenericApplicationContextExtensions.cs b/src/Spring/Spring.Core/Context/Extension/GenericApplicationContextExtensions.cs index d7d1fefe..93324276 100644 --- a/src/Spring/Spring.Core/Context/Extension/GenericApplicationContextExtensions.cs +++ b/src/Spring/Spring.Core/Context/Extension/GenericApplicationContextExtensions.cs @@ -18,8 +18,6 @@ #endregion - -using System; using System.Reflection; using Spring.Context.Attributes; using Spring.Objects.Factory.Support; @@ -125,4 +123,4 @@ namespace Spring.Context.Support } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/IApplicationContext.cs b/src/Spring/Spring.Core/Context/IApplicationContext.cs index 3d181ec6..3e686fd6 100644 --- a/src/Spring/Spring.Core/Context/IApplicationContext.cs +++ b/src/Spring/Spring.Core/Context/IApplicationContext.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - using Spring.Core.IO; using Spring.Objects.Events; using Spring.Objects.Factory; @@ -159,4 +157,4 @@ namespace Spring.Context string Name { get; set; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/IConfigurableApplicationContext.cs b/src/Spring/Spring.Core/Context/IConfigurableApplicationContext.cs index 91778551..0f17cd60 100644 --- a/src/Spring/Spring.Core/Context/IConfigurableApplicationContext.cs +++ b/src/Spring/Spring.Core/Context/IConfigurableApplicationContext.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,8 @@ #endregion -#region Imports - using Spring.Objects.Factory.Config; -#endregion - namespace Spring.Context { /// @@ -67,7 +63,7 @@ namespace Spring.Context /// Can be used to access specific functionality of the factory. ///

/// - /// This is just guaranteed to return an instance that is not + /// This is just guaranteed to return an instance that is not /// after the context has been refreshed /// at least once. /// @@ -128,4 +124,4 @@ namespace Spring.Context /// new IApplicationContext ParentContext { get; set; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/IMessageSourceResolvable.cs b/src/Spring/Spring.Core/Context/IMessageSourceResolvable.cs index 74570765..a33e08b7 100644 --- a/src/Spring/Spring.Core/Context/IMessageSourceResolvable.cs +++ b/src/Spring/Spring.Core/Context/IMessageSourceResolvable.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System.Collections.Generic; using System.Globalization; -#endregion - namespace Spring.Context { /// diff --git a/src/Spring/Spring.Core/Context/NoSuchMessageException.cs b/src/Spring/Spring.Core/Context/NoSuchMessageException.cs index a6b6c9f6..47a66f31 100644 --- a/src/Spring/Spring.Core/Context/NoSuchMessageException.cs +++ b/src/Spring/Spring.Core/Context/NoSuchMessageException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Globalization; using System.Runtime.Serialization; @@ -111,4 +110,4 @@ namespace Spring.Context { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Support/AbstractApplicationContext.cs b/src/Spring/Spring.Core/Context/Support/AbstractApplicationContext.cs index 36863b57..c322194e 100644 --- a/src/Spring/Spring.Core/Context/Support/AbstractApplicationContext.cs +++ b/src/Spring/Spring.Core/Context/Support/AbstractApplicationContext.cs @@ -14,9 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections; -using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using Common.Logging; @@ -2389,4 +2386,4 @@ namespace Spring.Context.Support public int Order => Int32.MinValue; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Support/AbstractMessageSource.cs b/src/Spring/Spring.Core/Context/Support/AbstractMessageSource.cs index 462e71bc..c6f28b6c 100644 --- a/src/Spring/Spring.Core/Context/Support/AbstractMessageSource.cs +++ b/src/Spring/Spring.Core/Context/Support/AbstractMessageSource.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Globalization; using Common.Logging; @@ -614,4 +612,4 @@ namespace Spring.Context.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Support/AbstractXmlApplicationContext.cs b/src/Spring/Spring.Core/Context/Support/AbstractXmlApplicationContext.cs index 4c5ce413..1e898300 100644 --- a/src/Spring/Spring.Core/Context/Support/AbstractXmlApplicationContext.cs +++ b/src/Spring/Spring.Core/Context/Support/AbstractXmlApplicationContext.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,11 +18,6 @@ #endregion -#region Imports - -using System; -using System.IO; - using Spring.Objects; using Spring.Objects.Factory.Config; using Spring.Objects.Factory.Support; @@ -30,15 +25,13 @@ using Spring.Objects.Factory.Xml; using Spring.Util; using Spring.Core.IO; -#endregion - namespace Spring.Context.Support { /// /// Convenient abstract superclass for /// implementations that /// draw their configuration from XML documents containing object - /// definitions as understood by an + /// definitions as understood by an /// . /// /// Rod Johnson @@ -201,7 +194,7 @@ namespace Spring.Context.Support { } /// - /// Load the object definitions with the given + /// Load the object definitions with the given /// . /// /// @@ -294,7 +287,7 @@ namespace Spring.Context.Support /// This default implementation creates a /// /// with the internal object factory of this context's parent serving - /// as the parent object factory. Can be overridden in subclasse,s + /// as the parent object factory. Can be overridden in subclasse,s /// for example to customize DefaultListableBeanFactory's settings. ///

///
@@ -317,12 +310,12 @@ namespace Spring.Context.Support } /// - /// Determine whether the given object name is already in use within this context's object factory, - /// i.e. whether there is a local object or alias registered under this name. + /// Determine whether the given object name is already in use within this context's object factory, + /// i.e. whether there is a local object or alias registered under this name. /// public override bool IsObjectNameInUse(string objectName) { return _objectFactory.IsObjectNameInUse(objectName); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Support/ApplicationObjectSupport.cs b/src/Spring/Spring.Core/Context/Support/ApplicationObjectSupport.cs index bb1cdf8b..60ab4ddc 100644 --- a/src/Spring/Spring.Core/Context/Support/ApplicationObjectSupport.cs +++ b/src/Spring/Spring.Core/Context/Support/ApplicationObjectSupport.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,20 +18,14 @@ #endregion -#region Imports - -using System; - using Spring.Objects; -#endregion - namespace Spring.Context.Support { /// /// Convenient superclass for application objects that want to be aware of /// the application context, e.g. for custom lookup of collaborating object - /// or for context-specific resource access. + /// or for context-specific resource access. /// /// ///

@@ -151,7 +145,7 @@ namespace Spring.Context.Support /// implementation /// instance that is not compatible with the /// defined by the value of the - /// . + /// . /// property. Also, thrown when trying to re-initialize with a /// different than was /// originally used. @@ -206,4 +200,4 @@ namespace Spring.Context.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Support/ContextHandler.cs b/src/Spring/Spring.Core/Context/Support/ContextHandler.cs index bed2d8e5..da1ba2f8 100644 --- a/src/Spring/Spring.Core/Context/Support/ContextHandler.cs +++ b/src/Spring/Spring.Core/Context/Support/ContextHandler.cs @@ -20,8 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; using System.Configuration; using System.Reflection; using System.Xml; diff --git a/src/Spring/Spring.Core/Context/Support/ContextRegistry.cs b/src/Spring/Spring.Core/Context/Support/ContextRegistry.cs index c211c29c..f9f68178 100644 --- a/src/Spring/Spring.Core/Context/Support/ContextRegistry.cs +++ b/src/Spring/Spring.Core/Context/Support/ContextRegistry.cs @@ -1,39 +1,32 @@ #region License -/* - * Copyright � 2002-2011 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. +/* + * Copyright � 2002-2011 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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.Collections.Generic; - using Common.Logging; using Spring.Context.Events; using Spring.Util; -#endregion - namespace Spring.Context.Support { - ///

- /// Provides access to a central registry of + /// + /// Provides access to a central registry of /// s. /// /// @@ -147,15 +140,15 @@ namespace Spring.Context.Support } - /// + /// /// Registers an instance of an - /// . - /// + /// . + /// /// ///

/// This is usually called via a /// inside a .NET - /// application configuration file. + /// application configuration file. ///

///
/// The application context to be registered. @@ -212,7 +205,7 @@ namespace Spring.Context.Support } /// - /// Removes the context from the registry + /// Removes the context from the registry /// /// /// Has no effect if the context wasn't registered @@ -239,8 +232,8 @@ namespace Spring.Context.Support ///
/// ///

- /// The first call to GetContext will create the context - /// as specified in the .NET application configuration file + /// The first call to GetContext will create the context + /// as specified in the .NET application configuration file /// under the location spring/context. ///

///
@@ -264,8 +257,8 @@ namespace Spring.Context.Support ///
/// ///

- /// The first call to GetContext will create the context - /// as specified in the .NET application configuration file + /// The first call to GetContext will create the context + /// as specified in the .NET application configuration file /// under the location spring/context. ///

///
@@ -327,8 +320,8 @@ namespace Spring.Context.Support ctx.Dispose(); } - // contexts will be removed from contextMap during OnContextEvent handler - // but someone might choose to override AbstractApplicationContext.Dispose() without + // contexts will be removed from contextMap during OnContextEvent handler + // but someone might choose to override AbstractApplicationContext.Dispose() without // calling base.Dispose() ... if (log.IsWarnEnabled) { diff --git a/src/Spring/Spring.Core/Context/Support/DefaultMessageSourceResolvable.cs b/src/Spring/Spring.Core/Context/Support/DefaultMessageSourceResolvable.cs index 5f86f20f..b7626c6a 100644 --- a/src/Spring/Spring.Core/Context/Support/DefaultMessageSourceResolvable.cs +++ b/src/Spring/Spring.Core/Context/Support/DefaultMessageSourceResolvable.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,15 +18,9 @@ #endregion -#region Imports - -using System; -using System.Collections.Generic; using System.Globalization; using Spring.Util; -#endregion - namespace Spring.Context.Support { /// @@ -68,7 +62,7 @@ namespace Spring.Context.Support /// The codes to be used to resolve this message public DefaultMessageSourceResolvable(string[] codes) : this(codes, StringUtils.EmptyStrings, string.Empty) - { + { } /// @@ -224,4 +218,4 @@ namespace Spring.Context.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Support/DelegatingMessageSource.cs b/src/Spring/Spring.Core/Context/Support/DelegatingMessageSource.cs index 03bddaa1..7798f81b 100644 --- a/src/Spring/Spring.Core/Context/Support/DelegatingMessageSource.cs +++ b/src/Spring/Spring.Core/Context/Support/DelegatingMessageSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System.Collections.Generic; using System.Globalization; using Spring.Util; @@ -384,4 +383,4 @@ namespace Spring.Context.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Support/GenericApplicationContext.cs b/src/Spring/Spring.Core/Context/Support/GenericApplicationContext.cs index cef3d73c..de5436ee 100644 --- a/src/Spring/Spring.Core/Context/Support/GenericApplicationContext.cs +++ b/src/Spring/Spring.Core/Context/Support/GenericApplicationContext.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Objects.Factory.Config; using Spring.Objects.Factory.Support; using Spring.Util; @@ -186,4 +185,4 @@ namespace Spring.Context.Support return objectFactory.IsObjectNameInUse(objectName); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Support/NamespaceParsersSectionHandler.cs b/src/Spring/Spring.Core/Context/Support/NamespaceParsersSectionHandler.cs index a51ba2c2..5949cb43 100644 --- a/src/Spring/Spring.Core/Context/Support/NamespaceParsersSectionHandler.cs +++ b/src/Spring/Spring.Core/Context/Support/NamespaceParsersSectionHandler.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Configuration; using System.Globalization; using System.Xml; diff --git a/src/Spring/Spring.Core/Context/Support/NullMessageSource.cs b/src/Spring/Spring.Core/Context/Support/NullMessageSource.cs index 387bdc5d..4a386396 100644 --- a/src/Spring/Spring.Core/Context/Support/NullMessageSource.cs +++ b/src/Spring/Spring.Core/Context/Support/NullMessageSource.cs @@ -18,12 +18,8 @@ #endregion -#region Imports - using System.Globalization; -#endregion - namespace Spring.Context.Support { /// @@ -40,7 +36,7 @@ namespace Spring.Context.Support /// There should not (typically) be a need to instantiate instances of this class; /// does not maintan any state /// and the instance is - /// thus safe to pass around. + /// thus safe to pass around. ///

/// /// Aleksandar Seovic @@ -113,4 +109,4 @@ namespace Spring.Context.Support object value, string objectName, CultureInfo cultureInfo) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Support/ResourceSetMessageSource.cs b/src/Spring/Spring.Core/Context/Support/ResourceSetMessageSource.cs index d23a0ebf..617d399f 100644 --- a/src/Spring/Spring.Core/Context/Support/ResourceSetMessageSource.cs +++ b/src/Spring/Spring.Core/Context/Support/ResourceSetMessageSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.Resources; @@ -230,4 +228,4 @@ namespace Spring.Context.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Support/StaticApplicationContext.cs b/src/Spring/Spring.Core/Context/Support/StaticApplicationContext.cs index eefe7ca5..e95efd01 100644 --- a/src/Spring/Spring.Core/Context/Support/StaticApplicationContext.cs +++ b/src/Spring/Spring.Core/Context/Support/StaticApplicationContext.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Globalization; using Spring.Objects; using Spring.Objects.Factory.Support; diff --git a/src/Spring/Spring.Core/Context/Support/StaticMessageSource.cs b/src/Spring/Spring.Core/Context/Support/StaticMessageSource.cs index 121fb268..1d63d947 100644 --- a/src/Spring/Spring.Core/Context/Support/StaticMessageSource.cs +++ b/src/Spring/Spring.Core/Context/Support/StaticMessageSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using System.Text; -#endregion - namespace Spring.Context.Support { /// @@ -134,7 +129,7 @@ namespace Spring.Context.Support /// protected override void ApplyResourcesToObject(object value, string objectName, CultureInfo cultureInfo) { - if(value != null) + if(value != null) { new ComponentResourceManager(value.GetType()).ApplyResources(value, objectName, cultureInfo); } @@ -200,4 +195,4 @@ namespace Spring.Context.Support return new StringBuilder(code).Append("_").Append(culture).ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Context/Support/XmlApplicationContext.cs b/src/Spring/Spring.Core/Context/Support/XmlApplicationContext.cs index d2bdd26d..b0f6a63a 100644 --- a/src/Spring/Spring.Core/Context/Support/XmlApplicationContext.cs +++ b/src/Spring/Spring.Core/Context/Support/XmlApplicationContext.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -19,7 +19,6 @@ #endregion using Spring.Core.IO; -using System; namespace Spring.Context.Support { @@ -282,4 +281,4 @@ namespace Spring.Context.Support get { return _configurationResources; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/AttributeAccessorSupport.cs b/src/Spring/Spring.Core/Core/AttributeAccessorSupport.cs index 623798ee..0455ccef 100644 --- a/src/Spring/Spring.Core/Core/AttributeAccessorSupport.cs +++ b/src/Spring/Spring.Core/Core/AttributeAccessorSupport.cs @@ -18,10 +18,7 @@ #endregion -using System; -using System.Collections.Generic; using System.Diagnostics; -using System.Linq; namespace Spring.Core { diff --git a/src/Spring/Spring.Core/Core/CannotLoadObjectTypeException.cs b/src/Spring/Spring.Core/Core/CannotLoadObjectTypeException.cs index ad52c518..4eeab991 100644 --- a/src/Spring/Spring.Core/Core/CannotLoadObjectTypeException.cs +++ b/src/Spring/Spring.Core/Core/CannotLoadObjectTypeException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; using System.Security.Permissions; using Spring.Util; @@ -176,4 +175,4 @@ namespace Spring.Core #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/ComposedCriteria.cs b/src/Spring/Spring.Core/Core/ComposedCriteria.cs index 1a63d051..85672893 100644 --- a/src/Spring/Spring.Core/Core/ComposedCriteria.cs +++ b/src/Spring/Spring.Core/Core/ComposedCriteria.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System.Collections.Generic; - #endregion namespace Spring.Core @@ -112,4 +110,4 @@ namespace Spring.Core #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/ControlFlowFactory.cs b/src/Spring/Spring.Core/Core/ControlFlowFactory.cs index 28c93d96..8c9b037f 100644 --- a/src/Spring/Spring.Core/Core/ControlFlowFactory.cs +++ b/src/Spring/Spring.Core/Core/ControlFlowFactory.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Diagnostics; using System.Reflection; @@ -111,12 +110,12 @@ namespace Spring.Core return _stackTrace.ToString().IndexOf(token) != -1; } - private bool IsMatch(ICriteria criteria) + private bool IsMatch(ICriteria criteria) { for (int i = 0; i < _stackTrace.FrameCount; i++) { MethodBase method = _stackTrace.GetFrame(i).GetMethod(); - if(criteria.IsSatisfied(method)) + if(criteria.IsSatisfied(method)) { return true; } @@ -124,7 +123,7 @@ namespace Spring.Core return false; } - private sealed class MethodsDeclaredTypeCriteria : ICriteria + private sealed class MethodsDeclaredTypeCriteria : ICriteria { public MethodsDeclaredTypeCriteria(Type typeToMatch) { @@ -134,7 +133,7 @@ namespace Spring.Core public bool IsSatisfied(object datum) { MethodBase method = datum as MethodBase; - if(method != null && method.DeclaringType != null) + if(method != null && method.DeclaringType != null) { return method.DeclaringType.Equals(_typeToMatch); } @@ -147,4 +146,4 @@ namespace Spring.Core #endregion } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/Conventions.cs b/src/Spring/Spring.Core/Core/Conventions.cs index 04d8e64c..db8a3b80 100644 --- a/src/Spring/Spring.Core/Core/Conventions.cs +++ b/src/Spring/Spring.Core/Core/Conventions.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Util; namespace Spring.Core @@ -58,7 +57,7 @@ namespace Spring.Core { result[currPos++] = Char.ToUpper(c); upperCaseNext = false; - } + } else { result[currPos++] = c; @@ -67,4 +66,4 @@ namespace Spring.Core return new String(result, 0, currPos); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/IAttributeAccessor.cs b/src/Spring/Spring.Core/Core/IAttributeAccessor.cs index 76f1d2d2..f7c16824 100644 --- a/src/Spring/Spring.Core/Core/IAttributeAccessor.cs +++ b/src/Spring/Spring.Core/Core/IAttributeAccessor.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Core { /// diff --git a/src/Spring/Spring.Core/Core/IControlFlow.cs b/src/Spring/Spring.Core/Core/IControlFlow.cs index 36d5390e..3524a690 100644 --- a/src/Spring/Spring.Core/Core/IControlFlow.cs +++ b/src/Spring/Spring.Core/Core/IControlFlow.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,13 +20,11 @@ #region Imports -using System; - #endregion namespace Spring.Core { - /// + /// /// Interface to be implemented by objects that can return information about /// the current call stack. /// @@ -50,7 +48,7 @@ namespace Spring.Core /// if the caller is under the supplied . /// bool Under(Type type); - + /// /// Detects whether the caller is under the supplied /// and , according to the current stacktrace. @@ -64,7 +62,7 @@ namespace Spring.Core /// and . /// bool Under(Type type, string methodName); - + /// /// Does the current stack trace contain the supplied ? /// @@ -75,4 +73,4 @@ namespace Spring.Core /// bool UnderToken(string token); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/IO/AbstractResource.cs b/src/Spring/Spring.Core/Core/IO/AbstractResource.cs index 597808e1..aebe339e 100644 --- a/src/Spring/Spring.Core/Core/IO/AbstractResource.cs +++ b/src/Spring/Spring.Core/Core/IO/AbstractResource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; -using System.IO; using System.Text; using Spring.Util; @@ -747,4 +745,4 @@ namespace Spring.Core.IO #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/IO/AssemblyResource.cs b/src/Spring/Spring.Core/Core/IO/AssemblyResource.cs index d64d0aed..d3207f4b 100644 --- a/src/Spring/Spring.Core/Core/IO/AssemblyResource.cs +++ b/src/Spring/Spring.Core/Core/IO/AssemblyResource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,9 +20,7 @@ #region Imports -using System; using System.Globalization; -using System.IO; using System.Reflection; using Common.Logging; @@ -275,4 +273,4 @@ namespace Spring.Core.IO resourceName.Split('/').Length != 3); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/IO/ConfigSectionResource.cs b/src/Spring/Spring.Core/Core/IO/ConfigSectionResource.cs index 3e3a3940..a701dce1 100644 --- a/src/Spring/Spring.Core/Core/IO/ConfigSectionResource.cs +++ b/src/Spring/Spring.Core/Core/IO/ConfigSectionResource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; -using System.IO; using System.Text; using System.Xml; @@ -207,4 +205,4 @@ namespace Spring.Core.IO #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/IO/ConfigurableResourceLoader.cs b/src/Spring/Spring.Core/Core/IO/ConfigurableResourceLoader.cs index c3d9306c..e6025d93 100644 --- a/src/Spring/Spring.Core/Core/IO/ConfigurableResourceLoader.cs +++ b/src/Spring/Spring.Core/Core/IO/ConfigurableResourceLoader.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using Spring.Util; using Spring.Reflection.Dynamic; @@ -193,4 +192,4 @@ namespace Spring.Core.IO #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/IO/EncodedResource.cs b/src/Spring/Spring.Core/Core/IO/EncodedResource.cs index ed7e2175..a6d4a07b 100644 --- a/src/Spring/Spring.Core/Core/IO/EncodedResource.cs +++ b/src/Spring/Spring.Core/Core/IO/EncodedResource.cs @@ -1,24 +1,23 @@ #region License -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. +/* + * Copyright 2002-2010 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 -using System.IO; using System.Text; using Spring.Util; @@ -142,4 +141,4 @@ namespace Spring.Core.IO return this.resource.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/IO/FileSystemResource.cs b/src/Spring/Spring.Core/Core/IO/FileSystemResource.cs index 47445be6..f75c6f59 100644 --- a/src/Spring/Spring.Core/Core/IO/FileSystemResource.cs +++ b/src/Spring/Spring.Core/Core/IO/FileSystemResource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,9 +20,7 @@ #region Imports -using System; using System.Globalization; -using System.IO; using Spring.Util; #endregion @@ -390,4 +388,4 @@ namespace Spring.Core.IO resourceName.StartsWith(BasePathPlaceHolder))); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/IO/IInputStreamSource.cs b/src/Spring/Spring.Core/Core/IO/IInputStreamSource.cs index 28307e51..ad856e2a 100644 --- a/src/Spring/Spring.Core/Core/IO/IInputStreamSource.cs +++ b/src/Spring/Spring.Core/Core/IO/IInputStreamSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System.IO; - #endregion namespace Spring.Core.IO diff --git a/src/Spring/Spring.Core/Core/IO/IResource.cs b/src/Spring/Spring.Core/Core/IO/IResource.cs index 03cc97c4..412c144f 100644 --- a/src/Spring/Spring.Core/Core/IO/IResource.cs +++ b/src/Spring/Spring.Core/Core/IO/IResource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,9 +20,7 @@ #region Imports -using System; using System.ComponentModel; -using System.IO; #endregion diff --git a/src/Spring/Spring.Core/Core/IO/InputStreamResource.cs b/src/Spring/Spring.Core/Core/IO/InputStreamResource.cs index 9852c60a..67f46a0a 100644 --- a/src/Spring/Spring.Core/Core/IO/InputStreamResource.cs +++ b/src/Spring/Spring.Core/Core/IO/InputStreamResource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; -using System.IO; using Spring.Util; #endregion @@ -141,4 +139,4 @@ namespace Spring.Core.IO #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/IO/ResourceConverter.cs b/src/Spring/Spring.Core/Core/IO/ResourceConverter.cs index 868298d5..8449c597 100644 --- a/src/Spring/Spring.Core/Core/IO/ResourceConverter.cs +++ b/src/Spring/Spring.Core/Core/IO/ResourceConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; using System.ComponentModel; using System.Globalization; using Common.Logging; @@ -211,4 +209,4 @@ namespace Spring.Core.IO return _resourceLoader; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/IO/ResourceHandlerRegistry.cs b/src/Spring/Spring.Core/Core/IO/ResourceHandlerRegistry.cs index ab0b21eb..88963791 100644 --- a/src/Spring/Spring.Core/Core/IO/ResourceHandlerRegistry.cs +++ b/src/Spring/Spring.Core/Core/IO/ResourceHandlerRegistry.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Reflection; using Spring.Context.Support; @@ -288,4 +286,4 @@ namespace Spring.Core.IO return new SafeConstructor(ctor); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/IO/StringResource.cs b/src/Spring/Spring.Core/Core/IO/StringResource.cs index 631be25e..14472963 100644 --- a/src/Spring/Spring.Core/Core/IO/StringResource.cs +++ b/src/Spring/Spring.Core/Core/IO/StringResource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System.IO; using System.Text; using Spring.Util; @@ -127,4 +126,4 @@ namespace Spring.Core.IO get { return _content; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/IO/UrlResource.cs b/src/Spring/Spring.Core/Core/IO/UrlResource.cs index 7cbd2c5e..93e22fd3 100644 --- a/src/Spring/Spring.Core/Core/IO/UrlResource.cs +++ b/src/Spring/Spring.Core/Core/IO/UrlResource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; -using System.IO; using System.Net; using Spring.Util; @@ -270,4 +268,4 @@ namespace Spring.Core.IO return true; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/InvalidPropertyException.cs b/src/Spring/Spring.Core/Core/InvalidPropertyException.cs index 5c4045e1..a919e4bf 100644 --- a/src/Spring/Spring.Core/Core/InvalidPropertyException.cs +++ b/src/Spring/Spring.Core/Core/InvalidPropertyException.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Globalization; using System.Runtime.Serialization; using System.Security.Permissions; @@ -187,4 +186,4 @@ namespace Spring.Core private Type offendingObjectType; private string offendingPropertyName; } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/MethodArgumentsCriteria.cs b/src/Spring/Spring.Core/Core/MethodArgumentsCriteria.cs index 91f4ebd9..5d82af6b 100644 --- a/src/Spring/Spring.Core/Core/MethodArgumentsCriteria.cs +++ b/src/Spring/Spring.Core/Core/MethodArgumentsCriteria.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using Spring.Util; @@ -176,4 +175,4 @@ namespace Spring.Core #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/MethodGenericArgumentsCountCriteria.cs b/src/Spring/Spring.Core/Core/MethodGenericArgumentsCountCriteria.cs index 3c458c73..fee66065 100644 --- a/src/Spring/Spring.Core/Core/MethodGenericArgumentsCountCriteria.cs +++ b/src/Spring/Spring.Core/Core/MethodGenericArgumentsCountCriteria.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; #endregion @@ -33,7 +32,7 @@ namespace Spring.Core /// /// ///

- /// This class supports checking the generic arguments count of both + /// This class supports checking the generic arguments count of both /// generic methods and constructors. ///

///
@@ -62,7 +61,7 @@ namespace Spring.Core /// class. ///
/// - /// The number of generic arguments that a + /// The number of generic arguments that a /// must have to satisfy this criteria. /// /// @@ -79,7 +78,7 @@ namespace Spring.Core #region Properties /// - /// The number of generic arguments that a + /// The number of generic arguments that a /// must have to satisfy this criteria. /// /// diff --git a/src/Spring/Spring.Core/Core/MethodInvocationException.cs b/src/Spring/Spring.Core/Core/MethodInvocationException.cs index c6a8a94a..3f682561 100644 --- a/src/Spring/Spring.Core/Core/MethodInvocationException.cs +++ b/src/Spring/Spring.Core/Core/MethodInvocationException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; #endregion @@ -44,7 +43,7 @@ namespace Spring.Core get { return "methodInvocation"; - } + } } #region Constructor (s) / Destructor @@ -79,7 +78,7 @@ namespace Spring.Core : base (message, rootCause) { } - + /// /// Constructor to use when an exception results from a /// . @@ -91,7 +90,7 @@ namespace Spring.Core /// The that /// resulted in an exception. /// - public MethodInvocationException (Exception ex, PropertyChangeEventArgs argument) : + public MethodInvocationException (Exception ex, PropertyChangeEventArgs argument) : base ("Property '" + argument.PropertyName + "' threw exception.", argument, ex) { } @@ -114,4 +113,4 @@ namespace Spring.Core } #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/MethodParameter.cs b/src/Spring/Spring.Core/Core/MethodParameter.cs index 7d5c8f5c..8fecfaeb 100644 --- a/src/Spring/Spring.Core/Core/MethodParameter.cs +++ b/src/Spring/Spring.Core/Core/MethodParameter.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Reflection; using Spring.Util; @@ -77,7 +76,7 @@ namespace Spring.Core { this.parameterType = (this.methodInfo != null ? ReflectionUtils.GetParameterTypes(this.methodInfo.GetParameters())[parameterIndex] - : ReflectionUtils.GetParameterTypes(this.constructorInfo.GetParameters())[parameterIndex]); + : ReflectionUtils.GetParameterTypes(this.constructorInfo.GetParameters())[parameterIndex]); } return this.parameterType; } @@ -167,4 +166,4 @@ namespace Spring.Core } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/MethodParametersCountCriteria.cs b/src/Spring/Spring.Core/Core/MethodParametersCountCriteria.cs index 204caa9a..be456df1 100644 --- a/src/Spring/Spring.Core/Core/MethodParametersCountCriteria.cs +++ b/src/Spring/Spring.Core/Core/MethodParametersCountCriteria.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; #endregion @@ -143,4 +142,4 @@ namespace Spring.Core #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/MethodParametersCriteria.cs b/src/Spring/Spring.Core/Core/MethodParametersCriteria.cs index eeffbd5d..b1cc4cf3 100644 --- a/src/Spring/Spring.Core/Core/MethodParametersCriteria.cs +++ b/src/Spring/Spring.Core/Core/MethodParametersCriteria.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; #endregion @@ -123,4 +122,4 @@ namespace Spring.Core #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/MethodReturnTypeCriteria.cs b/src/Spring/Spring.Core/Core/MethodReturnTypeCriteria.cs index 158da765..07269b7b 100644 --- a/src/Spring/Spring.Core/Core/MethodReturnTypeCriteria.cs +++ b/src/Spring/Spring.Core/Core/MethodReturnTypeCriteria.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; #endregion @@ -116,4 +115,4 @@ namespace Spring.Core #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/NotReadablePropertyException.cs b/src/Spring/Spring.Core/Core/NotReadablePropertyException.cs index dc184ede..ef0fae38 100644 --- a/src/Spring/Spring.Core/Core/NotReadablePropertyException.cs +++ b/src/Spring/Spring.Core/Core/NotReadablePropertyException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Globalization; using System.Runtime.Serialization; @@ -112,4 +111,4 @@ namespace Spring.Core { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/NotWritablePropertyException.cs b/src/Spring/Spring.Core/Core/NotWritablePropertyException.cs index 7920efa2..1541fa2e 100644 --- a/src/Spring/Spring.Core/Core/NotWritablePropertyException.cs +++ b/src/Spring/Spring.Core/Core/NotWritablePropertyException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Globalization; using System.Runtime.Serialization; @@ -144,4 +143,4 @@ namespace Spring.Core { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/NullValueInNestedPathException.cs b/src/Spring/Spring.Core/Core/NullValueInNestedPathException.cs index 3302bca0..53acaf3a 100644 --- a/src/Spring/Spring.Core/Core/NullValueInNestedPathException.cs +++ b/src/Spring/Spring.Core/Core/NullValueInNestedPathException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Globalization; using System.Runtime.Serialization; using System.Security.Permissions; @@ -168,4 +167,4 @@ namespace Spring.Core #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/OrderComparator.cs b/src/Spring/Spring.Core/Core/OrderComparator.cs index 57231165..4fa7976c 100644 --- a/src/Spring/Spring.Core/Core/OrderComparator.cs +++ b/src/Spring/Spring.Core/Core/OrderComparator.cs @@ -2,13 +2,13 @@ /* * Copyright © 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,9 +20,7 @@ #region Imports -using System; using System.Collections; -using System.Collections.Generic; #endregion @@ -99,7 +97,7 @@ namespace Spring.Core } /// - /// Handle the case when both objects have equal sort order priority. By default returns 0, + /// Handle the case when both objects have equal sort order priority. By default returns 0, /// but may be overriden for handling special cases. /// /// The first object to compare. @@ -112,4 +110,4 @@ namespace Spring.Core return 0; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/PropertyAccessException.cs b/src/Spring/Spring.Core/Core/PropertyAccessException.cs index 61d8c841..272c94f9 100644 --- a/src/Spring/Spring.Core/Core/PropertyAccessException.cs +++ b/src/Spring/Spring.Core/Core/PropertyAccessException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; using System.Security.Permissions; @@ -155,4 +154,4 @@ namespace Spring.Core _propertyChangeEventArgs = info.GetValue("PropertyChangeArgs", typeof (object)) as PropertyChangeEventArgs; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/PropertyChangeEventArgs.cs b/src/Spring/Spring.Core/Core/PropertyChangeEventArgs.cs index 278f92be..7b005d41 100644 --- a/src/Spring/Spring.Core/Core/PropertyChangeEventArgs.cs +++ b/src/Spring/Spring.Core/Core/PropertyChangeEventArgs.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; #endregion @@ -80,4 +79,4 @@ namespace Spring.Core get { return newValue; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeConversion/CredentialConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/CredentialConverter.cs index e7599b42..627d4f9b 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/CredentialConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/CredentialConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Net; using System.ComponentModel; using System.Globalization; @@ -121,4 +120,4 @@ namespace Spring.Core.TypeConversion return base.ConvertFrom(context, culture, value); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeConversion/CustomNumberConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/CustomNumberConverter.cs index 26b34921..16641ad2 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/CustomNumberConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/CustomNumberConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; using System.Globalization; diff --git a/src/Spring/Spring.Core/Core/TypeConversion/FileInfoConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/FileInfoConverter.cs index 9b17a7af..0d0b2cda 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/FileInfoConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/FileInfoConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,10 +20,8 @@ #region Imports -using System; using System.ComponentModel; using System.Globalization; -using System.IO; #endregion @@ -106,4 +104,4 @@ namespace Spring.Core.TypeConversion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeConversion/NameValueConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/NameValueConverter.cs index 48e1ca5f..0284dcfd 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/NameValueConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/NameValueConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; using System.Configuration; using System.Globalization; @@ -155,4 +154,4 @@ namespace Spring.Core.TypeConversion return base.ConvertFrom(context, culture, value); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeConversion/RGBColorConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/RGBColorConverter.cs index c2535e9e..0effa890 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/RGBColorConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/RGBColorConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; using System.Drawing; using System.Globalization; @@ -170,4 +169,4 @@ namespace Spring.Core.TypeConversion } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeConversion/RegexConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/RegexConverter.cs index ebcd3ced..8d1517c9 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/RegexConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/RegexConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; using System.Globalization; using System.Text.RegularExpressions; @@ -88,4 +87,4 @@ namespace Spring.Core.TypeConversion } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeConversion/RegistryKeyConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/RegistryKeyConverter.cs index 45f9b35c..2d7f6bf2 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/RegistryKeyConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/RegistryKeyConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; using System.Globalization; using Microsoft.Win32; @@ -158,4 +157,4 @@ namespace Spring.Core.TypeConversion } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeConversion/ResourceManagerConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/ResourceManagerConverter.cs index 8df93f94..95495397 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/ResourceManagerConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/ResourceManagerConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -19,7 +19,6 @@ #region Imports -using System; using System.ComponentModel; using System.Globalization; using System.Reflection; diff --git a/src/Spring/Spring.Core/Core/TypeConversion/RuntimeTypeConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/RuntimeTypeConverter.cs index b37af2cd..f331aa29 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/RuntimeTypeConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/RuntimeTypeConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; using System.Globalization; diff --git a/src/Spring/Spring.Core/Core/TypeConversion/StreamConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/StreamConverter.cs index 3d47e74d..420b0565 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/StreamConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/StreamConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; using System.Globalization; @@ -83,10 +82,10 @@ namespace Spring.Core.TypeConversion /// /// True if the conversion is possible. public override bool CanConvertFrom ( - ITypeDescriptorContext context, - Type sourceType) + ITypeDescriptorContext context, + Type sourceType) { - if (sourceType == typeof (string)) + if (sourceType == typeof (string)) { return true; } @@ -102,19 +101,19 @@ namespace Spring.Core.TypeConversion /// /// /// The to use - /// as the current culture. + /// as the current culture. /// /// /// The value that is to be converted. /// /// - /// A if successful. + /// A if successful. /// public override object ConvertFrom ( - ITypeDescriptorContext context, - CultureInfo culture, object val) + ITypeDescriptorContext context, + CultureInfo culture, object val) { - if (val is string) + if (val is string) { IResource resource = (IResource) resourceConverter.ConvertFrom(context, culture, val); return resource.InputStream; diff --git a/src/Spring/Spring.Core/Core/TypeConversion/StringArrayConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/StringArrayConverter.cs index 15d9ae64..b406fae3 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/StringArrayConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/StringArrayConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; using System.Globalization; @@ -179,4 +178,4 @@ namespace Spring.Core.TypeConversion return base.ConvertFrom(context, culture, value); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeConversion/TimeSpanConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/TimeSpanConverter.cs index bb1635e4..1f8b8120 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/TimeSpanConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/TimeSpanConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; using System.Globalization; using System.Text.RegularExpressions; @@ -30,13 +29,13 @@ using System.Text.RegularExpressions; namespace Spring.Core.TypeConversion { #region Specifier parsers - + using TimeSpanNullable = Nullable; - + /// /// Base parser for custom specifiers. /// - abstract class SpecifierParser + abstract class SpecifierParser { const RegexOptions ParsingOptions = RegexOptions.IgnorePatternWhitespace | RegexOptions.Singleline | RegexOptions.IgnoreCase; @@ -53,11 +52,11 @@ namespace Spring.Core.TypeConversion public abstract TimeSpan Parse(int value); /// - /// Check if the string contains the specifier and + /// Check if the string contains the specifier and /// /// /// - public TimeSpanNullable Match(string value) + public TimeSpanNullable Match(string value) { string regex = @"^(\d+)" + Specifier + "$"; Match match = Regex.Match(value, regex, ParsingOptions); @@ -65,19 +64,19 @@ namespace Spring.Core.TypeConversion if (!match.Success) return new TimeSpanNullable(); return new TimeSpanNullable(Parse(int.Parse(match.Groups[1].Value))); - } - + } + } /// /// Recognize 10d as ten days /// - class DaySpecifier: SpecifierParser + class DaySpecifier: SpecifierParser { /// /// Day specifier: d /// - public override string Specifier + public override string Specifier { get { return "d"; } } @@ -87,7 +86,7 @@ namespace Spring.Core.TypeConversion /// /// Timespan in days /// - public override TimeSpan Parse(int value) + public override TimeSpan Parse(int value) { return TimeSpan.FromDays(value); } @@ -96,12 +95,12 @@ namespace Spring.Core.TypeConversion /// /// Recognize 10h as ten hours /// - class HourSpecifier : SpecifierParser + class HourSpecifier : SpecifierParser { /// /// Hour specifier: h /// - public override string Specifier + public override string Specifier { get { return "h"; } } @@ -120,12 +119,12 @@ namespace Spring.Core.TypeConversion /// /// Recognize 10m as ten minutes /// - class MinuteSpecifier : SpecifierParser + class MinuteSpecifier : SpecifierParser { /// /// Minute specifier: m /// - public override string Specifier + public override string Specifier { get { return "m"; } } @@ -135,7 +134,7 @@ namespace Spring.Core.TypeConversion ///
/// Timespan in minutes /// - public override TimeSpan Parse(int value) + public override TimeSpan Parse(int value) { return TimeSpan.FromMinutes(value); } @@ -144,12 +143,12 @@ namespace Spring.Core.TypeConversion /// /// Recognize 10s as ten seconds /// - class SecondSpecifier : SpecifierParser + class SecondSpecifier : SpecifierParser { /// /// Second specifier: s /// - public override string Specifier + public override string Specifier { get { return "s"; } } @@ -159,7 +158,7 @@ namespace Spring.Core.TypeConversion ///
/// Timespan in seconds /// - public override TimeSpan Parse(int value) + public override TimeSpan Parse(int value) { return TimeSpan.FromSeconds(value); } @@ -168,12 +167,12 @@ namespace Spring.Core.TypeConversion /// /// Recognize 10ms as ten milliseconds /// - class MillisecondSpecifier : SpecifierParser + class MillisecondSpecifier : SpecifierParser { /// /// Millisecond specifier: ms /// - public override string Specifier + public override string Specifier { get { return "ms"; } } @@ -183,7 +182,7 @@ namespace Spring.Core.TypeConversion ///
/// Timespan in milliseconds /// - public override TimeSpan Parse(int value) + public override TimeSpan Parse(int value) { return TimeSpan.FromMilliseconds(value); } @@ -201,9 +200,9 @@ namespace Spring.Core.TypeConversion #region Constants static readonly SpecifierParser[] Specifiers = { - new DaySpecifier(), - new HourSpecifier(), - new MinuteSpecifier(), + new DaySpecifier(), + new HourSpecifier(), + new MinuteSpecifier(), new SecondSpecifier(), new MillisecondSpecifier() }; @@ -231,13 +230,13 @@ namespace Spring.Core.TypeConversion /// /// /// The to use - /// as the current culture. + /// as the current culture. /// /// /// The value that is to be converted. /// /// - /// A if successful. + /// A if successful. /// public override object ConvertFrom( ITypeDescriptorContext context, @@ -250,7 +249,7 @@ namespace Spring.Core.TypeConversion { stringValue = stringValue.Trim(); - foreach (SpecifierParser specifierParser in Specifiers) + foreach (SpecifierParser specifierParser in Specifiers) { TimeSpanNullable res = specifierParser.Match(stringValue); if (res.HasValue) return res.Value; @@ -263,4 +262,4 @@ namespace Spring.Core.TypeConversion #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeConversion/TypeConversionUtils.cs b/src/Spring/Spring.Core/Core/TypeConversion/TypeConversionUtils.cs index e4f2ca61..0da3486e 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/TypeConversionUtils.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/TypeConversionUtils.cs @@ -20,10 +20,7 @@ #region Imports -using System; using System.Collections; -using System.Collections.Generic; - using System.ComponentModel; using Spring.Util; using System.Reflection; @@ -274,7 +271,7 @@ namespace Spring.Core.TypeConversion { if (newValue is MarshalByRefObject) { - //TODO see what type of type checking can be done. May need to + //TODO see what type of type checking can be done. May need to //preserve information when proxy was created by SaoServiceExporter. return true; } diff --git a/src/Spring/Spring.Core/Core/TypeConversion/TypeConverterRegistry.cs b/src/Spring/Spring.Core/Core/TypeConversion/TypeConverterRegistry.cs index 0ebb87e2..437815a9 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/TypeConverterRegistry.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/TypeConverterRegistry.cs @@ -20,12 +20,9 @@ #region Imports -using System; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; using System.Drawing; -using System.IO; using System.Net; using System.Resources; using System.Text.RegularExpressions; @@ -52,7 +49,7 @@ namespace Spring.Core.TypeConversion private static readonly object syncRoot = new object(); private static IDictionary converters = new Dictionary(); - + /// /// Registers standard and configured type converters. /// @@ -73,12 +70,12 @@ namespace Spring.Core.TypeConversion converters[typeof(ICredentials)] = new CredentialConverter(); converters[typeof(NetworkCredential)] = new CredentialConverter(); converters[typeof(RegistryKey)] = new RegistryKeyConverter(); - + // register user-defined type converters ConfigurationUtils.GetSection(TypeConvertersSectionName); } } - + /// /// Returns for the specified type. /// @@ -101,10 +98,10 @@ namespace Spring.Core.TypeConversion converter = TypeDescriptor.GetConverter(type); } } - + return converter; } - + /// /// Registers for the specified type. /// @@ -145,7 +142,7 @@ namespace Spring.Core.TypeConversion { AssertUtils.ArgumentHasText(typeName, "typeName"); AssertUtils.ArgumentHasText(converterTypeName, "converterTypeName"); - + try { Type type = TypeResolutionUtils.ResolveType(typeName); @@ -162,6 +159,6 @@ namespace Spring.Core.TypeConversion throw new ArgumentException("Failed to create an instance of the specified type converter.", e); } } - + } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeConversion/UniqueKeyConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/UniqueKeyConverter.cs index 924b7eeb..8c7b04b5 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/UniqueKeyConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/UniqueKeyConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Importsusing System; -using System; using System.ComponentModel; using System.Globalization; using Spring.Util; @@ -72,7 +71,7 @@ namespace Spring.Core.TypeConversion /// /// /// A if successful, otherwise. - /// + /// ///The conversion cannot be performed. public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { @@ -158,4 +157,4 @@ namespace Spring.Core.TypeConversion } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeConversion/UriConverter.cs b/src/Spring/Spring.Core/Core/TypeConversion/UriConverter.cs index dab4325e..268356a7 100644 --- a/src/Spring/Spring.Core/Core/TypeConversion/UriConverter.cs +++ b/src/Spring/Spring.Core/Core/TypeConversion/UriConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; using System.Globalization; @@ -64,10 +63,10 @@ namespace Spring.Core.TypeConversion /// /// True if the conversion is possible. public override bool CanConvertFrom ( - ITypeDescriptorContext context, - Type sourceType) + ITypeDescriptorContext context, + Type sourceType) { - if (sourceType == typeof (string)) + if (sourceType == typeof (string)) { return true; } @@ -83,21 +82,21 @@ namespace Spring.Core.TypeConversion /// /// /// The to use - /// as the current culture. + /// as the current culture. /// /// /// The value that is to be converted. /// /// - /// A if successful. + /// A if successful. /// public override object ConvertFrom ( - ITypeDescriptorContext context, - CultureInfo culture, object value) + ITypeDescriptorContext context, + CultureInfo culture, object value) { - if (value is string) + if (value is string) { - try + try { return new Uri(value as string); } diff --git a/src/Spring/Spring.Core/Core/TypeMismatchException.cs b/src/Spring/Spring.Core/Core/TypeMismatchException.cs index 8e2fbea6..ed5ba6f4 100644 --- a/src/Spring/Spring.Core/Core/TypeMismatchException.cs +++ b/src/Spring/Spring.Core/Core/TypeMismatchException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; using System.Text; @@ -153,4 +152,4 @@ namespace Spring.Core return message.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeResolution/CachedTypeResolver.cs b/src/Spring/Spring.Core/Core/TypeResolution/CachedTypeResolver.cs index 8950225d..40ee8878 100644 --- a/src/Spring/Spring.Core/Core/TypeResolution/CachedTypeResolver.cs +++ b/src/Spring/Spring.Core/Core/TypeResolution/CachedTypeResolver.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.Collections.Specialized; diff --git a/src/Spring/Spring.Core/Core/TypeResolution/GenericTypeResolver.cs b/src/Spring/Spring.Core/Core/TypeResolution/GenericTypeResolver.cs index ff5d92cf..ac6437ae 100644 --- a/src/Spring/Spring.Core/Core/TypeResolution/GenericTypeResolver.cs +++ b/src/Spring/Spring.Core/Core/TypeResolution/GenericTypeResolver.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using Spring.Util; #endregion diff --git a/src/Spring/Spring.Core/Core/TypeResolution/ITypeResolver.cs b/src/Spring/Spring.Core/Core/TypeResolution/ITypeResolver.cs index 9fbb3835..ab6bc8c8 100644 --- a/src/Spring/Spring.Core/Core/TypeResolution/ITypeResolver.cs +++ b/src/Spring/Spring.Core/Core/TypeResolution/ITypeResolver.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Core.TypeResolution diff --git a/src/Spring/Spring.Core/Core/TypeResolution/TypeRegistry.cs b/src/Spring/Spring.Core/Core/TypeResolution/TypeRegistry.cs index 15e5f55e..eb424ab2 100644 --- a/src/Spring/Spring.Core/Core/TypeResolution/TypeRegistry.cs +++ b/src/Spring/Spring.Core/Core/TypeResolution/TypeRegistry.cs @@ -1,35 +1,32 @@ #region License -/* - * Copyright © 2002-2011 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. +/* + * Copyright � 2002-2011 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 +#endregion #region Imports -using System; -using System.Collections.Generic; - using Spring.Util; #endregion namespace Spring.Core.TypeResolution { - /// + /// /// Provides access to a central registry of aliased s. /// /// @@ -229,7 +226,7 @@ namespace Spring.Core.TypeResolution /// The alias around the 'DateTime' type. /// public const string DateTimeAlias = "DateTime"; - + /// /// The alias around the 'DateTime' type (C# style). /// @@ -244,7 +241,7 @@ namespace Spring.Core.TypeResolution /// The alias around the 'DateTime[]' array type. ///
public const string DateTimeArrayAlias = "DateTime[]"; - + /// /// The alias around the 'DateTime[]' array type. /// @@ -555,8 +552,8 @@ namespace Spring.Core.TypeResolution #endregion - /// - /// Registers an alias for the specified . + /// + /// Registers an alias for the specified . /// /// ///

@@ -595,10 +592,10 @@ namespace Spring.Core.TypeResolution RegisterType(alias, type); } - ///

- /// Registers short type name as an alias for - /// the supplied . - /// + /// + /// Registers short type name as an alias for + /// the supplied . + /// /// /// The to register. /// @@ -614,10 +611,10 @@ namespace Spring.Core.TypeResolution types[type.Name] = type; } } - - /// - /// Registers an alias for the supplied . - /// + + /// + /// Registers an alias for the supplied . + /// /// /// The alias for the supplied . /// @@ -640,15 +637,15 @@ namespace Spring.Core.TypeResolution } } - /// - /// Resolves the supplied to a . - /// + /// + /// Resolves the supplied to a . + /// /// /// The alias to resolve. /// /// /// The the supplied was - /// associated with, or if no + /// associated with, or if no /// was previously registered for the supplied . /// /// @@ -671,7 +668,7 @@ namespace Spring.Core.TypeResolution /// Alias to check. /// /// - /// true if the specified type alias is registered, + /// true if the specified type alias is registered, /// false otherwise. /// public static bool ContainsAlias(string alias) @@ -679,4 +676,4 @@ namespace Spring.Core.TypeResolution return types.ContainsKey(alias); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeResolution/TypeResolutionUtils.cs b/src/Spring/Spring.Core/Core/TypeResolution/TypeResolutionUtils.cs index 5eade196..82696f17 100644 --- a/src/Spring/Spring.Core/Core/TypeResolution/TypeResolutionUtils.cs +++ b/src/Spring/Spring.Core/Core/TypeResolution/TypeResolutionUtils.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; using System.Globalization; using System.Text.RegularExpressions; using System.Reflection; @@ -206,4 +204,4 @@ namespace Spring.Core.TypeResolution #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Core/TypeResolution/TypeResolver.cs b/src/Spring/Spring.Core/Core/TypeResolution/TypeResolver.cs index 4581b94a..89b37e0e 100644 --- a/src/Spring/Spring.Core/Core/TypeResolution/TypeResolver.cs +++ b/src/Spring/Spring.Core/Core/TypeResolution/TypeResolver.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using Spring.Util; @@ -42,7 +41,7 @@ namespace Spring.Core.TypeResolution /// instance. ///
/// - /// The unresolved (possibly partially assembly qualified) name + /// The unresolved (possibly partially assembly qualified) name /// of a . /// /// @@ -125,7 +124,7 @@ namespace Spring.Core.TypeResolution /// /// Uses - /// to load the attendant referred to by + /// to load the attendant referred to by /// the parameter. /// /// @@ -150,7 +149,7 @@ namespace Spring.Core.TypeResolution } /// - /// Creates a new instance + /// Creates a new instance /// from the given /// protected static TypeLoadException BuildTypeLoadException(string typeName) @@ -160,7 +159,7 @@ namespace Spring.Core.TypeResolution /// /// Creates a new instance - /// from the given with the given inner + /// from the given with the given inner /// protected static TypeLoadException BuildTypeLoadException(string typeName, Exception ex) { diff --git a/src/Spring/Spring.Core/DataBinding/AbstractBinding.cs b/src/Spring/Spring.Core/DataBinding/AbstractBinding.cs index 64fbbcec..278d1a52 100644 --- a/src/Spring/Spring.Core/DataBinding/AbstractBinding.cs +++ b/src/Spring/Spring.Core/DataBinding/AbstractBinding.cs @@ -1,5 +1,3 @@ -using System; -using System.Collections.Generic; using Spring.Collections; using Spring.Util; using Spring.Validation; @@ -46,7 +44,7 @@ namespace Spring.DataBinding } /// - /// Marks this binding's state as invalid for this validationErrors collection. + /// Marks this binding's state as invalid for this validationErrors collection. /// Returns false if is null. /// /// @@ -181,7 +179,7 @@ namespace Spring.DataBinding public abstract void BindTargetToSource(object source, object target, IValidationErrors validationErrors, IDictionary variables); /// - /// Sets error message that should be displayed in the case + /// Sets error message that should be displayed in the case /// of a non-fatal binding error. /// /// @@ -233,4 +231,4 @@ namespace Spring.DataBinding return this.Id.GetHashCode(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/DataBinding/AbstractSimpleBinding.cs b/src/Spring/Spring.Core/DataBinding/AbstractSimpleBinding.cs index 887dd394..edbea987 100644 --- a/src/Spring/Spring.Core/DataBinding/AbstractSimpleBinding.cs +++ b/src/Spring/Spring.Core/DataBinding/AbstractSimpleBinding.cs @@ -1,5 +1,3 @@ -using System; -using System.Collections.Generic; using System.Reflection; using Common.Logging; using Spring.Globalization; @@ -30,7 +28,7 @@ namespace Spring.DataBinding } /// - /// Initialize a new instance of with the + /// Initialize a new instance of with the /// specified . /// protected AbstractSimpleBinding(IFormatter formatter) @@ -225,4 +223,4 @@ namespace Spring.DataBinding #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/DataBinding/BaseBindingContainer.cs b/src/Spring/Spring.Core/DataBinding/BaseBindingContainer.cs index 1f118b58..0b8b318e 100644 --- a/src/Spring/Spring.Core/DataBinding/BaseBindingContainer.cs +++ b/src/Spring/Spring.Core/DataBinding/BaseBindingContainer.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using Spring.Globalization; using Spring.Validation; @@ -70,7 +69,7 @@ namespace Spring.DataBinding } /// - /// Adds the binding with a default + /// Adds the binding with a default /// binding direction of . /// /// @@ -108,7 +107,7 @@ namespace Spring.DataBinding } /// - /// Adds the binding with a default + /// Adds the binding with a default /// binding direction of . /// /// @@ -256,4 +255,4 @@ namespace Spring.DataBinding #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/DataBinding/BindingDirection.cs b/src/Spring/Spring.Core/DataBinding/BindingDirection.cs index 7c09b690..306fd198 100644 --- a/src/Spring/Spring.Core/DataBinding/BindingDirection.cs +++ b/src/Spring/Spring.Core/DataBinding/BindingDirection.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.DataBinding { /// @@ -38,7 +36,7 @@ namespace Spring.DataBinding /// Specifies that value from the data model should be bound to control property. /// TargetToSource = 0x0002, - + /// /// Specifies that binding is bidirectional. /// diff --git a/src/Spring/Spring.Core/DataBinding/BindingErrorMessage.cs b/src/Spring/Spring.Core/DataBinding/BindingErrorMessage.cs index b9276b5a..5728789b 100644 --- a/src/Spring/Spring.Core/DataBinding/BindingErrorMessage.cs +++ b/src/Spring/Spring.Core/DataBinding/BindingErrorMessage.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using Spring.Util; using Spring.Validation; -#endregion - namespace Spring.DataBinding { /// @@ -61,8 +56,8 @@ namespace Spring.DataBinding /// Generates an object from its XML representation. /// /// - /// The stream - /// from which the object is deserialized. + /// The stream + /// from which the object is deserialized. /// public override void ReadXml(System.Xml.XmlReader reader) { @@ -74,8 +69,8 @@ namespace Spring.DataBinding /// Converts an object into its XML representation. ///
/// - /// The stream - /// to which the object is serialized. + /// The stream + /// to which the object is serialized. /// public override void WriteXml(System.Xml.XmlWriter writer) { @@ -93,7 +88,7 @@ namespace Spring.DataBinding public override bool Equals(object obj) { BindingErrorMessage other = obj as BindingErrorMessage; - return (other != null) + return (other != null) && (this.BindingId == other.BindingId) && (base.Equals(obj)); } @@ -109,4 +104,4 @@ namespace Spring.DataBinding return base.GetHashCode() + 31*this.BindingId.GetHashCode(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/DataBinding/IBinding.cs b/src/Spring/Spring.Core/DataBinding/IBinding.cs index 964445aa..f6aeb63a 100644 --- a/src/Spring/Spring.Core/DataBinding/IBinding.cs +++ b/src/Spring/Spring.Core/DataBinding/IBinding.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using Spring.Validation; namespace Spring.DataBinding @@ -72,7 +71,7 @@ namespace Spring.DataBinding void BindTargetToSource(object source, object target, IValidationErrors validationErrors, IDictionary variables); /// - /// Sets error message that should be displayed in the case + /// Sets error message that should be displayed in the case /// of a non-fatal binding error. /// /// @@ -82,6 +81,6 @@ namespace Spring.DataBinding /// List of error providers message should be added to. /// void SetErrorMessage(string messageId, params string[] errorProviders); - + } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/DataBinding/ListBinding.cs b/src/Spring/Spring.Core/DataBinding/ListBinding.cs index 7e942379..69e52a24 100644 --- a/src/Spring/Spring.Core/DataBinding/ListBinding.cs +++ b/src/Spring/Spring.Core/DataBinding/ListBinding.cs @@ -1,5 +1,4 @@ using System.Collections; -using System.Collections.Generic; using Spring.Expressions; using Spring.Validation; @@ -70,4 +69,4 @@ namespace Spring.DataBinding sourceExpression.GetValue(null, variables); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/DataBinding/SimpleExpressionBinding.cs b/src/Spring/Spring.Core/DataBinding/SimpleExpressionBinding.cs index d2bc8fd4..7cb35968 100644 --- a/src/Spring/Spring.Core/DataBinding/SimpleExpressionBinding.cs +++ b/src/Spring/Spring.Core/DataBinding/SimpleExpressionBinding.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using Spring.Expressions; using Spring.Globalization; @@ -171,4 +170,4 @@ namespace Spring.DataBinding #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/ArrayConstructorNode.cs b/src/Spring/Spring.Core/Expressions/ArrayConstructorNode.cs index e6a36b91..d62cdc98 100644 --- a/src/Spring/Spring.Core/Expressions/ArrayConstructorNode.cs +++ b/src/Spring/Spring.Core/Expressions/ArrayConstructorNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; using Spring.Core.TypeResolution; @@ -95,4 +94,4 @@ namespace Spring.Expressions throw new ArgumentException("You have to specify either rank or initializer for an array."); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/AssignNode.cs b/src/Spring/Spring.Core/Expressions/AssignNode.cs index b8ba7275..853c354c 100644 --- a/src/Spring/Spring.Core/Expressions/AssignNode.cs +++ b/src/Spring/Spring.Core/Expressions/AssignNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Expressions.Parser.antlr.collections; @@ -30,7 +29,7 @@ namespace Spring.Expressions /// Aleksandar Seovic [Serializable] public class AssignNode : BaseNode - { + { /// /// Create a new instance /// @@ -77,4 +76,4 @@ namespace Spring.Expressions return result; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/AttributeNode.cs b/src/Spring/Spring.Core/Expressions/AttributeNode.cs index 639b6f4c..0e6eb438 100644 --- a/src/Spring/Spring.Core/Expressions/AttributeNode.cs +++ b/src/Spring/Spring.Core/Expressions/AttributeNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Core.TypeResolution; @@ -46,7 +45,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Tries to determine attribute type based on the specified /// attribute type name. @@ -80,4 +79,4 @@ namespace Spring.Expressions return type; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/BaseNode.cs b/src/Spring/Spring.Core/Expressions/BaseNode.cs index 66951740..0abd550c 100644 --- a/src/Spring/Spring.Core/Expressions/BaseNode.cs +++ b/src/Spring/Spring.Core/Expressions/BaseNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Runtime.Serialization; namespace Spring.Expressions @@ -224,7 +222,7 @@ namespace Spring.Expressions /// ///

/// This is a default implementation of Set method, which - /// simply throws . + /// simply throws . ///

///

/// This was done in order to avoid redundant Set method implementations, @@ -262,4 +260,4 @@ namespace Spring.Expressions node.Set(context, evalContext, newValue); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/BinaryOperator.cs b/src/Spring/Spring.Core/Expressions/BinaryOperator.cs index 4ace28ce..f8e9bee7 100644 --- a/src/Spring/Spring.Core/Expressions/BinaryOperator.cs +++ b/src/Spring/Spring.Core/Expressions/BinaryOperator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Expressions @@ -53,7 +52,7 @@ namespace Spring.Expressions protected BinaryOperator(SerializationInfo info, StreamingContext context) : base(info, context) {} - + ///

/// Gets the left operand. /// @@ -87,4 +86,4 @@ namespace Spring.Expressions return GetValue(Right, context, evalContext); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/BooleanLiteralNode.cs b/src/Spring/Spring.Core/Expressions/BooleanLiteralNode.cs index 96b0f397..64a28451 100644 --- a/src/Spring/Spring.Core/Expressions/BooleanLiteralNode.cs +++ b/src/Spring/Spring.Core/Expressions/BooleanLiteralNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Expressions @@ -54,7 +53,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the boolean literal node. /// @@ -78,4 +77,4 @@ namespace Spring.Expressions return nodeValue; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/ConstructorNode.cs b/src/Spring/Spring.Core/Expressions/ConstructorNode.cs index e5aae7c5..30ad962a 100644 --- a/src/Spring/Spring.Core/Expressions/ConstructorNode.cs +++ b/src/Spring/Spring.Core/Expressions/ConstructorNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; using System.Runtime.Serialization; diff --git a/src/Spring/Spring.Core/Expressions/DefaultNode.cs b/src/Spring/Spring.Core/Expressions/DefaultNode.cs index 3c9cf332..9652a054 100644 --- a/src/Spring/Spring.Core/Expressions/DefaultNode.cs +++ b/src/Spring/Spring.Core/Expressions/DefaultNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Expressions @@ -29,7 +28,7 @@ namespace Spring.Expressions /// Aleksandar Seovic [Serializable] public class DefaultNode : BinaryOperator - { + { /// /// Create a new instance /// @@ -59,4 +58,4 @@ namespace Spring.Expressions return (leftVal != null ? leftVal : rightVal); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Expression.cs b/src/Spring/Spring.Core/Expressions/Expression.cs index c9e63b0e..8e4cc5da 100644 --- a/src/Spring/Spring.Core/Expressions/Expression.cs +++ b/src/Spring/Spring.Core/Expressions/Expression.cs @@ -18,10 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; -using System.IO; using System.Reflection; using System.Runtime.Serialization; using Spring.Expressions.Parser; @@ -355,4 +352,4 @@ namespace Spring.Expressions throw new FatalReflectionException( "Cannot obtain PropertyInfo for empty property name." ); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/ExpressionConverter.cs b/src/Spring/Spring.Core/Expressions/ExpressionConverter.cs index 310ab78c..96c8bf20 100644 --- a/src/Spring/Spring.Core/Expressions/ExpressionConverter.cs +++ b/src/Spring/Spring.Core/Expressions/ExpressionConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.ComponentModel; using System.Globalization; -#endregion - namespace Spring.Expressions { /// @@ -74,11 +69,11 @@ namespace Spring.Expressions /// /// /// A array if successful. - /// + /// public override object ConvertFrom( ITypeDescriptorContext context, CultureInfo culture, object value) { return Expression.Parse(value as string); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/ExpressionEvaluator.cs b/src/Spring/Spring.Core/Expressions/ExpressionEvaluator.cs index c2e6cbaa..92768c1b 100644 --- a/src/Spring/Spring.Core/Expressions/ExpressionEvaluator.cs +++ b/src/Spring/Spring.Core/Expressions/ExpressionEvaluator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System.Collections.Generic; - namespace Spring.Expressions { /// @@ -38,7 +36,7 @@ namespace Spring.Expressions ///

///

/// This can result in significant performance improvements as it avoids expression - /// parsing and node resolution every time it is called. + /// parsing and node resolution every time it is called. ///

///

///

@@ -98,4 +96,4 @@ namespace Spring.Expressions exp.SetValue(root, variables, newValue); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/ExpressionListNode.cs b/src/Spring/Spring.Core/Expressions/ExpressionListNode.cs index 184b6a7e..cb69aa86 100644 --- a/src/Spring/Spring.Core/Expressions/ExpressionListNode.cs +++ b/src/Spring/Spring.Core/Expressions/ExpressionListNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Expressions.Parser.antlr.collections; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a result of the last expression in a list. /// @@ -65,4 +64,4 @@ namespace Spring.Expressions return result; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/FunctionNode.cs b/src/Spring/Spring.Core/Expressions/FunctionNode.cs index 2dbc48fd..65d7e15a 100644 --- a/src/Spring/Spring.Core/Expressions/FunctionNode.cs +++ b/src/Spring/Spring.Core/Expressions/FunctionNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Reflection.Dynamic; @@ -93,4 +92,4 @@ namespace Spring.Expressions return new SafeMethod(callback.Method).Invoke(callback.Target, arguments); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/HexLiteralNode.cs b/src/Spring/Spring.Core/Expressions/HexLiteralNode.cs index fb89f58a..d98db485 100644 --- a/src/Spring/Spring.Core/Expressions/HexLiteralNode.cs +++ b/src/Spring/Spring.Core/Expressions/HexLiteralNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Globalization; using System.Runtime.Serialization; @@ -47,7 +46,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the hexadecimal integer literal node. /// @@ -78,4 +77,4 @@ namespace Spring.Expressions return nodeValue; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/IExpression.cs b/src/Spring/Spring.Core/Expressions/IExpression.cs index 3444048c..b97ab1a4 100644 --- a/src/Spring/Spring.Core/Expressions/IExpression.cs +++ b/src/Spring/Spring.Core/Expressions/IExpression.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using System.ComponentModel; namespace Spring.Expressions @@ -66,4 +65,4 @@ namespace Spring.Expressions /// New value for the last node of the expression. void SetValue(object context, IDictionary variables, object newValue); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/IndexerNode.cs b/src/Spring/Spring.Core/Expressions/IndexerNode.cs index 66570388..36c5a79e 100644 --- a/src/Spring/Spring.Core/Expressions/IndexerNode.cs +++ b/src/Spring/Spring.Core/Expressions/IndexerNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; using System.Runtime.Serialization; using Spring.Core; @@ -57,7 +55,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns node's value for the given context. /// @@ -132,7 +130,7 @@ namespace Spring.Expressions { throw new NullValueInNestedPathException("Cannot set the value of the indexer because the context for its resolution is null."); } - + try { if (context is Array) @@ -176,7 +174,7 @@ namespace Spring.Expressions { throw new InvalidPropertyException( evalContext.RootContextType,this.ToString(),"Invalid argument.",e ); } - + } /// @@ -296,4 +294,4 @@ namespace Spring.Expressions return indices; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/IntLiteralNode.cs b/src/Spring/Spring.Core/Expressions/IntLiteralNode.cs index 108b9404..8a65f4c9 100644 --- a/src/Spring/Spring.Core/Expressions/IntLiteralNode.cs +++ b/src/Spring/Spring.Core/Expressions/IntLiteralNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Expressions @@ -85,4 +84,4 @@ namespace Spring.Expressions return nodeValue; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/LambdaExpressionNode.cs b/src/Spring/Spring.Core/Expressions/LambdaExpressionNode.cs index bd5ee866..3e1656af 100644 --- a/src/Spring/Spring.Core/Expressions/LambdaExpressionNode.cs +++ b/src/Spring/Spring.Core/Expressions/LambdaExpressionNode.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; using Spring.Expressions.Parser.antlr.collections; @@ -144,4 +143,4 @@ namespace Spring.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/ListInitializerNode.cs b/src/Spring/Spring.Core/Expressions/ListInitializerNode.cs index 9b1cee6d..194123d2 100644 --- a/src/Spring/Spring.Core/Expressions/ListInitializerNode.cs +++ b/src/Spring/Spring.Core/Expressions/ListInitializerNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Creates new instance of the list defined by this node. /// diff --git a/src/Spring/Spring.Core/Expressions/LocalFunctionNode.cs b/src/Spring/Spring.Core/Expressions/LocalFunctionNode.cs index d6b813f4..5af091c3 100644 --- a/src/Spring/Spring.Core/Expressions/LocalFunctionNode.cs +++ b/src/Spring/Spring.Core/Expressions/LocalFunctionNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Evaluates function represented by this node. /// @@ -57,7 +56,7 @@ namespace Spring.Expressions string name = this.getText(); IDictionary locals = evalContext.LocalVariables; LambdaExpressionNode lambda = locals[name] as LambdaExpressionNode; - + if (lambda == null) { throw new InvalidOperationException("Function '" + name + "' is not defined."); @@ -75,4 +74,4 @@ namespace Spring.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/LocalVariableNode.cs b/src/Spring/Spring.Core/Expressions/LocalVariableNode.cs index fe2458c3..0ba7a8d0 100644 --- a/src/Spring/Spring.Core/Expressions/LocalVariableNode.cs +++ b/src/Spring/Spring.Core/Expressions/LocalVariableNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; @@ -32,7 +31,7 @@ namespace Spring.Expressions public class LocalVariableNode : BaseNode { //internal const string LOCAL_VARIABLES = "__locals"; - + /// /// Create a new instance /// @@ -47,7 +46,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns value of the local variable represented by this node. /// @@ -83,4 +82,4 @@ namespace Spring.Expressions locals[varName] = newValue; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/MapEntryNode.cs b/src/Spring/Spring.Core/Expressions/MapEntryNode.cs index 3bdb2273..8ade206e 100644 --- a/src/Spring/Spring.Core/Expressions/MapEntryNode.cs +++ b/src/Spring/Spring.Core/Expressions/MapEntryNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; @@ -44,7 +43,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Creates new instance of the map entry defined by this node. /// diff --git a/src/Spring/Spring.Core/Expressions/MapInitializerNode.cs b/src/Spring/Spring.Core/Expressions/MapInitializerNode.cs index dc7538f1..3449c182 100644 --- a/src/Spring/Spring.Core/Expressions/MapInitializerNode.cs +++ b/src/Spring/Spring.Core/Expressions/MapInitializerNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; using Spring.Expressions.Parser.antlr.collections; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Creates new instance of the map defined by this node. /// diff --git a/src/Spring/Spring.Core/Expressions/MethodNode.cs b/src/Spring/Spring.Core/Expressions/MethodNode.cs index 5bdb26b7..a4d49e43 100644 --- a/src/Spring/Spring.Core/Expressions/MethodNode.cs +++ b/src/Spring/Spring.Core/Expressions/MethodNode.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; using System.Runtime.Serialization; using Spring.Expressions.Processors; @@ -172,7 +170,7 @@ namespace Spring.Expressions { HashCode hash = new HashCode(); hash.Add(contextType.GetHashCode()); - + for (int i = 0; i < argValues.Length; i++) { object arg = argValues[i]; @@ -192,7 +190,7 @@ namespace Spring.Expressions // check the context type first MethodInfo mi = GetBestMethod(contextType, methodName, BINDING_FLAGS, argValues); - // if not found, probe the Type's type + // if not found, probe the Type's type if (mi == null) { mi = GetBestMethod(typeof(Type), methodName, BINDING_FLAGS, argValues); diff --git a/src/Spring/Spring.Core/Expressions/NamedArgumentNode.cs b/src/Spring/Spring.Core/Expressions/NamedArgumentNode.cs index 1ea98ca8..ee0a5e68 100644 --- a/src/Spring/Spring.Core/Expressions/NamedArgumentNode.cs +++ b/src/Spring/Spring.Core/Expressions/NamedArgumentNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Expressions @@ -44,7 +43,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns the value of the named argument defined by this node. /// @@ -56,4 +55,4 @@ namespace Spring.Expressions return GetValue(((BaseNode) this.getFirstChild()), evalContext.RootContext, evalContext); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/NodeWithArguments.cs b/src/Spring/Spring.Core/Expressions/NodeWithArguments.cs index 2ba27be7..c8946f39 100644 --- a/src/Spring/Spring.Core/Expressions/NodeWithArguments.cs +++ b/src/Spring/Spring.Core/Expressions/NodeWithArguments.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Runtime.Serialization; using Spring.Expressions.Parser.antlr.collections; @@ -69,7 +67,7 @@ namespace Spring.Expressions } /// - /// Initializes the node. + /// Initializes the node. /// private void InitializeNode() { @@ -151,7 +149,7 @@ namespace Spring.Expressions { InitializeNode(); } - + if (namedArgs.Count == 0) { return null; @@ -208,4 +206,4 @@ namespace Spring.Expressions } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/NullLiteralNode.cs b/src/Spring/Spring.Core/Expressions/NullLiteralNode.cs index 5fe826c1..4aefa12f 100644 --- a/src/Spring/Spring.Core/Expressions/NullLiteralNode.cs +++ b/src/Spring/Spring.Core/Expressions/NullLiteralNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Expressions @@ -44,7 +43,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the null literal node. /// @@ -56,4 +55,4 @@ namespace Spring.Expressions return null; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpADD.cs b/src/Spring/Spring.Core/Expressions/OpADD.cs index e0a18cc6..81f8bad0 100644 --- a/src/Spring/Spring.Core/Expressions/OpADD.cs +++ b/src/Spring/Spring.Core/Expressions/OpADD.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; using Spring.Collections; @@ -47,7 +46,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the arithmetic addition operator node. /// @@ -91,7 +90,7 @@ namespace Spring.Expressions ISet leftset = new HybridSet(((IDictionary) left).Keys); ISet rightset = new HybridSet(((IDictionary) right).Keys); ISet unionset = leftset.Union(rightset); - + IDictionary result = new Hashtable(unionset.Count); foreach(object key in unionset) { @@ -116,4 +115,4 @@ namespace Spring.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpAND.cs b/src/Spring/Spring.Core/Expressions/OpAND.cs index 88d3b9ee..15be919a 100644 --- a/src/Spring/Spring.Core/Expressions/OpAND.cs +++ b/src/Spring/Spring.Core/Expressions/OpAND.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -90,4 +89,4 @@ namespace Spring.Expressions Convert.ToBoolean(GetRightValue(context, evalContext)); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpBetween.cs b/src/Spring/Spring.Core/Expressions/OpBetween.cs index 16c2c306..13f66c09 100644 --- a/src/Spring/Spring.Core/Expressions/OpBetween.cs +++ b/src/Spring/Spring.Core/Expressions/OpBetween.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; using Spring.Util; @@ -71,4 +70,4 @@ namespace Spring.Expressions return (CompareUtils.Compare(value, low) >= 0 && CompareUtils.Compare(value, high) <= 0); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpDIVIDE.cs b/src/Spring/Spring.Core/Expressions/OpDIVIDE.cs index 5cd6a32e..ff6eca6c 100644 --- a/src/Spring/Spring.Core/Expressions/OpDIVIDE.cs +++ b/src/Spring/Spring.Core/Expressions/OpDIVIDE.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the arithmetic division operator node. /// @@ -71,4 +70,4 @@ namespace Spring.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpEqual.cs b/src/Spring/Spring.Core/Expressions/OpEqual.cs index 189b4643..c1d28038 100644 --- a/src/Spring/Spring.Core/Expressions/OpEqual.cs +++ b/src/Spring/Spring.Core/Expressions/OpEqual.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -90,4 +89,4 @@ namespace Spring.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpGreater.cs b/src/Spring/Spring.Core/Expressions/OpGreater.cs index 9ee9897d..a42707fc 100644 --- a/src/Spring/Spring.Core/Expressions/OpGreater.cs +++ b/src/Spring/Spring.Core/Expressions/OpGreater.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the logical "greater than" operator node. /// @@ -60,4 +59,4 @@ namespace Spring.Expressions return CompareUtils.Compare(left, right) > 0; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpGreaterOrEqual.cs b/src/Spring/Spring.Core/Expressions/OpGreaterOrEqual.cs index f243369c..b4686a71 100644 --- a/src/Spring/Spring.Core/Expressions/OpGreaterOrEqual.cs +++ b/src/Spring/Spring.Core/Expressions/OpGreaterOrEqual.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the logical "greater than or equal" operator node. /// @@ -60,4 +59,4 @@ namespace Spring.Expressions return CompareUtils.Compare(left, right) >= 0; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpIn.cs b/src/Spring/Spring.Core/Expressions/OpIn.cs index 2634540c..630455c7 100644 --- a/src/Spring/Spring.Core/Expressions/OpIn.cs +++ b/src/Spring/Spring.Core/Expressions/OpIn.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the logical IN operator node. /// @@ -78,4 +77,4 @@ namespace Spring.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpIs.cs b/src/Spring/Spring.Core/Expressions/OpIs.cs index 5729c4fa..3435e16c 100644 --- a/src/Spring/Spring.Core/Expressions/OpIs.cs +++ b/src/Spring/Spring.Core/Expressions/OpIs.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Expressions @@ -44,7 +43,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the logical IS operator node. /// @@ -65,4 +64,4 @@ namespace Spring.Expressions return type.IsAssignableFrom(instance.GetType()); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpLess.cs b/src/Spring/Spring.Core/Expressions/OpLess.cs index 8e6a8d87..999133a0 100644 --- a/src/Spring/Spring.Core/Expressions/OpLess.cs +++ b/src/Spring/Spring.Core/Expressions/OpLess.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -60,4 +59,4 @@ namespace Spring.Expressions return CompareUtils.Compare(left, right) < 0; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpLessOrEqual.cs b/src/Spring/Spring.Core/Expressions/OpLessOrEqual.cs index f922cf66..f22f66a0 100644 --- a/src/Spring/Spring.Core/Expressions/OpLessOrEqual.cs +++ b/src/Spring/Spring.Core/Expressions/OpLessOrEqual.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the logical "less than or equal" operator node. /// @@ -60,4 +59,4 @@ namespace Spring.Expressions return CompareUtils.Compare(left, right) <= 0; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpLike.cs b/src/Spring/Spring.Core/Expressions/OpLike.cs index 14c363b0..7767e64b 100644 --- a/src/Spring/Spring.Core/Expressions/OpLike.cs +++ b/src/Spring/Spring.Core/Expressions/OpLike.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; @@ -153,4 +152,4 @@ namespace Spring.Expressions return sb; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpMODULUS.cs b/src/Spring/Spring.Core/Expressions/OpMODULUS.cs index 9886f4df..02040bb4 100644 --- a/src/Spring/Spring.Core/Expressions/OpMODULUS.cs +++ b/src/Spring/Spring.Core/Expressions/OpMODULUS.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the arithmetic modulus operator node. /// @@ -71,4 +70,4 @@ namespace Spring.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpMULTIPLY.cs b/src/Spring/Spring.Core/Expressions/OpMULTIPLY.cs index 3553728e..59d2d74c 100644 --- a/src/Spring/Spring.Core/Expressions/OpMULTIPLY.cs +++ b/src/Spring/Spring.Core/Expressions/OpMULTIPLY.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; using Spring.Collections; @@ -122,4 +121,4 @@ namespace Spring.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpMatches.cs b/src/Spring/Spring.Core/Expressions/OpMatches.cs index fe108b3c..2463012d 100644 --- a/src/Spring/Spring.Core/Expressions/OpMatches.cs +++ b/src/Spring/Spring.Core/Expressions/OpMatches.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using System.Text.RegularExpressions; @@ -32,7 +31,7 @@ namespace Spring.Expressions public class OpMatches : BinaryOperator { private Regex regex; - + /// /// Create a new instance /// @@ -47,7 +46,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the logical MATCHES operator node. /// @@ -74,4 +73,4 @@ namespace Spring.Expressions return regex.IsMatch(text); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpNOT.cs b/src/Spring/Spring.Core/Expressions/OpNOT.cs index d62de802..987a1f56 100644 --- a/src/Spring/Spring.Core/Expressions/OpNOT.cs +++ b/src/Spring/Spring.Core/Expressions/OpNOT.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -53,7 +52,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the logical NOT operator node. /// @@ -79,4 +78,4 @@ namespace Spring.Expressions return !Convert.ToBoolean(operand); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpNotEqual.cs b/src/Spring/Spring.Core/Expressions/OpNotEqual.cs index 665e8c1b..0011e808 100644 --- a/src/Spring/Spring.Core/Expressions/OpNotEqual.cs +++ b/src/Spring/Spring.Core/Expressions/OpNotEqual.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the logical inequality operator node. /// @@ -82,4 +81,4 @@ namespace Spring.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpOR.cs b/src/Spring/Spring.Core/Expressions/OpOR.cs index 5e5d6960..fb52c4cf 100644 --- a/src/Spring/Spring.Core/Expressions/OpOR.cs +++ b/src/Spring/Spring.Core/Expressions/OpOR.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -53,7 +52,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the logical OR operator node. /// @@ -63,7 +62,7 @@ namespace Spring.Expressions protected override object Get(object context, EvaluationContext evalContext) { object l = GetLeftValue(context, evalContext); - + if (NumberUtils.IsInteger(l)) { object r = GetRightValue(context, evalContext); @@ -86,8 +85,8 @@ namespace Spring.Expressions } } - return Convert.ToBoolean(l) || + return Convert.ToBoolean(l) || Convert.ToBoolean(GetRightValue(context, evalContext)); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpPOWER.cs b/src/Spring/Spring.Core/Expressions/OpPOWER.cs index c5ce8a24..e1734ab9 100644 --- a/src/Spring/Spring.Core/Expressions/OpPOWER.cs +++ b/src/Spring/Spring.Core/Expressions/OpPOWER.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -71,4 +70,4 @@ namespace Spring.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpSUBTRACT.cs b/src/Spring/Spring.Core/Expressions/OpSUBTRACT.cs index ba3fbf4b..5d79f1fa 100644 --- a/src/Spring/Spring.Core/Expressions/OpSUBTRACT.cs +++ b/src/Spring/Spring.Core/Expressions/OpSUBTRACT.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; using Spring.Collections; @@ -47,7 +46,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the arithmetic subtraction operator node. /// @@ -138,4 +137,4 @@ namespace Spring.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpUnaryMinus.cs b/src/Spring/Spring.Core/Expressions/OpUnaryMinus.cs index b6d6ef6b..f0b4d912 100644 --- a/src/Spring/Spring.Core/Expressions/OpUnaryMinus.cs +++ b/src/Spring/Spring.Core/Expressions/OpUnaryMinus.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the unary plus operator node. /// @@ -64,4 +63,4 @@ namespace Spring.Expressions return NumberUtils.Negate(n); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpUnaryPlus.cs b/src/Spring/Spring.Core/Expressions/OpUnaryPlus.cs index 81fe71f7..5f4ffee0 100644 --- a/src/Spring/Spring.Core/Expressions/OpUnaryPlus.cs +++ b/src/Spring/Spring.Core/Expressions/OpUnaryPlus.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -64,4 +63,4 @@ namespace Spring.Expressions return n; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/OpXOR.cs b/src/Spring/Spring.Core/Expressions/OpXOR.cs index 3cd1dd2e..fa7dce01 100644 --- a/src/Spring/Spring.Core/Expressions/OpXOR.cs +++ b/src/Spring/Spring.Core/Expressions/OpXOR.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Util; @@ -51,7 +50,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the logical AND operator node. /// @@ -79,4 +78,4 @@ namespace Spring.Expressions return Convert.ToBoolean(l) ^ Convert.ToBoolean(r); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/ASTFactory.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/ASTFactory.cs index 0e966372..20d6944f 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/ASTFactory.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/ASTFactory.cs @@ -1,4 +1,3 @@ -using System; using System.Collections; using Assembly = System.Reflection.Assembly; @@ -14,7 +13,7 @@ namespace Spring.Expressions.Parser.antlr * * $Id:$ */ - + // // ANTLR C# Code Generator by Micheal Jordan // Kunle Odutola : kunle UNDERSCORE odutola AT hotmail DOT com @@ -35,7 +34,7 @@ namespace Spring.Expressions.Parser.antlr /// /// /// - /// We use delegation to share code (and have only one + /// We use delegation to share code (and have only one /// bit of code to maintain) rather than subclassing /// or superclassing (forces AST support code to be /// loaded even when you don't want to do AST stuff). @@ -69,9 +68,9 @@ namespace Spring.Expressions.Parser.antlr /// public ASTFactory(string nodeTypeName) : this( loadNodeTypeObject(nodeTypeName) ) - { + { } - + /// /// Constructs an ASTFactory and use the specified AST node type /// as the default. @@ -89,7 +88,7 @@ namespace Spring.Expressions.Parser.antlr typename2creator_[typeof(antlr.CommonASTWithHiddenTokens).FullName] = CommonASTWithHiddenTokens.Creator; } - + //--------------------------------------------------------------------- // DATA MEMBERS //--------------------------------------------------------------------- @@ -120,14 +119,14 @@ namespace Spring.Expressions.Parser.antlr /// the specified Token type. /// /// - /// This method is useful for situations that ANTLR cannot oridinarily deal - /// with (i.e., when you create a token based upon a nonliteral token symbol - /// like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token + /// This method is useful for situations that ANTLR cannot oridinarily deal + /// with (i.e., when you create a token based upon a nonliteral token symbol + /// like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token /// type (and hence the AST) statically. /// /// Token type to override. /// - /// Fully qualified AST typename (or null to specify + /// Fully qualified AST typename (or null to specify /// the factory's default AST type). /// public void setTokenTypeASTNodeType(int tokenType, string NodeTypeName) @@ -195,7 +194,7 @@ namespace Spring.Expressions.Parser.antlr /// /// Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings /// to the specified size. - /// This is primarily a convenience method that can be used to prevent + /// This is primarily a convenience method that can be used to prevent /// unnecessary and costly re-org of the mappings list. /// /// Maximum Token Type ID. @@ -257,7 +256,7 @@ namespace Spring.Expressions.Parser.antlr currentAST.advanceChildToEnd(); } } - + /// /// Creates a new uninitialized AST node. Since a specific AST Node Type /// wasn't indicated, the new AST node is created using the current default @@ -267,7 +266,7 @@ namespace Spring.Expressions.Parser.antlr public virtual AST create() { AST newNode; - + if (defaultCreator_ == null) newNode = createFromNodeTypeObject(defaultASTNodeTypeObject_); else @@ -275,10 +274,10 @@ namespace Spring.Expressions.Parser.antlr return newNode; } - + /// /// Creates and initializes a new AST node using the specified Token Type ID. - /// The used for creating this new AST node is + /// The used for creating this new AST node is /// determined by the following: /// /// the current TokenTypeID-to-ASTNodeType mapping (if any) or, @@ -293,10 +292,10 @@ namespace Spring.Expressions.Parser.antlr newNode.initialize(type, ""); return newNode; } - + /// /// Creates and initializes a new AST node using the specified Token Type ID. - /// The used for creating this new AST node is + /// The used for creating this new AST node is /// determined by the following: /// /// the current TokenTypeID-to-ASTNodeType mapping (if any) or, @@ -312,11 +311,11 @@ namespace Spring.Expressions.Parser.antlr newNode.initialize(type, txt); return newNode; } - + /// /// Creates a new AST node using the specified AST Node Type name. Once created, /// the new AST node is initialized with the specified Token type ID and string. - /// The used for creating this new AST node is + /// The used for creating this new AST node is /// determined solely by ASTNodeTypeName. /// The AST Node type must have a default/parameterless constructor. /// @@ -330,7 +329,7 @@ namespace Spring.Expressions.Parser.antlr newNode.initialize(type, txt); return newNode; } - + /// /// Creates a new AST node using the specified AST Node Type name. /// @@ -340,8 +339,8 @@ namespace Spring.Expressions.Parser.antlr /// /// A newly created and initialized AST node object. /// - /// Once created, the new AST node is initialized with the specified Token - /// instance. The used for creating this new AST + /// Once created, the new AST node is initialized with the specified Token + /// instance. The used for creating this new AST /// node is determined solely by ASTNodeTypeName. /// The AST Node type must have a default/parameterless constructor. /// @@ -351,11 +350,11 @@ namespace Spring.Expressions.Parser.antlr newNode.initialize(tok); return newNode; } - + /// /// Creates and initializes a new AST node using the specified AST Node instance. /// the new AST node is initialized with the specified Token type ID and string. - /// The used for creating this new AST node is + /// The used for creating this new AST node is /// determined solely by aNode. /// The AST Node type must have a default/parameterless constructor. /// @@ -368,16 +367,16 @@ namespace Spring.Expressions.Parser.antlr if (aNode == null) newNode = null; else - { + { newNode = createFromAST(aNode); newNode.initialize(aNode); } return newNode; } - + /// /// Creates and initializes a new AST node using the specified Token instance. - /// The used for creating this new AST node is + /// The used for creating this new AST node is /// determined by the following: /// /// the current TokenTypeID-to-ASTNodeType mapping (if any) or, @@ -399,7 +398,7 @@ namespace Spring.Expressions.Parser.antlr } return newNode; } - + /// /// Returns a copy of the specified AST Node instance. The copy is obtained by /// using the method Clone(). @@ -416,7 +415,7 @@ namespace Spring.Expressions.Parser.antlr dup_edNode.initialize(t); return dup_edNode; } - + /// /// Duplicate AST Node tree rooted at specified AST node and all of it's siblings. /// @@ -435,7 +434,7 @@ namespace Spring.Expressions.Parser.antlr } return result; } - + /// /// Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings. /// @@ -451,7 +450,7 @@ namespace Spring.Expressions.Parser.antlr } return result; } - + /// /// Make a tree from a list of nodes. The first element in the /// array is the root. If the root is null, then the tree is @@ -500,7 +499,7 @@ namespace Spring.Expressions.Parser.antlr } return root; } - + /// /// Make a tree from a list of nodes, where the nodes are contained /// in an ASTArray object. @@ -511,7 +510,7 @@ namespace Spring.Expressions.Parser.antlr { return make(nodes.array); } - + /// /// Make an AST the root of current AST. /// @@ -548,7 +547,7 @@ namespace Spring.Expressions.Parser.antlr } defaultASTNodeTypeObject_ = loadNodeTypeObject(t); } - + /// /// To change where error messages go, can subclass/override this method /// and then setASTFactory in Parser and TreeParser. This method removes @@ -704,4 +703,4 @@ namespace Spring.Expressions.Parser.antlr public ASTNodeCreator Creator; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/BaseAST.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/BaseAST.cs index c74eaca2..49cc140d 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/BaseAST.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/BaseAST.cs @@ -1,5 +1,3 @@ -using System; - using StringBuilder = System.Text.StringBuilder; using TextWriter = System.IO.TextWriter; using ArrayList = System.Collections.ArrayList; @@ -15,7 +13,7 @@ namespace Spring.Expressions.Parser.antlr * * $Id:$ */ - + // // ANTLR C# Code Generator by Micheal Jordan // Kunle Odutola : kunle UNDERSCORE odutola AT hotmail DOT com @@ -49,12 +47,12 @@ namespace Spring.Expressions.Parser.antlr * Most people will create ASTs that are subclasses of * BaseAST or of CommonAST. */ - [Serializable()] + [Serializable()] public abstract class BaseAST : AST { protected internal BaseAST down; protected internal BaseAST right; - + private static bool verboseStringConversion = false; private static string[] tokenNames = null; @@ -77,13 +75,13 @@ namespace Spring.Expressions.Parser.antlr this.down = (BaseAST) node; } } - + private void doWorkForFindAll(ArrayList v, AST target, bool partialMatch) { AST sibling; - + // Start walking sibling lists, looking for matches. -//siblingWalk: +//siblingWalk: for (sibling = this; sibling != null; sibling = sibling.getNextSibling()) { if ((partialMatch && sibling.EqualsTreePartial(target)) || (!partialMatch && sibling.EqualsTree(target))) @@ -97,39 +95,39 @@ namespace Spring.Expressions.Parser.antlr } } } - - public override bool Equals(object obj) - { - if (obj == null) - return false; - if (this.GetType() != obj.GetType()) - return false; - return Equals((AST)obj); - } - + + public override bool Equals(object obj) + { + if (obj == null) + return false; + if (this.GetType() != obj.GetType()) + return false; + return Equals((AST)obj); + } + /*Is node t equal to this in terms of token type and text? */ public virtual bool Equals(AST t) { if (t == null) return false; - return (Object.Equals(this.getText(), t.getText())) && + return (Object.Equals(this.getText(), t.getText())) && (this.Type == t.Type); } - + /*Is t an exact structural and equals() match of this tree. The * 'this' reference is considered the start of a sibling list. */ public virtual bool EqualsList(AST t) { AST sibling; - + // the empty tree is not a match of any non-null tree. if (t == null) { return false; } - + // Otherwise, start walking sibling lists. First mismatch, return false. for (sibling = this; sibling != null && t != null; sibling = sibling.getNextSibling(), t = t.getNextSibling()) { @@ -158,20 +156,20 @@ namespace Spring.Expressions.Parser.antlr // one sibling list has more than the other return false; } - + /*Is 'sub' a subtree of this list? * The siblings of the root are NOT ignored. */ public virtual bool EqualsListPartial(AST sub) { AST sibling; - + // the empty tree is always a subset of any tree. if (sub == null) { return true; } - + // Otherwise, start walking sibling lists. First mismatch, return false. for (sibling = this; sibling != null && sub != null; sibling = sibling.getNextSibling(), sub = sub.getNextSibling()) { @@ -193,7 +191,7 @@ namespace Spring.Expressions.Parser.antlr // either both are null or sibling has more, but subtree doesn't return true; } - + /*Is tree rooted at 'this' equal to 't'? The siblings * of 'this' are ignored. */ @@ -214,7 +212,7 @@ namespace Spring.Expressions.Parser.antlr } return true; } - + /*Is 't' a subtree of the tree rooted at 'this'? The siblings * of 'this' are ignored. */ @@ -225,7 +223,7 @@ namespace Spring.Expressions.Parser.antlr { return true; } - + // check roots first. if (!this.Equals(sub)) return false; @@ -237,7 +235,7 @@ namespace Spring.Expressions.Parser.antlr } return true; } - + /*Walk the tree looking for all exact subtree matches. Return * an IEnumerator that lets the caller walk the list * of subtree roots found herein. @@ -246,18 +244,18 @@ namespace Spring.Expressions.Parser.antlr { ArrayList roots = new ArrayList(10); //AST sibling; - + // the empty tree cannot result in an enumeration if (target == null) { return null; } - + doWorkForFindAll(roots, target, false); // find all matches recursively - + return roots.GetEnumerator(); } - + /*Walk the tree looking for all subtrees. Return * an IEnumerator that lets the caller walk the list * of subtree roots found herein. @@ -266,55 +264,55 @@ namespace Spring.Expressions.Parser.antlr { ArrayList roots = new ArrayList(10); //AST sibling; - + // the empty tree cannot result in an enumeration if (sub == null) { return null; } - + doWorkForFindAll(roots, sub, true); // find all matches recursively - + return roots.GetEnumerator(); } - + /*Get the first child of this node; null if not children */ public virtual AST getFirstChild() { return down; } - + /*Get the next sibling in line after this one */ public virtual AST getNextSibling() { return right; } - + /*Get the token text for this node */ public virtual string getText() { return ""; } - + /*Get the token type for this node */ public virtual int Type { get { return 0; } set { ; } } - + /// /// Get number of children of this node; if leaf, returns 0 /// /// Number of children - public int getNumberOfChildren() + public int getNumberOfChildren() { BaseAST t = this.down; int n = 0; - if (t != null) + if (t != null) { n = 1; - while (t.right != null) + while (t.right != null) { t = t.right; n++; @@ -324,50 +322,50 @@ namespace Spring.Expressions.Parser.antlr } public abstract void initialize(int t, string txt); - + public abstract void initialize(AST t); - + public abstract void initialize(IToken t); - + /*Remove all children */ public virtual void removeChildren() { down = null; } - + public virtual void setFirstChild(AST c) { down = (BaseAST) c; } - + public virtual void setNextSibling(AST n) { right = (BaseAST) n; } - + /*Set the token text for this node */ public virtual void setText(string text) { ; } - + /*Set the token type for this node */ public virtual void setType(int ttype) { this.Type = ttype; } - + public static void setVerboseStringConversion(bool verbose, string[] names) { verboseStringConversion = verbose; tokenNames = names; } - + override public string ToString() { StringBuilder b = new StringBuilder(); // if verbose and type name not same as text (keyword probably) - if (verboseStringConversion && + if (verboseStringConversion && (0 != String.Compare(getText(), (tokenNames[Type]), true)) && (0 != String.Compare(getText(), StringUtils.stripFrontBack(tokenNames[Type], @"""", @""""), true))) { @@ -380,7 +378,7 @@ namespace Spring.Expressions.Parser.antlr } return getText(); } - + /*Print out a child-sibling tree in LISP notation */ public virtual string ToStringList() { @@ -401,12 +399,12 @@ namespace Spring.Expressions.Parser.antlr } return ts; } - - public virtual string ToStringTree() + + public virtual string ToStringTree() { AST t = this; string ts = ""; - if (t.getFirstChild() != null) + if (t.getFirstChild() != null) { ts += " ("; } @@ -426,21 +424,21 @@ namespace Spring.Expressions.Parser.antlr { return ToTree(string.Empty); } - - public virtual string ToTree(string prefix) + + public virtual string ToTree(string prefix) { StringBuilder sb = new StringBuilder(prefix); - + // Replace vertical bar if there is no next sibling. if ( (getNextSibling() == null) ) sb.Append("+--"); else sb.Append("|--"); - + sb.Append( ToString() ); sb.Append( Environment.NewLine ); - if ( getFirstChild() != null ) + if ( getFirstChild() != null ) { // Replace vertical bar if there is no next sibling. if ( getNextSibling() == null ) @@ -469,7 +467,7 @@ namespace Spring.Expressions.Parser.antlr c3 = text[i + 3]; c4 = text[i + 4]; c5 = text[i + 5]; - + if (c1 == 'a' && c2 == 'm' && c3 == 'p' && c4 == ';') { n.Append("&"); @@ -503,7 +501,7 @@ namespace Spring.Expressions.Parser.antlr } return n.ToString(); } - + public static string encode(string text) { char c; @@ -513,47 +511,47 @@ namespace Spring.Expressions.Parser.antlr c = text[i]; switch (c) { - case '&': + case '&': { n.Append("&"); break; } - - case '<': + + case '<': { n.Append("<"); break; } - - case '>': + + case '>': { n.Append(">"); break; } - - case '"': + + case '"': { n.Append("""); break; } - - case '\'': + + case '\'': { n.Append("'"); break; } - - default: + + default: { n.Append(c); break; } - + } } return n.ToString(); } - + public virtual void xmlSerializeNode(TextWriter outWriter) { StringBuilder buf = new StringBuilder(100); @@ -562,7 +560,7 @@ namespace Spring.Expressions.Parser.antlr buf.Append("text=\"" + encode(getText()) + "\" type=\"" + Type + "\"/>"); outWriter.Write(buf.ToString()); } - + public virtual void xmlSerializeRootOpen(TextWriter outWriter) { StringBuilder buf = new StringBuilder(100); @@ -571,12 +569,12 @@ namespace Spring.Expressions.Parser.antlr buf.Append("text=\"" + encode(getText()) + "\" type=\"" + Type + "\">\n"); outWriter.Write(buf.ToString()); } - + public virtual void xmlSerializeRootClose(TextWriter outWriter) { outWriter.Write("\n"); } - + public virtual void xmlSerialize(TextWriter outWriter) { // print out this node and all siblings @@ -590,10 +588,10 @@ namespace Spring.Expressions.Parser.antlr else { ((BaseAST) node).xmlSerializeRootOpen(outWriter); - + // print children ((BaseAST) node.getFirstChild()).xmlSerialize(outWriter); - + // print end tag ((BaseAST) node).xmlSerializeRootClose(outWriter); } @@ -608,9 +606,9 @@ namespace Spring.Expressions.Parser.antlr } #endregion - public override Int32 GetHashCode() + public override Int32 GetHashCode() { return base.GetHashCode(); - } + } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/ByteBuffer.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/ByteBuffer.cs index 3ce752cc..2f02547e 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/ByteBuffer.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/ByteBuffer.cs @@ -1,5 +1,3 @@ -using System; - using Stream = System.IO.Stream; namespace Spring.Expressions.Parser.antlr @@ -88,4 +86,4 @@ namespace Spring.Expressions.Parser.antlr // } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/CharBuffer.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/CharBuffer.cs index 29ecfda1..85aba59f 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/CharBuffer.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/CharBuffer.cs @@ -1,5 +1,3 @@ -using System; - using TextReader = System.IO.TextReader; using IOException = System.IO.IOException; @@ -31,7 +29,7 @@ namespace Spring.Expressions.Parser.antlr * character is not done by conume(), but deferred until needed by LA or LT. *

*/ - + // SAS: Move most functionality into InputBuffer -- just the file-specific // stuff is in here public class CharBuffer : InputBuffer @@ -46,13 +44,13 @@ namespace Spring.Expressions.Parser.antlr ///

private char[] buf = new char[BUF_SIZE]; - + /*Create a character buffer */ public CharBuffer(TextReader input_) : base() - { + { input = input_; } - + /*Ensure that the character buffer is sufficiently full */ override public void fill(int amount) { @@ -89,4 +87,4 @@ namespace Spring.Expressions.Parser.antlr } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/CharQueue.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/CharQueue.cs index 6c5e6d3f..15f58a32 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/CharQueue.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/CharQueue.cs @@ -1,5 +1,3 @@ -using System; - namespace Spring.Expressions.Parser.antlr { /*ANTLR Translator Generator @@ -16,7 +14,7 @@ namespace Spring.Expressions.Parser.antlr // // With many thanks to Eric V. Smith from the ANTLR list. // - + /*A circular buffer object used by CharBuffer */ public class CharQueue { @@ -28,7 +26,7 @@ namespace Spring.Expressions.Parser.antlr private int offset; /*number of tokens in the queue */ protected internal int nbrEntries; - + public CharQueue(int minSize) { // Find first power of 2 >= to requested size @@ -44,13 +42,13 @@ namespace Spring.Expressions.Parser.antlr init(Int32.MaxValue); // wow that's big. return ; } - for (size = 2; size < minSize; size *= 2) - { + for (size = 2; size < minSize; size *= 2) + { ; } init(size); } - + /*Add token to end of the queue * @param tok The token to add */ @@ -63,7 +61,7 @@ namespace Spring.Expressions.Parser.antlr buffer[(offset + nbrEntries) & sizeLessOne] = tok; nbrEntries++; } - + /*Fetch a token from the queue by index * @param idx The index of the token to fetch, where zero is the token at the front of the queue */ @@ -71,7 +69,7 @@ namespace Spring.Expressions.Parser.antlr { return buffer[(offset + idx) & sizeLessOne]; } - + /*Expand the token buffer by doubling its capacity */ private void expand() { @@ -88,7 +86,7 @@ namespace Spring.Expressions.Parser.antlr sizeLessOne = buffer.Length - 1; offset = 0; } - + /*Initialize the queue. * @param size The initial size of the queue */ @@ -101,7 +99,7 @@ namespace Spring.Expressions.Parser.antlr offset = 0; nbrEntries = 0; } - + /*Clear the queue. Leaving the previous buffer alone. */ public void reset() @@ -109,7 +107,7 @@ namespace Spring.Expressions.Parser.antlr offset = 0; nbrEntries = 0; } - + /*Remove char from front of queue */ public void removeFirst() { @@ -117,4 +115,4 @@ namespace Spring.Expressions.Parser.antlr nbrEntries--; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/CharScanner.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/CharScanner.cs index 90d5d3d7..59287b16 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/CharScanner.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/CharScanner.cs @@ -1,6 +1,4 @@ -using System; - -using Spring.Expressions.Parser.antlr.debug; +using Spring.Expressions.Parser.antlr.debug; using Stream = System.IO.Stream; using TextReader = System.IO.TextReader; using StringBuilder = System.Text.StringBuilder; @@ -26,7 +24,7 @@ namespace Spring.Expressions.Parser.antlr // // With many thanks to Eric V. Smith from the ANTLR list. // - + public abstract class CharScanner : TokenStream, ICharScannerDebugSubject { internal const char NO_CHAR = (char) (0); @@ -35,7 +33,7 @@ namespace Spring.Expressions.Parser.antlr // Used to store event delegates private EventHandlerList events_ = new EventHandlerList(); - protected internal EventHandlerList Events + protected internal EventHandlerList Events { get { return events_; } } @@ -59,7 +57,7 @@ namespace Spring.Expressions.Parser.antlr internal static readonly object SynPredSucceededEventKey = new object(); protected internal StringBuilder text; // text of current token - + protected bool saveConsumedInput = true; // does consume() save characters? /// Used for creating Token instances. @@ -72,38 +70,38 @@ namespace Spring.Expressions.Parser.antlr protected bool caseSensitive = true; protected bool caseSensitiveLiterals = true; protected Hashtable literals; // set by subclass - + /*Tab chars are handled by tab() according to this value; override * method to do anything weird with tabs. */ protected internal int tabsize = 8; - + protected internal IToken returnToken_ = null; // used to return tokens w/o using return val. - + protected internal LexerSharedInputState inputState; - + /*Used during filter mode to indicate that path is desired. * A subsequent scan error will report an error as usual if * acceptPath=true; */ protected internal bool commitToPath = false; - + /*Used to keep track of indentdepth for traceIn/Out */ protected internal int traceDepth = 0; - + public CharScanner() { text = new StringBuilder(); setTokenCreator(new CommonToken.CommonTokenCreator()); } - + public CharScanner(InputBuffer cb) : this() { inputState = new LexerSharedInputState(cb); cached_LA2 = inputState.input.LA(2); cached_LA1 = inputState.input.LA(1); } - + public CharScanner(LexerSharedInputState sharedState) : this() { inputState = sharedState; @@ -113,7 +111,7 @@ namespace Spring.Expressions.Parser.antlr cached_LA1 = inputState.input.LA(1); } } - + public event TraceEventHandler EnterRule { @@ -221,7 +219,7 @@ namespace Spring.Expressions.Parser.antlr text.Append(c); } } - + public virtual void append(string s) { if (saveConsumedInput) @@ -229,18 +227,18 @@ namespace Spring.Expressions.Parser.antlr text.Append(s); } } - + public virtual void commit() { inputState.input.commit(); } - + public virtual void recover(RecognitionException ex, BitSet tokenSet) { consume(); consumeUntil(tokenSet); } - + public virtual void consume() { if (inputState.guessing == 0) @@ -275,7 +273,7 @@ namespace Spring.Expressions.Parser.antlr cached_LA2 = toLower(inputState.input.LA(2)); } } - + /*Consume chars until one matches the given char */ public virtual void consumeUntil(int c) { @@ -284,7 +282,7 @@ namespace Spring.Expressions.Parser.antlr consume(); } } - + /*Consume chars until one matches the given set */ public virtual void consumeUntil(BitSet bset) { @@ -293,68 +291,68 @@ namespace Spring.Expressions.Parser.antlr consume(); } } - + public virtual bool getCaseSensitive() { return caseSensitive; } - + public bool getCaseSensitiveLiterals() { return caseSensitiveLiterals; } - + public virtual int getColumn() { return inputState.column; } - + public virtual void setColumn(int c) { inputState.column = c; } - + public virtual bool getCommitToPath() { return commitToPath; } - + public virtual string getFilename() { return inputState.filename; } - + public virtual InputBuffer getInputBuffer() { return inputState.input; } - + public virtual LexerSharedInputState getInputState() { return inputState; } - + public virtual void setInputState(LexerSharedInputState state) { inputState = state; } - + public virtual int getLine() { return inputState.line; } - + /*return a copy of the current text buffer */ public virtual string getText() { return text.ToString(); } - + public virtual IToken getTokenObject() { return returnToken_; } - + public virtual char LA(int i) { if (i == 1) @@ -374,7 +372,7 @@ namespace Spring.Expressions.Parser.antlr return toLower(inputState.input.LA(i)); } } - + protected internal virtual IToken makeToken(int t) { IToken newToken = null; @@ -405,12 +403,12 @@ namespace Spring.Expressions.Parser.antlr } return newToken; } - + public virtual int mark() { return inputState.input.mark(); } - + public virtual void match(char c) { match((int) c); @@ -424,7 +422,7 @@ namespace Spring.Expressions.Parser.antlr } consume(); } - + public virtual void match(BitSet b) { if (!b.member(cached_LA1)) @@ -433,7 +431,7 @@ namespace Spring.Expressions.Parser.antlr } consume(); } - + public virtual void match(string s) { int len = s.Length; @@ -446,12 +444,12 @@ namespace Spring.Expressions.Parser.antlr consume(); } } - + public virtual void matchNot(char c) { matchNot((int) c); } - + public virtual void matchNot(int c) { if (cached_LA1 == c) @@ -460,7 +458,7 @@ namespace Spring.Expressions.Parser.antlr } consume(); } - + public virtual void matchRange(int c1, int c2) { if (cached_LA1 < c1 || cached_LA1 > c2) @@ -469,18 +467,18 @@ namespace Spring.Expressions.Parser.antlr } consume(); } - + public virtual void matchRange(char c1, char c2) { matchRange((int) c1, (int) c2); } - + public virtual void newline() { inputState.line++; inputState.column = 1; } - + /*advance the current column number by an appropriate amount * according to tab size. This method is called from consume(). */ @@ -490,17 +488,17 @@ namespace Spring.Expressions.Parser.antlr int nc = (((c - 1) / tabsize) + 1) * tabsize + 1; // calculate tab stop setColumn(nc); } - + public virtual void setTabSize(int size) { tabsize = size; } - + public virtual int getTabSize() { return tabsize; } - + public virtual void panic() { //Console.Error.WriteLine("CharScanner: panic"); @@ -508,12 +506,12 @@ namespace Spring.Expressions.Parser.antlr panic(""); } - + /// /// This method is executed by ANTLR internally when it detected an illegal /// state that cannot be recovered from. /// The previous implementation of this method called - /// and writes directly to , which is usually not + /// and writes directly to , which is usually not /// appropriate when a translator is embedded into a larger application. /// /// Error message. @@ -523,13 +521,13 @@ namespace Spring.Expressions.Parser.antlr //Environment.Exit(1); throw new ANTLRPanicException("CharScanner::panic: " + s); } - + /*Parser error-reporting function can be overridden in subclass */ public virtual void reportError(RecognitionException ex) { Console.Error.WriteLine(ex); } - + /*Parser error-reporting function can be overridden in subclass */ public virtual void reportError(string s) { @@ -542,7 +540,7 @@ namespace Spring.Expressions.Parser.antlr Console.Error.WriteLine(getFilename() + ": error: " + s); } } - + /*Parser warning-reporting function can be overridden in subclass */ public virtual void reportWarning(string s) { @@ -555,7 +553,7 @@ namespace Spring.Expressions.Parser.antlr Console.Error.WriteLine(getFilename() + ": warning: " + s); } } - + public virtual void refresh() { if (caseSensitive) @@ -594,7 +592,7 @@ namespace Spring.Expressions.Parser.antlr inputState.tokenStartColumn = inputState.column; inputState.tokenStartLine = inputState.line; } - + public virtual void rewind(int pos) { inputState.input.rewind(pos); @@ -610,7 +608,7 @@ namespace Spring.Expressions.Parser.antlr cached_LA1 = toLower(inputState.input.LA(1)); } } - + public virtual void setCaseSensitive(bool t) { caseSensitive = t; @@ -625,38 +623,38 @@ namespace Spring.Expressions.Parser.antlr cached_LA1 = toLower(inputState.input.LA(1)); } } - + public virtual void setCommitToPath(bool commit) { commitToPath = commit; } - + public virtual void setFilename(string f) { inputState.filename = f; } - + public virtual void setLine(int line) { inputState.line = line; } - + public virtual void setText(string s) { resetText(); text.Append(s); } - + public virtual void setTokenObjectClass(string cl) { this.tokenCreator = new ReflectionBasedTokenCreator(this, cl); } - + public virtual void setTokenCreator(TokenCreator tokenCreator) { this.tokenCreator = tokenCreator; } - + // Test the token text against the literals table // Override this method to perform a different literals test public virtual int testLiteralsTable(int ttype) @@ -671,7 +669,7 @@ namespace Spring.Expressions.Parser.antlr return (typeAsObject == null) ? ttype : ((int) typeAsObject); } } - + /*Test the text passed in against the literals table * Override this method to perform a different literals test * This is used primarily when you want to test a portion of @@ -687,33 +685,33 @@ namespace Spring.Expressions.Parser.antlr return (typeAsObject == null) ? ttype : ((int) typeAsObject); } } - + // Override this method to get more specific case handling public virtual char toLower(int c) { return Char.ToLower(Convert.ToChar(c), System.Globalization.CultureInfo.InvariantCulture); } - + public virtual void traceIndent() { for (int i = 0; i < traceDepth; i++) Console.Out.Write(" "); } - + public virtual void traceIn(string rname) { traceDepth += 1; traceIndent(); Console.Out.WriteLine("> lexer " + rname + "; c==" + LA(1)); } - + public virtual void traceOut(string rname) { traceIndent(); Console.Out.WriteLine("< lexer " + rname + "; c==" + LA(1)); traceDepth -= 1; } - + /*This method is called by YourLexer.nextToken() when the lexer has * hit EOF condition. EOF is NOT a character. * This method is not called if EOF is reached during @@ -788,8 +786,8 @@ namespace Spring.Expressions.Parser.antlr public override string TokenTypeName { get - { - return tokenTypeName; + { + return tokenTypeName; } } @@ -812,4 +810,4 @@ namespace Spring.Expressions.Parser.antlr } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/CharStreamException.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/CharStreamException.cs index 2ca4e43c..d07ac17a 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/CharStreamException.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/CharStreamException.cs @@ -1,5 +1,3 @@ -using System; - namespace Spring.Expressions.Parser.antlr { /*ANTLR Translator Generator @@ -31,4 +29,4 @@ namespace Spring.Expressions.Parser.antlr { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/CharStreamIOException.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/CharStreamIOException.cs index e142b728..8b0a000d 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/CharStreamIOException.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/CharStreamIOException.cs @@ -1,4 +1,3 @@ -using System; using IOException = System.IO.IOException; namespace Spring.Expressions.Parser.antlr @@ -17,7 +16,7 @@ namespace Spring.Expressions.Parser.antlr // // With many thanks to Eric V. Smith from the ANTLR list. // - + /* * Wrap an IOException in a CharStreamException */ @@ -25,10 +24,10 @@ namespace Spring.Expressions.Parser.antlr public class CharStreamIOException : CharStreamException { public IOException io; - + public CharStreamIOException(IOException io) : base(io.Message) { this.io = io; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/CommonAST.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/CommonAST.cs index a50f0057..74ccd634 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/CommonAST.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/CommonAST.cs @@ -1,7 +1,5 @@ -using System; - using AST = Spring.Expressions.Parser.antlr.collections.AST; - + namespace Spring.Expressions.Parser.antlr { /*ANTLR Translator Generator @@ -26,8 +24,8 @@ namespace Spring.Expressions.Parser.antlr internal int ttype = Token.INVALID_TYPE; internal string text; - - + + [Obsolete("Deprecated since version 2.7.2. Use ASTFactory.dup() instead.", false)] protected CommonAST(CommonAST another) { @@ -43,35 +41,35 @@ namespace Spring.Expressions.Parser.antlr { return text; } - + /*Get the token type for this node */ override public int Type { get { return ttype; } set { ttype = value; } } - + override public void initialize(int t, string txt) { Type = t; setText(txt); } - + override public void initialize(collections.AST t) { setText(t.getText()); Type = t.Type; } - + public CommonAST() { } - + public CommonAST(IToken tok) { initialize(tok); } - + override public void initialize(IToken tok) { setText(tok.getText()); @@ -106,9 +104,9 @@ namespace Spring.Expressions.Parser.antlr ///
public override string ASTNodeTypeName { - get - { - return typeof(antlr.CommonAST).FullName;; + get + { + return typeof(antlr.CommonAST).FullName;; } } @@ -121,4 +119,4 @@ namespace Spring.Expressions.Parser.antlr } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/CommonASTWithHiddenTokens.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/CommonASTWithHiddenTokens.cs index c1b05148..64f1135f 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/CommonASTWithHiddenTokens.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/CommonASTWithHiddenTokens.cs @@ -1,5 +1,3 @@ -using System; - using AST = Spring.Expressions.Parser.antlr.collections.AST; namespace Spring.Expressions.Parser.antlr @@ -28,15 +26,15 @@ namespace Spring.Expressions.Parser.antlr new public static readonly CommonASTWithHiddenTokens.CommonASTWithHiddenTokensCreator Creator = new CommonASTWithHiddenTokensCreator(); protected internal IHiddenStreamToken hiddenBefore, hiddenAfter; // references to hidden tokens - + public CommonASTWithHiddenTokens() : base() { } - + public CommonASTWithHiddenTokens(IToken tok) : base(tok) { } - + [Obsolete("Deprecated since version 2.7.2. Use ASTFactory.dup() instead.", false)] protected CommonASTWithHiddenTokens(CommonASTWithHiddenTokens another) : base(another) { @@ -48,12 +46,12 @@ namespace Spring.Expressions.Parser.antlr { return hiddenAfter; } - + public virtual IHiddenStreamToken getHiddenBefore() { return hiddenBefore; } - + override public void initialize(collections.AST t) { hiddenBefore = ((CommonASTWithHiddenTokens) t).getHiddenBefore(); @@ -87,9 +85,9 @@ namespace Spring.Expressions.Parser.antlr ///
public override string ASTNodeTypeName { - get - { - return typeof(antlr.CommonASTWithHiddenTokens).FullName;; + get + { + return typeof(antlr.CommonASTWithHiddenTokens).FullName;; } } @@ -102,4 +100,4 @@ namespace Spring.Expressions.Parser.antlr } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/DumpASTVisitor.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/DumpASTVisitor.cs index 48cc0bdd..4cc196f7 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/DumpASTVisitor.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/DumpASTVisitor.cs @@ -1,5 +1,3 @@ -using System; - using AST = Spring.Expressions.Parser.antlr.collections.AST; namespace Spring.Expressions.Parser.antlr diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/LLkParser.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/LLkParser.cs index 8f164ac6..650a9d2d 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/LLkParser.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/LLkParser.cs @@ -1,5 +1,3 @@ -using System; - namespace Spring.Expressions.Parser.antlr { /*ANTLR Translator Generator @@ -26,7 +24,7 @@ namespace Spring.Expressions.Parser.antlr public class LLkParser : Parser { internal int k; - + public LLkParser(int k_) { k = k_; @@ -79,7 +77,7 @@ namespace Spring.Expressions.Parser.antlr if ( LT(i)!=null ) { Console.Out.Write("LA(" + i + ")==" + LT(i).getText()); } - else + else { Console.Out.Write("LA(" + i + ")==ull"); } @@ -97,4 +95,4 @@ namespace Spring.Expressions.Parser.antlr traceDepth -= 1; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/MismatchedCharException.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/MismatchedCharException.cs index 4ff189e6..d9ca8757 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/MismatchedCharException.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/MismatchedCharException.cs @@ -1,5 +1,3 @@ -using System; - using StringBuilder = System.Text.StringBuilder; using BitSet = Spring.Expressions.Parser.antlr.collections.impl.BitSet; @@ -20,7 +18,7 @@ namespace Spring.Expressions.Parser.antlr // // With many thanks to Eric V. Smith from the ANTLR list. // - + [Serializable] public class MismatchedCharException : RecognitionException { @@ -29,25 +27,25 @@ namespace Spring.Expressions.Parser.antlr */ override public string Message { - get + get { StringBuilder sb = new StringBuilder(); - + switch (mismatchType) { - case CharTypeEnum.CharType: + case CharTypeEnum.CharType: sb.Append("expecting "); appendCharName(sb, expecting); sb.Append(", found "); appendCharName(sb, foundChar); break; - - case CharTypeEnum.NotCharType: + + case CharTypeEnum.NotCharType: sb.Append("expecting anything but '"); appendCharName(sb, expecting); sb.Append("'; got it anyway"); break; - - case CharTypeEnum.RangeType: - case CharTypeEnum.NotRangeType: + + case CharTypeEnum.RangeType: + case CharTypeEnum.NotRangeType: sb.Append("expecting token "); if (mismatchType == CharTypeEnum.NotRangeType) sb.Append("NOT "); @@ -58,23 +56,23 @@ namespace Spring.Expressions.Parser.antlr sb.Append(", found "); appendCharName(sb, foundChar); break; - - case CharTypeEnum.SetType: - case CharTypeEnum.NotSetType: + + case CharTypeEnum.SetType: + case CharTypeEnum.NotSetType: sb.Append("expecting " + (mismatchType == CharTypeEnum.NotSetType ? "NOT " : "") + "one of ("); int[] elems = bset.toArray(); - for (int i = 0; i < elems.Length; i++) + for (int i = 0; i < elems.Length; i++) { appendCharName(sb, elems[i]); } sb.Append("), found "); appendCharName(sb, foundChar); break; - - default: + + default: sb.Append(base.Message); - break; - } + break; + } return sb.ToString(); } } @@ -90,34 +88,34 @@ namespace Spring.Expressions.Parser.antlr SetType = 5, NotSetType = 6 } - + // One of the above public CharTypeEnum mismatchType; - + // what was found on the input stream public int foundChar; - + // For CHAR/NOT_CHAR and RANGE/NOT_RANGE public int expecting; - + // For RANGE/NOT_RANGE (expecting is lower bound of range) public int upper; - + // For SET/NOT_SET public BitSet bset; - + // who knows...they may want to ask scanner questions public CharScanner scanner; - + /* * MismatchedCharException constructor comment. */ public MismatchedCharException() : base("Mismatched char") { } - + // Expected range / not range - public MismatchedCharException(char c, char lower, char upper_, bool matchNot, CharScanner scanner_) : + public MismatchedCharException(char c, char lower, char upper_, bool matchNot, CharScanner scanner_) : base("Mismatched char", scanner_.getFilename(), scanner_.getLine(), scanner_.getColumn()) { mismatchType = matchNot ? CharTypeEnum.NotRangeType : CharTypeEnum.RangeType; @@ -126,9 +124,9 @@ namespace Spring.Expressions.Parser.antlr upper = upper_; scanner = scanner_; } - + // Expected token / not token - public MismatchedCharException(char c, char expecting_, bool matchNot, CharScanner scanner_) : + public MismatchedCharException(char c, char expecting_, bool matchNot, CharScanner scanner_) : base("Mismatched char", scanner_.getFilename(), scanner_.getLine(), scanner_.getColumn()) { mismatchType = matchNot ? CharTypeEnum.NotCharType : CharTypeEnum.CharType; @@ -136,7 +134,7 @@ namespace Spring.Expressions.Parser.antlr expecting = expecting_; scanner = scanner_; } - + // Expected BitSet / not BitSet public MismatchedCharException(char c, BitSet set_, bool matchNot, CharScanner scanner_) : base("Mismatched char", scanner_.getFilename(), scanner_.getLine(), scanner_.getColumn()) @@ -145,16 +143,16 @@ namespace Spring.Expressions.Parser.antlr foundChar = c; bset = set_; scanner = scanner_; - } + } /// /// Append a char to the msg buffer. If special, then show escaped version /// /// Message buffer /// Char to append - private void appendCharName(StringBuilder sb, int c) + private void appendCharName(StringBuilder sb, int c) { - switch (c) + switch (c) { case 65535 : // 65535 = (char) -1 = EOF @@ -177,4 +175,4 @@ namespace Spring.Expressions.Parser.antlr } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/MismatchedTokenException.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/MismatchedTokenException.cs index 5a94313c..29395285 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/MismatchedTokenException.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/MismatchedTokenException.cs @@ -1,5 +1,3 @@ -using System; - using StringBuilder = System.Text.StringBuilder; using BitSet = Spring.Expressions.Parser.antlr.collections.impl.BitSet; @@ -21,7 +19,7 @@ namespace Spring.Expressions.Parser.antlr // // With many thanks to Eric V. Smith from the ANTLR list. // - + [Serializable] public class MismatchedTokenException : RecognitionException { @@ -31,9 +29,9 @@ namespace Spring.Expressions.Parser.antlr public IToken token; // The offending AST node if tree walking public AST node; - + internal string tokenText = null; // taken from node or token object - + // Types of tokens public enum TokenTypeEnum { @@ -46,23 +44,23 @@ namespace Spring.Expressions.Parser.antlr } // One of the above public TokenTypeEnum mismatchType; - + // For TOKEN/NOT_TOKEN and RANGE/NOT_RANGE public int expecting; - + // For RANGE/NOT_RANGE (expecting is lower bound of range) public int upper; - + // For SET/NOT_SET public BitSet bset; - + /*Looking for AST wildcard, didn't find it */ public MismatchedTokenException() : base("Mismatched Token: expecting any AST node", "", - 1, - 1) { } - + // Expected range / not range - public MismatchedTokenException(string[] tokenNames_, AST node_, int lower, int upper_, bool matchNot) : + public MismatchedTokenException(string[] tokenNames_, AST node_, int lower, int upper_, bool matchNot) : base("Mismatched Token", "", - 1, - 1) { tokenNames = tokenNames_; @@ -79,7 +77,7 @@ namespace Spring.Expressions.Parser.antlr expecting = lower; upper = upper_; } - + // Expected token / not token public MismatchedTokenException(string[] tokenNames_, AST node_, int expecting_, bool matchNot) : base("Mismatched Token", "", - 1, - 1) @@ -97,7 +95,7 @@ namespace Spring.Expressions.Parser.antlr mismatchType = matchNot ? TokenTypeEnum.NotTokenType : TokenTypeEnum.TokenType; expecting = expecting_; } - + // Expected BitSet / not BitSet public MismatchedTokenException(string[] tokenNames_, AST node_, BitSet set_, bool matchNot) : base("Mismatched Token", "", - 1, - 1) @@ -115,9 +113,9 @@ namespace Spring.Expressions.Parser.antlr mismatchType = matchNot ? TokenTypeEnum.NotSetType : TokenTypeEnum.SetType; bset = set_; } - + // Expected range / not range - public MismatchedTokenException(string[] tokenNames_, IToken token_, int lower, int upper_, bool matchNot, string fileName_) : + public MismatchedTokenException(string[] tokenNames_, IToken token_, int lower, int upper_, bool matchNot, string fileName_) : base("Mismatched Token", fileName_, token_.getLine(), token_.getColumn()) { tokenNames = tokenNames_; @@ -127,7 +125,7 @@ namespace Spring.Expressions.Parser.antlr expecting = lower; upper = upper_; } - + // Expected token / not token public MismatchedTokenException(string[] tokenNames_, IToken token_, int expecting_, bool matchNot, string fileName_) : base("Mismatched Token", fileName_, token_.getLine(), token_.getColumn()) @@ -138,7 +136,7 @@ namespace Spring.Expressions.Parser.antlr mismatchType = matchNot ? TokenTypeEnum.NotTokenType : TokenTypeEnum.TokenType; expecting = expecting_; } - + // Expected BitSet / not BitSet public MismatchedTokenException(string[] tokenNames_, IToken token_, BitSet set_, bool matchNot, string fileName_) : base("Mismatched Token", fileName_, token_.getLine(), token_.getColumn()) @@ -149,35 +147,35 @@ namespace Spring.Expressions.Parser.antlr mismatchType = matchNot ? TokenTypeEnum.NotSetType : TokenTypeEnum.SetType; bset = set_; } - + /* * Returns a clean error message (no line number/column information) */ override public string Message { - get + get { StringBuilder sb = new StringBuilder(); - + switch (mismatchType) { - case TokenTypeEnum.TokenType: + case TokenTypeEnum.TokenType: sb.Append("expecting " + tokenName(expecting) + ", found '" + tokenText + "'"); break; - - case TokenTypeEnum.NotTokenType: + + case TokenTypeEnum.NotTokenType: sb.Append("expecting anything but " + tokenName(expecting) + "; got it anyway"); break; - - case TokenTypeEnum.RangeType: + + case TokenTypeEnum.RangeType: sb.Append("expecting token in range: " + tokenName(expecting) + ".." + tokenName(upper) + ", found '" + tokenText + "'"); break; - - case TokenTypeEnum.NotRangeType: + + case TokenTypeEnum.NotRangeType: sb.Append("expecting token NOT in range: " + tokenName(expecting) + ".." + tokenName(upper) + ", found '" + tokenText + "'"); break; - - case TokenTypeEnum.SetType: case TokenTypeEnum.NotSetType: + + case TokenTypeEnum.SetType: case TokenTypeEnum.NotSetType: sb.Append("expecting " + (mismatchType == TokenTypeEnum.NotSetType ? "NOT " : "") + "one of ("); int[] elems = bset.toArray(); for (int i = 0; i < elems.Length; i++) @@ -187,15 +185,15 @@ namespace Spring.Expressions.Parser.antlr } sb.Append("), found '" + tokenText + "'"); break; - - default: + + default: sb.Append(base.Message); - break; - } + break; + } return sb.ToString(); } } - + private string tokenName(int tokenType) { if (tokenType == Token.INVALID_TYPE) @@ -212,4 +210,4 @@ namespace Spring.Expressions.Parser.antlr } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/NoViableAltException.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/NoViableAltException.cs index 483dc27a..c27b4365 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/NoViableAltException.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/NoViableAltException.cs @@ -1,5 +1,3 @@ -using System; - using AST = Spring.Expressions.Parser.antlr.collections.AST; namespace Spring.Expressions.Parser.antlr @@ -18,37 +16,37 @@ namespace Spring.Expressions.Parser.antlr // // With many thanks to Eric V. Smith from the ANTLR list. // - + [Serializable] public class NoViableAltException : RecognitionException { public IToken token; public AST node; // handles parsing and treeparsing - + public NoViableAltException(AST t) : base("NoViableAlt", "", - 1, - 1) { node = t; } - - public NoViableAltException(IToken t, string fileName_) : + + public NoViableAltException(IToken t, string fileName_) : base("NoViableAlt", fileName_, t.getLine(), t.getColumn()) { token = t; } - + /* * Returns a clean error message (no line number/column information) */ override public string Message { - get + get { if (token != null) { //return "unexpected token: " + token.getText(); return "unexpected token: " + token.ToString(); } - + // must a tree parser error if token==null if ( (node==null) || (node==TreeParser.ASTNULL) ) { @@ -58,4 +56,4 @@ namespace Spring.Expressions.Parser.antlr } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/NoViableAltForCharException.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/NoViableAltForCharException.cs index d7c06f4d..7f453540 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/NoViableAltForCharException.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/NoViableAltForCharException.cs @@ -1,4 +1,3 @@ -using System; using StringBuilder = System.Text.StringBuilder; namespace Spring.Expressions.Parser.antlr @@ -17,24 +16,24 @@ namespace Spring.Expressions.Parser.antlr // // With many thanks to Eric V. Smith from the ANTLR list. // - + [Serializable] public class NoViableAltForCharException : RecognitionException { public char foundChar; - + public NoViableAltForCharException(char c, CharScanner scanner) : base("NoViableAlt", scanner.getFilename(), scanner.getLine(), scanner.getColumn()) { foundChar = c; } - - public NoViableAltForCharException(char c, string fileName, int line, int column) : + + public NoViableAltForCharException(char c, string fileName, int line, int column) : base("NoViableAlt", fileName, line, column) { foundChar = c; } - + /* * Returns a clean error message (no line number/column information) */ @@ -43,11 +42,11 @@ namespace Spring.Expressions.Parser.antlr get { StringBuilder mesg = new StringBuilder("unexpected char: "); - + // I'm trying to mirror a change in the C++ stuff. // But java seems to lack something isprint-ish.. // so we do it manually. This is probably too restrictive. - + if ((foundChar >= ' ') && (foundChar <= '~')) { mesg.Append('\''); @@ -63,4 +62,4 @@ namespace Spring.Expressions.Parser.antlr } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/Parser.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/Parser.cs index 2c600e59..d58f87a1 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/Parser.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/Parser.cs @@ -1,5 +1,3 @@ -using System; - using Spring.Expressions.Parser.antlr.debug; using EventHandlerList = System.ComponentModel.EventHandlerList; @@ -22,7 +20,7 @@ using TraceListener = Spring.Expressions.Parser.antlr.debug.TraceListener; private Vector synPredListeners; private Vector traceListeners; */ - + namespace Spring.Expressions.Parser.antlr { /*ANTLR Translator Generator @@ -45,7 +43,7 @@ namespace Spring.Expressions.Parser.antlr // Used to store event delegates private EventHandlerList events_ = new EventHandlerList(); - protected internal EventHandlerList Events + protected internal EventHandlerList Events { get { return events_; } } @@ -69,36 +67,36 @@ namespace Spring.Expressions.Parser.antlr internal static readonly object SynPredSucceededEventKey = new object(); protected internal ParserSharedInputState inputState; - + /*Nesting level of registered handlers */ // protected int exceptionLevel = 0; - + /*Table of token type to token names */ protected internal string[] tokenNames; - + /*AST return value for a rule is squirreled away here */ protected internal AST returnAST; - + /*AST support code; parser and treeparser delegate to this object */ protected internal ASTFactory astFactory = new ASTFactory(); - + private bool ignoreInvalidDebugCalls = false; - + /*Used to keep track of indentdepth for traceIn/Out */ protected internal int traceDepth = 0; - + public Parser() { inputState = new ParserSharedInputState(); } - + public Parser(ParserSharedInputState state) { inputState = state; } - + /// - /// + /// /// public event TraceEventHandler EnterRule @@ -191,49 +189,49 @@ namespace Spring.Expressions.Parser.antlr remove { Events.RemoveHandler(SynPredSucceededEventKey, value); } } - + public virtual void addMessageListener(MessageListener l) { if (!ignoreInvalidDebugCalls) throw new System.ArgumentException("addMessageListener() is only valid if parser built for debugging"); } - + public virtual void addParserListener(ParserListener l) { if (!ignoreInvalidDebugCalls) throw new System.ArgumentException("addParserListener() is only valid if parser built for debugging"); } - + public virtual void addParserMatchListener(ParserMatchListener l) { if (!ignoreInvalidDebugCalls) throw new System.ArgumentException("addParserMatchListener() is only valid if parser built for debugging"); } - + public virtual void addParserTokenListener(ParserTokenListener l) { if (!ignoreInvalidDebugCalls) throw new System.ArgumentException("addParserTokenListener() is only valid if parser built for debugging"); } - + public virtual void addSemanticPredicateListener(SemanticPredicateListener l) { if (!ignoreInvalidDebugCalls) throw new System.ArgumentException("addSemanticPredicateListener() is only valid if parser built for debugging"); } - + public virtual void addSyntacticPredicateListener(SyntacticPredicateListener l) { if (!ignoreInvalidDebugCalls) throw new System.ArgumentException("addSyntacticPredicateListener() is only valid if parser built for debugging"); } - + public virtual void addTraceListener(TraceListener l) { if (!ignoreInvalidDebugCalls) throw new System.ArgumentException("addTraceListener() is only valid if parser built for debugging"); } - + /*Get another token object from the token stream */ public abstract void consume(); /*Consume tokens until one matches the given token */ @@ -269,17 +267,17 @@ namespace Spring.Expressions.Parser.antlr { return inputState.filename; } - + public virtual ParserSharedInputState getInputState() { return inputState; } - + public virtual void setInputState(ParserSharedInputState state) { inputState = state; } - + public virtual void resetState() { traceDepth = 0; @@ -347,7 +345,7 @@ namespace Spring.Expressions.Parser.antlr /// static, it cannot be overridden to avoid these problems. /// ANTLR no longer uses this method internally or in generated code. ///
- /// + /// [Obsolete("De-activated since version 2.7.2.6 as it cannot be overidden.", true)] public static void panic() { @@ -390,13 +388,13 @@ namespace Spring.Expressions.Parser.antlr if (!ignoreInvalidDebugCalls) throw new System.SystemException("removeTraceListener() is only valid if parser built for debugging"); } - + /*Parser error-reporting function can be overridden in subclass */ public virtual void reportError(RecognitionException ex) { Console.Error.WriteLine(ex); } - + /*Parser error-reporting function can be overridden in subclass */ public virtual void reportError(string s) { @@ -409,7 +407,7 @@ namespace Spring.Expressions.Parser.antlr Console.Error.WriteLine(getFilename() + ": error: " + s); } } - + /*Parser warning-reporting function can be overridden in subclass */ public virtual void reportWarning(string s) { @@ -422,13 +420,13 @@ namespace Spring.Expressions.Parser.antlr Console.Error.WriteLine(getFilename() + ": warning: " + s); } } - + public virtual void recover(RecognitionException ex, BitSet tokenSet) { consume(); consumeUntil(tokenSet); } - + public virtual void rewind(int pos) { inputState.input.rewind(pos); @@ -436,7 +434,7 @@ namespace Spring.Expressions.Parser.antlr /// /// Specify an object with support code (shared by Parser and TreeParser. - /// Normally, the programmer does not play with this, using + /// Normally, the programmer does not play with this, using /// instead. /// /// @@ -446,7 +444,7 @@ namespace Spring.Expressions.Parser.antlr } /// - /// Specify the type of node to create during tree building. + /// Specify the type of node to create during tree building. /// /// Fully qualified AST Node type name. public virtual void setASTNodeClass(string cl) @@ -455,8 +453,8 @@ namespace Spring.Expressions.Parser.antlr } /// - /// Specify the type of node to create during tree building. - /// use now to be consistent with + /// Specify the type of node to create during tree building. + /// use now to be consistent with /// Token Object Type accessor. /// /// Fully qualified AST Node type name. @@ -484,7 +482,7 @@ namespace Spring.Expressions.Parser.antlr { inputState.input = t; } - + public virtual void traceIndent() { for (int i = 0; i < traceDepth; i++) diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/RecognitionException.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/RecognitionException.cs index 85c667da..ae978b12 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/RecognitionException.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/RecognitionException.cs @@ -1,5 +1,3 @@ -using System; - namespace Spring.Expressions.Parser.antlr { /*ANTLR Translator Generator @@ -16,21 +14,21 @@ namespace Spring.Expressions.Parser.antlr // // With many thanks to Eric V. Smith from the ANTLR list. // - + [Serializable] public class RecognitionException : ANTLRException { public string fileName; // not used by treeparsers public int line; // not used by treeparsers public int column; // not used by treeparsers - + public RecognitionException() : base("parsing error") { fileName = null; line = - 1; column = - 1; } - + /* * RecognitionException constructor comment. * @param s java.lang.String @@ -41,7 +39,7 @@ namespace Spring.Expressions.Parser.antlr line = - 1; column = - 1; } - + /* * RecognitionException constructor comment. * @param s java.lang.String @@ -52,31 +50,31 @@ namespace Spring.Expressions.Parser.antlr line = line_; column = column_; } - + public virtual string getFilename() { return fileName; } - + public virtual int getLine() { return line; } - + public virtual int getColumn() { return column; } - + [Obsolete("Replaced by Message property since version 2.7.0", true)] public virtual string getErrorMessage() { return Message; } - + override public string ToString() { return FileLineFormatter.getFormatter().getFormatString(fileName, line, column) + Message; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/SemanticException.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/SemanticException.cs index 235e3013..0a44aa0f 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/SemanticException.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/SemanticException.cs @@ -1,5 +1,3 @@ -using System; - namespace Spring.Expressions.Parser.antlr { /*ANTLR Translator Generator @@ -23,12 +21,12 @@ namespace Spring.Expressions.Parser.antlr public SemanticException(string s) : base(s) { } - + [Obsolete("Replaced by SemanticException(string, string, int, int) since version 2.7.2.6", false)] public SemanticException(String s, String fileName, int line) : this(s, fileName, line, -1) { - + } public SemanticException(string s, string fileName, int line, int column) : @@ -36,4 +34,4 @@ namespace Spring.Expressions.Parser.antlr { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamException.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamException.cs index 3ad0183c..814ef4b9 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamException.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamException.cs @@ -1,5 +1,3 @@ -using System; - namespace Spring.Expressions.Parser.antlr { /*ANTLR Translator Generator @@ -31,4 +29,4 @@ namespace Spring.Expressions.Parser.antlr { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamIOException.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamIOException.cs index 34c5fee6..9dd9245b 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamIOException.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamIOException.cs @@ -1,6 +1,5 @@ -using System; using IOException = System.IO.IOException; - + namespace Spring.Expressions.Parser.antlr { /*ANTLR Translator Generator @@ -34,4 +33,4 @@ namespace Spring.Expressions.Parser.antlr this.io = io; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamRecognitionException.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamRecognitionException.cs index 6515b380..0290f4e9 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamRecognitionException.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamRecognitionException.cs @@ -1,5 +1,3 @@ -using System; - namespace Spring.Expressions.Parser.antlr { /*ANTLR Translator Generator @@ -8,7 +6,7 @@ namespace Spring.Expressions.Parser.antlr * * $Id:$ */ - + // // ANTLR C# Code Generator by Micheal Jordan // Kunle Odutola : kunle UNDERSCORE odutola AT hotmail DOT com @@ -26,16 +24,16 @@ namespace Spring.Expressions.Parser.antlr public class TokenStreamRecognitionException : TokenStreamException { public RecognitionException recog; - + public TokenStreamRecognitionException(RecognitionException re) : base(re.Message) { this.recog = re; } - + override public string ToString() { return recog.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamRetryException.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamRetryException.cs index 49e31473..6a8f6b2a 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamRetryException.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/TokenStreamRetryException.cs @@ -1,5 +1,3 @@ -using System; - namespace Spring.Expressions.Parser.antlr { /*ANTLR Translator Generator @@ -28,4 +26,4 @@ namespace Spring.Expressions.Parser.antlr { public TokenStreamRetryException() {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/TreeParser.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/TreeParser.cs index 0a4f30cd..2f111ebe 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/TreeParser.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/TreeParser.cs @@ -1,5 +1,3 @@ -using System; - using AST = Spring.Expressions.Parser.antlr.collections.AST; using BitSet = Spring.Expressions.Parser.antlr.collections.impl.BitSet; @@ -176,4 +174,4 @@ namespace Spring.Expressions.Parser.antlr traceDepth--; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/collections/AST.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/collections/AST.cs index fd359392..9c4cc9d6 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/collections/AST.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/collections/AST.cs @@ -1,4 +1,3 @@ -using System; using IEnumerator = System.Collections.IEnumerator; namespace Spring.Expressions.Parser.antlr.collections @@ -84,4 +83,4 @@ namespace Spring.Expressions.Parser.antlr.collections string ToStringList(); string ToStringTree(); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Parser/antlr/collections/impl/BitSet.cs b/src/Spring/Spring.Core/Expressions/Parser/antlr/collections/impl/BitSet.cs index d52ad043..6fcc4ce8 100644 --- a/src/Spring/Spring.Core/Expressions/Parser/antlr/collections/impl/BitSet.cs +++ b/src/Spring/Spring.Core/Expressions/Parser/antlr/collections/impl/BitSet.cs @@ -1,4 +1,3 @@ -using System; using ArrayList = System.Collections.ArrayList; //using CharFormatter = antlr.CharFormatter; @@ -19,7 +18,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl // // With many thanks to Eric V. Smith from the ANTLR list. // - + /*A BitSet to replace java.util.BitSet. * Primary differences are that most set operators return new sets * as opposed to oring and anding "in place". Further, a number of @@ -41,28 +40,28 @@ namespace Spring.Expressions.Parser.antlr.collections.impl protected internal const int BITS = 64; // number of bits / long protected internal const int NIBBLE = 4; protected internal const int LOG_BITS = 6; // 2^6 == 64 - + /*We will often need to do a mod operator (i mod nbits). Its * turns out that, for powers of two, this mod operation is * same as (i & (nbits-1)). Since mod is slow, we use a * precomputed mod mask to do the mod instead. */ protected internal static readonly int MOD_MASK = BITS - 1; - + /*The actual data bits */ protected internal long[] dataBits; - + /*Construct a bitset of size one word (64 bits) */ public BitSet() : this(BITS) { } - + /*Construction from a static array of longs */ public BitSet(long[] bits_) { dataBits = bits_; } - + /*Construct a bitset given the size * @param nbits The size of the bitset in bits */ @@ -70,7 +69,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl { dataBits = new long[((nbits - 1) >> LOG_BITS) + 1]; } - + /*or this element into this set (grow as necessary to accommodate) */ public virtual void add(int el) { @@ -81,14 +80,14 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } dataBits[n] |= bitMask(el); } - + public virtual BitSet and(BitSet a) { BitSet s = (BitSet) this.Clone(); s.andInPlace(a); return s; } - + public virtual void andInPlace(BitSet a) { int min = (int) (Math.Min(dataBits.Length, a.dataBits.Length)); @@ -102,13 +101,13 @@ namespace Spring.Expressions.Parser.antlr.collections.impl dataBits[i] = 0; } } - + private static long bitMask(int bitNumber) { int bitPosition = bitNumber & MOD_MASK; // bitNumber mod BITS return 1L << bitPosition; } - + public virtual void clear() { for (int i = dataBits.Length - 1; i >= 0; i--) @@ -116,7 +115,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl dataBits[i] = 0; } } - + public virtual void clear(int el) { int n = wordNumber(el); @@ -127,7 +126,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } dataBits[n] &= ~ bitMask(el); } - + public virtual object Clone() { BitSet s; @@ -143,7 +142,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } return s; } - + public virtual int degree() { int deg = 0; @@ -163,7 +162,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } return deg; } - + override public int GetHashCode() { return dataBits.GetHashCode(); @@ -175,7 +174,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl if ((obj != null) && (obj is BitSet)) { BitSet bset = (BitSet) obj; - + int n = (int) (System.Math.Min(dataBits.Length, bset.dataBits.Length)); for (int i = n; i-- > 0; ) { @@ -208,7 +207,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } return false; } - + /* * Grows the set to a larger number of bits. * @param bit element that must fit in set @@ -220,7 +219,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl Array.Copy(dataBits, 0, newbits, 0, dataBits.Length); dataBits = newbits; } - + public virtual bool member(int el) { int n = wordNumber(el); @@ -228,7 +227,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl return false; return (dataBits[n] & bitMask(el)) != 0; } - + public virtual bool nil() { for (int i = dataBits.Length - 1; i >= 0; i--) @@ -238,14 +237,14 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } return true; } - + public virtual BitSet not() { BitSet s = (BitSet) this.Clone(); s.notInPlace(); return s; } - + public virtual void notInPlace() { for (int i = dataBits.Length - 1; i >= 0; i--) @@ -253,13 +252,13 @@ namespace Spring.Expressions.Parser.antlr.collections.impl dataBits[i] = ~ dataBits[i]; } } - + /*complement bits in the range 0..maxBit. */ public virtual void notInPlace(int maxBit) { notInPlace(0, maxBit); } - + /*complement bits in the range minBit..maxBit.*/ public virtual void notInPlace(int minBit, int maxBit) { @@ -271,19 +270,19 @@ namespace Spring.Expressions.Parser.antlr.collections.impl dataBits[n] ^= bitMask(i); } } - + private int numWordsToHold(int el) { return (el >> LOG_BITS) + 1; } - + public static BitSet of(int el) { BitSet s = new BitSet(el + 1); s.add(el); return s; } - + /*return this | a in a new set */ public virtual BitSet or(BitSet a) { @@ -291,7 +290,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl s.orInPlace(a); return s; } - + public virtual void orInPlace(BitSet a) { // If this is smaller than a, grow this first @@ -305,7 +304,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl dataBits[i] |= a.dataBits[i]; } } - + // remove this element from this set public virtual void remove(int el) { @@ -316,7 +315,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } dataBits[n] &= ~ bitMask(el); } - + /* * Sets the size of a set. * @param nwords how many words the new set should be @@ -328,12 +327,12 @@ namespace Spring.Expressions.Parser.antlr.collections.impl Array.Copy(dataBits, 0, newbits, 0, n); dataBits = newbits; } - + public virtual int size() { return dataBits.Length << LOG_BITS; // num words * bits per word } - + /*return how much space is being used by the dataBits array not * how many actually have member bits on. */ @@ -341,7 +340,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl { return dataBits.Length; } - + /*Is this contained within a? */ public virtual bool subset(BitSet a) { @@ -349,7 +348,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl return false; return this.and(a).Equals(this); } - + /*Subtract the elements of 'a' from 'this' in-place. * Basically, just turn off all bits of 'this' that are in 'a'. */ @@ -363,7 +362,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl dataBits[i] &= ~ a.dataBits[i]; } } - + public virtual int[] toArray() { int[] elems = new int[degree()]; @@ -377,17 +376,17 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } return elems; } - + public virtual long[] toPackedArray() { return dataBits; } - + override public string ToString() { return ToString(","); } - + /*Transform a bit set into a string by formatting each element as an integer * @separator The string to put in between elements * @return A commma-separated list of values @@ -408,7 +407,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } return str; } - + /*Create a string representation where instead of integer elements, the * ith element of vocabulary is displayed instead. Vocabulary is a Vector * of Strings. @@ -446,7 +445,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } return str; } - + /* * Dump a comma-separated list of the words making up the bit set. * Split each 64 bit number into two more manageable 32 bit numbers. @@ -469,7 +468,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } return s; } - + /* * Dump a comma-separated list of the words making up the bit set. * This generates a comma-separated list of Java-like long int constants. @@ -485,7 +484,7 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } return s; } - + /*Print out the bit set but collapse char ranges. */ /* public virtual string toStringWithRanges(string separator, CharFormatter formatter) { @@ -530,10 +529,10 @@ namespace Spring.Expressions.Parser.antlr.collections.impl } return str; } -*/ +*/ private static int wordNumber(int bit) { return bit >> LOG_BITS; // bit / BITS } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Processors/AverageAggregator.cs b/src/Spring/Spring.Core/Expressions/Processors/AverageAggregator.cs index 59478288..95691b10 100644 --- a/src/Spring/Spring.Core/Expressions/Processors/AverageAggregator.cs +++ b/src/Spring/Spring.Core/Expressions/Processors/AverageAggregator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using Spring.Util; @@ -61,7 +60,7 @@ namespace Spring.Expressions.Processors } } } - + return NumberUtils.Divide(total, n); } } diff --git a/src/Spring/Spring.Core/Expressions/Processors/ConversionProcessor.cs b/src/Spring/Spring.Core/Expressions/Processors/ConversionProcessor.cs index 27c99411..5e840db7 100644 --- a/src/Spring/Spring.Core/Expressions/Processors/ConversionProcessor.cs +++ b/src/Spring/Spring.Core/Expressions/Processors/ConversionProcessor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Collections; using Spring.Core.TypeConversion; -#endregion - namespace Spring.Expressions.Processors { /// @@ -73,16 +68,16 @@ namespace Spring.Expressions.Processors else if (args.Length > 1) { throw new ArgumentException("Only a single argument can be specified for a convert() processor."); - } - + } + ArrayList result = new ArrayList(); foreach(object val in source) { object newVal = TypeConversionUtils.ConvertValueIfNecessary(targetType, val, null); - result.Add(newVal); + result.Add(newVal); } return result.ToArray(targetType); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Processors/DateConversionProcessor.cs b/src/Spring/Spring.Core/Expressions/Processors/DateConversionProcessor.cs index 295afec8..86c2c0b6 100644 --- a/src/Spring/Spring.Core/Expressions/Processors/DateConversionProcessor.cs +++ b/src/Spring/Spring.Core/Expressions/Processors/DateConversionProcessor.cs @@ -1,24 +1,23 @@ #region License -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. +/* + * Copyright 2002-2010 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 -using System; using System.Globalization; namespace Spring.Expressions.Processors @@ -43,4 +42,4 @@ namespace Spring.Expressions.Processors } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Processors/DistinctProcessor.cs b/src/Spring/Spring.Core/Expressions/Processors/DistinctProcessor.cs index 7083aff2..23496e1d 100644 --- a/src/Spring/Spring.Core/Expressions/Processors/DistinctProcessor.cs +++ b/src/Spring/Spring.Core/Expressions/Processors/DistinctProcessor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using Spring.Collections; @@ -45,7 +44,7 @@ namespace Spring.Expressions.Processors /// A collection containing distinct source collection elements. /// /// - /// If there is more than one argument, or if the single optional argument + /// If there is more than one argument, or if the single optional argument /// is not Boolean. /// public object Process(ICollection source, object[] args) @@ -54,7 +53,7 @@ namespace Spring.Expressions.Processors { return null; } - + bool includeNulls = false; if (args.Length == 1) { @@ -80,4 +79,4 @@ namespace Spring.Expressions.Processors return set; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Processors/OrderByProcessor.cs b/src/Spring/Spring.Core/Expressions/Processors/OrderByProcessor.cs index 51f65038..be17756a 100644 --- a/src/Spring/Spring.Core/Expressions/Processors/OrderByProcessor.cs +++ b/src/Spring/Spring.Core/Expressions/Processors/OrderByProcessor.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using Spring.Util; namespace Spring.Expressions.Processors @@ -51,7 +49,7 @@ namespace Spring.Expressions.Processors if (x==y) return 0; if (x != null) return ((IComparable) x).CompareTo(y); - + return ((IComparable)y).CompareTo(x)*-1; } } @@ -149,11 +147,11 @@ namespace Spring.Expressions.Processors { throw new ArgumentException("compare function must accept 2 arguments"); } - comparer = new LambdaComparer(fnCompare); + comparer = new LambdaComparer(fnCompare); } else if (arg is Delegate) { - comparer = new DelegateComparer((Delegate) arg); + comparer = new DelegateComparer((Delegate) arg); } AssertUtils.ArgumentNotNull(comparer, "comparer", "orderBy(comparer) argument 'comparer' does not evaluate to a supported type"); @@ -163,4 +161,4 @@ namespace Spring.Expressions.Processors return list; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Processors/ReverseProcessor.cs b/src/Spring/Spring.Core/Expressions/Processors/ReverseProcessor.cs index 95a7f9e5..1189d8ec 100644 --- a/src/Spring/Spring.Core/Expressions/Processors/ReverseProcessor.cs +++ b/src/Spring/Spring.Core/Expressions/Processors/ReverseProcessor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,8 @@ #endregion -#region Imports - using System.Collections; -#endregion - namespace Spring.Expressions.Processors { /// @@ -54,7 +50,7 @@ namespace Spring.Expressions.Processors ArrayList list = new ArrayList(source); list.Reverse(); - return list; + return list; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/Processors/SortProcessor.cs b/src/Spring/Spring.Core/Expressions/Processors/SortProcessor.cs index f9b99587..b6602360 100644 --- a/src/Spring/Spring.Core/Expressions/Processors/SortProcessor.cs +++ b/src/Spring/Spring.Core/Expressions/Processors/SortProcessor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Collections; using Spring.Collections; -#endregion - namespace Spring.Expressions.Processors { /// @@ -55,7 +50,7 @@ namespace Spring.Expressions.Processors /// An array containing sorted collection elements. /// /// - /// If collection is not empty and it is + /// If collection is not empty and it is /// neither nor . /// public object Process(ICollection source, object[] args) diff --git a/src/Spring/Spring.Core/Expressions/Processors/SumAggregator.cs b/src/Spring/Spring.Core/Expressions/Processors/SumAggregator.cs index 2414a81d..8b0877d1 100644 --- a/src/Spring/Spring.Core/Expressions/Processors/SumAggregator.cs +++ b/src/Spring/Spring.Core/Expressions/Processors/SumAggregator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using Spring.Util; @@ -59,7 +58,7 @@ namespace Spring.Expressions.Processors } } } - + return total; } } diff --git a/src/Spring/Spring.Core/Expressions/ProjectionNode.cs b/src/Spring/Spring.Core/Expressions/ProjectionNode.cs index 20141cb5..9c5a9378 100644 --- a/src/Spring/Spring.Core/Expressions/ProjectionNode.cs +++ b/src/Spring/Spring.Core/Expressions/ProjectionNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a containing results of evaluation /// of projection expression against each node in the context. @@ -75,4 +74,4 @@ namespace Spring.Expressions return projectedList; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/PropertyOrFieldNode.cs b/src/Spring/Spring.Core/Expressions/PropertyOrFieldNode.cs index 0993cf84..6143a3d2 100644 --- a/src/Spring/Spring.Core/Expressions/PropertyOrFieldNode.cs +++ b/src/Spring/Spring.Core/Expressions/PropertyOrFieldNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,11 +18,7 @@ #endregion -#region Imports - -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Remoting; @@ -35,8 +31,6 @@ using Spring.Core.TypeResolution; using Spring.Util; using Spring.Reflection.Dynamic; -#endregion - namespace Spring.Expressions { /// @@ -168,7 +162,7 @@ namespace Spring.Expressions /// Binding flags to use. /// /// - /// Resolved property or field accessor, or null + /// Resolved property or field accessor, or null /// if specified cannot be resolved. /// private static IValueAccessor GetPropertyOrFieldAccessor(Type contextType, string memberName, BindingFlags bindingFlags) @@ -813,4 +807,4 @@ namespace Spring.Expressions #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/QualifiedIdentifier.cs b/src/Spring/Spring.Core/Expressions/QualifiedIdentifier.cs index f2d02a1f..e5592f14 100644 --- a/src/Spring/Spring.Core/Expressions/QualifiedIdentifier.cs +++ b/src/Spring/Spring.Core/Expressions/QualifiedIdentifier.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Expressions.Parser.antlr.collections; @@ -72,7 +71,7 @@ namespace Spring.Expressions } /// - /// Overrides getText to allow easy way to get fully + /// Overrides getText to allow easy way to get fully /// qualified identifier. /// /// @@ -94,4 +93,4 @@ namespace Spring.Expressions return tmp; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/RealLiteralNode.cs b/src/Spring/Spring.Core/Expressions/RealLiteralNode.cs index 3335a62f..2a9835a7 100644 --- a/src/Spring/Spring.Core/Expressions/RealLiteralNode.cs +++ b/src/Spring/Spring.Core/Expressions/RealLiteralNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Globalization; using System.Runtime.Serialization; @@ -47,7 +46,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the real literal node. /// @@ -91,4 +90,4 @@ namespace Spring.Expressions return nodeValue; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/ReferenceNode.cs b/src/Spring/Spring.Core/Expressions/ReferenceNode.cs index 9bc3788a..b28369eb 100644 --- a/src/Spring/Spring.Core/Expressions/ReferenceNode.cs +++ b/src/Spring/Spring.Core/Expressions/ReferenceNode.cs @@ -20,7 +20,6 @@ using Spring.Expressions; using Spring.Objects.Factory; -using System; using System.Runtime.Serialization; namespace Spring.Context.Support diff --git a/src/Spring/Spring.Core/Expressions/SelectionFirstNode.cs b/src/Spring/Spring.Core/Expressions/SelectionFirstNode.cs index fdeb273f..eb73ca6d 100644 --- a/src/Spring/Spring.Core/Expressions/SelectionFirstNode.cs +++ b/src/Spring/Spring.Core/Expressions/SelectionFirstNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns the first context item that matches selection expression. /// @@ -77,4 +76,4 @@ namespace Spring.Expressions return null; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/SelectionLastNode.cs b/src/Spring/Spring.Core/Expressions/SelectionLastNode.cs index ad7b09f3..d1439059 100644 --- a/src/Spring/Spring.Core/Expressions/SelectionLastNode.cs +++ b/src/Spring/Spring.Core/Expressions/SelectionLastNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; @@ -45,7 +44,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns the last context item that matches selection expression. /// @@ -79,4 +78,4 @@ namespace Spring.Expressions return null; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/SelectionNode.cs b/src/Spring/Spring.Core/Expressions/SelectionNode.cs index 532e49f6..ad447ada 100644 --- a/src/Spring/Spring.Core/Expressions/SelectionNode.cs +++ b/src/Spring/Spring.Core/Expressions/SelectionNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Runtime.Serialization; @@ -101,4 +100,4 @@ namespace Spring.Expressions return selectionList; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/SpringAST.cs b/src/Spring/Spring.Core/Expressions/SpringAST.cs index c83f2d5a..07886b15 100644 --- a/src/Spring/Spring.Core/Expressions/SpringAST.cs +++ b/src/Spring/Spring.Core/Expressions/SpringAST.cs @@ -1,4 +1,3 @@ -using System; using System.Runtime.Serialization; using Spring.Expressions.Parser.antlr; using Spring.Expressions.Parser.antlr.collections; @@ -12,7 +11,7 @@ namespace Spring.Expressions /// This class is only required to enable serialization of parsed Spring expressions since antlr.CommonAST /// unfortunately is not marked as [Serializable].
///
- /// Note:Since SpringAST implements , deriving classes + /// Note:Since SpringAST implements , deriving classes /// have to explicitely override if they need to persist additional /// data during serialization. /// @@ -146,7 +145,7 @@ namespace Spring.Expressions info.AddValue("ttype", this.Type, typeof(int)); info.AddValue("text", this.Text, typeof(string)); } - + #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/StringLiteralNode.cs b/src/Spring/Spring.Core/Expressions/StringLiteralNode.cs index 760b4038..b4d4405f 100644 --- a/src/Spring/Spring.Core/Expressions/StringLiteralNode.cs +++ b/src/Spring/Spring.Core/Expressions/StringLiteralNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Expressions @@ -64,4 +63,4 @@ namespace Spring.Expressions return this.getText(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/SyntaxErrorException.cs b/src/Spring/Spring.Core/Expressions/SyntaxErrorException.cs index 99a3bde9..d0940121 100644 --- a/src/Spring/Spring.Core/Expressions/SyntaxErrorException.cs +++ b/src/Spring/Spring.Core/Expressions/SyntaxErrorException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Expressions.Parser.antlr; @@ -92,14 +91,14 @@ namespace Spring.Expressions } /// - /// + /// /// /// /// public override void GetObjectData( SerializationInfo info, StreamingContext context ) { // since RecognitionException does not implement .ctor(SerializationInfo info, StreamingContext context) - // we need to do the serialization on our own... #§$% + // we need to do the serialization on our own... #�$% //base.GetObjectData( info, context ); info.AddValue("Line", base.line); info.AddValue("Column", base.column); @@ -109,4 +108,4 @@ namespace Spring.Expressions #endregion Protected Instance Constructors } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/TernaryNode.cs b/src/Spring/Spring.Core/Expressions/TernaryNode.cs index 966c16a9..1aee663f 100644 --- a/src/Spring/Spring.Core/Expressions/TernaryNode.cs +++ b/src/Spring/Spring.Core/Expressions/TernaryNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Expressions.Parser.antlr.collections; @@ -50,7 +49,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns a value for the string literal node. /// @@ -87,4 +86,4 @@ namespace Spring.Expressions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/TypeNode.cs b/src/Spring/Spring.Core/Expressions/TypeNode.cs index 7a621e2c..4be566d5 100644 --- a/src/Spring/Spring.Core/Expressions/TypeNode.cs +++ b/src/Spring/Spring.Core/Expressions/TypeNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Core.TypeResolution; using Spring.Expressions.Parser.antlr.collections; @@ -70,7 +69,7 @@ namespace Spring.Expressions } /// - /// Overrides getText to allow easy way to get fully + /// Overrides getText to allow easy way to get fully /// qualified typename. /// /// @@ -85,7 +84,7 @@ namespace Spring.Expressions // if (type != null) // { // tmp = type.AssemblyQualifiedName; -// } +// } // } AST node = this.getFirstChild(); while (node != null) @@ -96,4 +95,4 @@ namespace Spring.Expressions return tmp; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Expressions/VariableNode.cs b/src/Spring/Spring.Core/Expressions/VariableNode.cs index 822f7065..8583aaba 100644 --- a/src/Spring/Spring.Core/Expressions/VariableNode.cs +++ b/src/Spring/Spring.Core/Expressions/VariableNode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Expressions @@ -44,7 +43,7 @@ namespace Spring.Expressions : base(info, context) { } - + /// /// Returns value of the variable represented by this node. /// @@ -86,4 +85,4 @@ namespace Spring.Expressions evalContext.Variables[varName] = newValue; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Globalization/AbstractLocalizer.cs b/src/Spring/Spring.Core/Globalization/AbstractLocalizer.cs index 75b27c9b..f1caa7b7 100644 --- a/src/Spring/Spring.Core/Globalization/AbstractLocalizer.cs +++ b/src/Spring/Spring.Core/Globalization/AbstractLocalizer.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using System.Globalization; using System.Threading; @@ -37,7 +36,7 @@ namespace Spring.Globalization /// interface. ///

///

- /// All specific localizers need to do is inherit this class and implement + /// All specific localizers need to do is inherit this class and implement /// GetResources method that will return a list of /// objects that should be applied to a specified target. ///

@@ -120,4 +119,4 @@ namespace Spring.Globalization protected abstract IList LoadResources(object target, IMessageSource messageSource, CultureInfo culture); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Globalization/AbstractResourceCache.cs b/src/Spring/Spring.Core/Globalization/AbstractResourceCache.cs index 7ed111ef..b6ee250e 100644 --- a/src/Spring/Spring.Core/Globalization/AbstractResourceCache.cs +++ b/src/Spring/Spring.Core/Globalization/AbstractResourceCache.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using System.Globalization; namespace Spring.Globalization @@ -78,4 +77,4 @@ namespace Spring.Globalization protected abstract void PutResources(string cacheKey, IList resources); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Globalization/Formatters/BooleanFormatter.cs b/src/Spring/Spring.Core/Globalization/Formatters/BooleanFormatter.cs index dc629d43..3a0f70b5 100644 --- a/src/Spring/Spring.Core/Globalization/Formatters/BooleanFormatter.cs +++ b/src/Spring/Spring.Core/Globalization/Formatters/BooleanFormatter.cs @@ -18,8 +18,6 @@ #endregion -using System; - using Spring.Util; namespace Spring.Globalization.Formatters diff --git a/src/Spring/Spring.Core/Globalization/Formatters/CurrencyFormatter.cs b/src/Spring/Spring.Core/Globalization/Formatters/CurrencyFormatter.cs index b42d494d..891a59bf 100644 --- a/src/Spring/Spring.Core/Globalization/Formatters/CurrencyFormatter.cs +++ b/src/Spring/Spring.Core/Globalization/Formatters/CurrencyFormatter.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Globalization; using Spring.Util; @@ -32,7 +31,7 @@ namespace Spring.Globalization.Formatters /// /// /// CurrencyFormatter uses currency related properties of the - /// to format and parse currency values. + /// to format and parse currency values. /// /// /// If you use one of the constructors that accept culture as a parameter @@ -81,7 +80,7 @@ namespace Spring.Globalization.Formatters /// using specified . ///
/// - /// The instance that defines how + /// The instance that defines how /// currency values are formatted. /// public CurrencyFormatter(NumberFormatInfo formatInfo) diff --git a/src/Spring/Spring.Core/Globalization/Formatters/DateTimeFormatter.cs b/src/Spring/Spring.Core/Globalization/Formatters/DateTimeFormatter.cs index 9e39f2cd..f2c1a6bc 100644 --- a/src/Spring/Spring.Core/Globalization/Formatters/DateTimeFormatter.cs +++ b/src/Spring/Spring.Core/Globalization/Formatters/DateTimeFormatter.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Globalization; using Spring.Util; @@ -32,7 +31,7 @@ namespace Spring.Globalization.Formatters /// /// /// DateTimeFormatter uses properties of the - /// to format and parse values. + /// to format and parse values. /// /// /// If you use one of the constructors that accept culture as a parameter diff --git a/src/Spring/Spring.Core/Globalization/Formatters/FilteringFormatter.cs b/src/Spring/Spring.Core/Globalization/Formatters/FilteringFormatter.cs index d42a6a58..bd7aca08 100644 --- a/src/Spring/Spring.Core/Globalization/Formatters/FilteringFormatter.cs +++ b/src/Spring/Spring.Core/Globalization/Formatters/FilteringFormatter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -16,12 +16,6 @@ * limitations under the License. */ -#endregion - -#region Imports - - - #endregion namespace Spring.Globalization.Formatters @@ -39,7 +33,7 @@ namespace Spring.Globalization.Formatters ///
///an optional underlying formatter /// - /// If no underlying formatter is specified, the values + /// If no underlying formatter is specified, the values /// get passed through "as-is" after being filtered /// public FilteringFormatter(IFormatter underlyingFormatter) @@ -97,4 +91,4 @@ namespace Spring.Globalization.Formatters return value; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Globalization/Formatters/FloatFormatter.cs b/src/Spring/Spring.Core/Globalization/Formatters/FloatFormatter.cs index 29d352bd..b9d20d8d 100644 --- a/src/Spring/Spring.Core/Globalization/Formatters/FloatFormatter.cs +++ b/src/Spring/Spring.Core/Globalization/Formatters/FloatFormatter.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Globalization; using Spring.Util; @@ -31,8 +30,8 @@ namespace Spring.Globalization.Formatters ///
/// /// - /// This formatter allows you to format and parse numbers that conform - /// to number style (leading and trailing + /// This formatter allows you to format and parse numbers that conform + /// to number style (leading and trailing /// white space, leading sign, decimal point, exponent). /// /// diff --git a/src/Spring/Spring.Core/Globalization/Formatters/HasTextFilteringFormatter.cs b/src/Spring/Spring.Core/Globalization/Formatters/HasTextFilteringFormatter.cs index 3e5eaa75..8334af24 100644 --- a/src/Spring/Spring.Core/Globalization/Formatters/HasTextFilteringFormatter.cs +++ b/src/Spring/Spring.Core/Globalization/Formatters/HasTextFilteringFormatter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,16 +18,12 @@ #endregion -#region Imports - using Spring.Util; -#endregion - namespace Spring.Globalization.Formatters { /// - /// Replaces input strings with a given default value, + /// Replaces input strings with a given default value, /// if they are null or contain whitespaces only, /// /// Erich Eichinger @@ -40,10 +36,10 @@ namespace Spring.Globalization.Formatters ///
///an optional underlying formatter /// - /// If no underlying formatter is specified, the values + /// If no underlying formatter is specified, the values /// get passed through "as-is" after being filtered /// - public HasTextFilteringFormatter(IFormatter underlyingFormatter) + public HasTextFilteringFormatter(IFormatter underlyingFormatter) : this(null, underlyingFormatter) { } @@ -54,7 +50,7 @@ namespace Spring.Globalization.Formatters /// the default value to be returned, if input text doesn't contain text ///an optional underlying formatter /// - /// If no underlying formatter is specified, the values + /// If no underlying formatter is specified, the values /// get passed through "as-is" after being filtered /// public HasTextFilteringFormatter(string defaultValue, IFormatter underlyingFormatter) @@ -75,4 +71,4 @@ namespace Spring.Globalization.Formatters return value; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Globalization/Formatters/IntegerFormatter.cs b/src/Spring/Spring.Core/Globalization/Formatters/IntegerFormatter.cs index 904614b7..f04fdac7 100644 --- a/src/Spring/Spring.Core/Globalization/Formatters/IntegerFormatter.cs +++ b/src/Spring/Spring.Core/Globalization/Formatters/IntegerFormatter.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Globalization; using Spring.Util; @@ -31,8 +30,8 @@ namespace Spring.Globalization.Formatters ///
/// /// - /// This formatter allows you to format and parse numbers that conform - /// to number style (leading and trailing + /// This formatter allows you to format and parse numbers that conform + /// to number style (leading and trailing /// white space, leading sign). /// /// diff --git a/src/Spring/Spring.Core/Globalization/Formatters/NullFormatter.cs b/src/Spring/Spring.Core/Globalization/Formatters/NullFormatter.cs index a6eba3ec..dfc7a627 100644 --- a/src/Spring/Spring.Core/Globalization/Formatters/NullFormatter.cs +++ b/src/Spring/Spring.Core/Globalization/Formatters/NullFormatter.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Globalization.Formatters { /// @@ -62,4 +60,4 @@ namespace Spring.Globalization.Formatters return value; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Globalization/Formatters/NumberFormatter.cs b/src/Spring/Spring.Core/Globalization/Formatters/NumberFormatter.cs index 84bb0aba..41db6b78 100644 --- a/src/Spring/Spring.Core/Globalization/Formatters/NumberFormatter.cs +++ b/src/Spring/Spring.Core/Globalization/Formatters/NumberFormatter.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Globalization; using Spring.Util; @@ -32,7 +31,7 @@ namespace Spring.Globalization.Formatters /// /// /// NumberFormatter uses number-related properties of the - /// to format and parse numbers. + /// to format and parse numbers. /// /// /// This formatter works with both integer and decimal numbers and allows @@ -87,7 +86,7 @@ namespace Spring.Globalization.Formatters /// using specified . /// /// - /// The instance that defines how + /// The instance that defines how /// numbers are formatted and parsed. /// public NumberFormatter(NumberFormatInfo formatInfo) diff --git a/src/Spring/Spring.Core/Globalization/Formatters/PercentFormatter.cs b/src/Spring/Spring.Core/Globalization/Formatters/PercentFormatter.cs index b6f29f64..782d8174 100644 --- a/src/Spring/Spring.Core/Globalization/Formatters/PercentFormatter.cs +++ b/src/Spring/Spring.Core/Globalization/Formatters/PercentFormatter.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Globalization; using Spring.Util; @@ -32,7 +31,7 @@ namespace Spring.Globalization.Formatters /// /// /// PercentFormatter uses percent-related properties of the - /// to format and parse percentages. + /// to format and parse percentages. /// /// /// If you use one of the constructors that accept culture as a parameter @@ -84,7 +83,7 @@ namespace Spring.Globalization.Formatters /// using specified . ///
/// - /// The instance that defines how + /// The instance that defines how /// numbers are formatted and parsed. /// public PercentFormatter(NumberFormatInfo formatInfo) diff --git a/src/Spring/Spring.Core/Globalization/ICultureResolver.cs b/src/Spring/Spring.Core/Globalization/ICultureResolver.cs index 9300639a..59de3dc8 100644 --- a/src/Spring/Spring.Core/Globalization/ICultureResolver.cs +++ b/src/Spring/Spring.Core/Globalization/ICultureResolver.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,8 @@ #endregion -#region Imports - using System.Globalization; -#endregion - namespace Spring.Globalization { /// @@ -67,4 +63,4 @@ namespace Spring.Globalization /// void SetCulture(CultureInfo culture); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Globalization/IResourceCache.cs b/src/Spring/Spring.Core/Globalization/IResourceCache.cs index 25ae867f..80f36d32 100644 --- a/src/Spring/Spring.Core/Globalization/IResourceCache.cs +++ b/src/Spring/Spring.Core/Globalization/IResourceCache.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using System.Globalization; namespace Spring.Globalization @@ -46,4 +45,4 @@ namespace Spring.Globalization /// A list of cached resources for the specified target object and culture. void PutResources(object target, CultureInfo culture, IList resources); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Globalization/Localizers/ResourceSetLocalizer.cs b/src/Spring/Spring.Core/Globalization/Localizers/ResourceSetLocalizer.cs index 66385249..265476dc 100644 --- a/src/Spring/Spring.Core/Globalization/Localizers/ResourceSetLocalizer.cs +++ b/src/Spring/Spring.Core/Globalization/Localizers/ResourceSetLocalizer.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.Resources; using Common.Logging; @@ -35,11 +33,11 @@ namespace Spring.Globalization.Localizers /// /// ///

- /// This implementation will iterate over all resource managers + /// This implementation will iterate over all resource managers /// within the message source and return a list of all the resources whose name starts with '$this'. ///

///

- /// All other resources will be ignored, but you can retrieve them by calling one of + /// All other resources will be ignored, but you can retrieve them by calling one of /// GetMessage methods on the message source directly. ///

///
@@ -103,4 +101,4 @@ namespace Spring.Globalization.Localizers return resources; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Globalization/NullResourceCache.cs b/src/Spring/Spring.Core/Globalization/NullResourceCache.cs index e2daeff4..cd5fad4b 100644 --- a/src/Spring/Spring.Core/Globalization/NullResourceCache.cs +++ b/src/Spring/Spring.Core/Globalization/NullResourceCache.cs @@ -18,8 +18,6 @@ #endregion -using System.Collections.Generic; - namespace Spring.Globalization { /// @@ -46,4 +44,4 @@ namespace Spring.Globalization protected override void PutResources(string cacheKey, IList resources) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Globalization/Resolvers/DefaultCultureResolver.cs b/src/Spring/Spring.Core/Globalization/Resolvers/DefaultCultureResolver.cs index c3eacdd1..ee4c73bc 100644 --- a/src/Spring/Spring.Core/Globalization/Resolvers/DefaultCultureResolver.cs +++ b/src/Spring/Spring.Core/Globalization/Resolvers/DefaultCultureResolver.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,9 @@ #endregion -#region Imports - using System.Globalization; using System.Threading; -#endregion - namespace Spring.Globalization.Resolvers { /// @@ -54,7 +50,7 @@ namespace Spring.Globalization.Resolvers } /// - /// Returns the default . + /// Returns the default . /// /// ///

@@ -119,4 +115,4 @@ namespace Spring.Globalization.Resolvers defaultCulture = culture; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Globalization/Resource.cs b/src/Spring/Spring.Core/Globalization/Resource.cs index f29be428..8990d5a4 100644 --- a/src/Spring/Spring.Core/Globalization/Resource.cs +++ b/src/Spring/Spring.Core/Globalization/Resource.cs @@ -18,14 +18,12 @@ #endregion -using System; - using Spring.Expressions; namespace Spring.Globalization { ///

- /// Holds mapping between control property and it's value + /// Holds mapping between control property and it's value /// as read from the resource file. /// /// Aleksandar Seovic diff --git a/src/Spring/Spring.Core/Objects/Events/IEventRegistry.cs b/src/Spring/Spring.Core/Objects/Events/IEventRegistry.cs index bd6936e3..2c280836 100644 --- a/src/Spring/Spring.Core/Objects/Events/IEventRegistry.cs +++ b/src/Spring/Spring.Core/Objects/Events/IEventRegistry.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects.Events { /// @@ -73,4 +71,4 @@ namespace Spring.Objects.Events /// void Unsubscribe(object subscriber, Type targetSourceType); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Events/IEventRegistryAware.cs b/src/Spring/Spring.Core/Objects/Events/IEventRegistryAware.cs index 827509a1..77f59246 100644 --- a/src/Spring/Spring.Core/Objects/Events/IEventRegistryAware.cs +++ b/src/Spring/Spring.Core/Objects/Events/IEventRegistryAware.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -16,12 +16,6 @@ * limitations under the License. */ -#endregion - -#region Imports - - - #endregion namespace Spring.Objects.Events @@ -60,4 +54,4 @@ namespace Spring.Objects.Events /// IEventRegistry EventRegistry { set; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Events/Support/EventManipulationUtils.cs b/src/Spring/Spring.Core/Objects/Events/Support/EventManipulationUtils.cs index 81347972..097ef6b0 100644 --- a/src/Spring/Spring.Core/Objects/Events/Support/EventManipulationUtils.cs +++ b/src/Spring/Spring.Core/Objects/Events/Support/EventManipulationUtils.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Reflection; using Spring.Core; using Spring.Util; -#endregion - namespace Spring.Objects.Events.Support { /// @@ -117,4 +112,4 @@ namespace Spring.Objects.Events.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Events/Support/EventRegistry.cs b/src/Spring/Spring.Core/Objects/Events/Support/EventRegistry.cs index 02720f23..81df4067 100644 --- a/src/Spring/Spring.Core/Objects/Events/Support/EventRegistry.cs +++ b/src/Spring/Spring.Core/Objects/Events/Support/EventRegistry.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,8 @@ #endregion -#region Imports - -using System; -using System.Collections.Generic; using System.Reflection; -#endregion - namespace Spring.Objects.Events.Support { /// @@ -162,4 +156,4 @@ namespace Spring.Objects.Events.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Attributes/AutowiredAttribute.cs b/src/Spring/Spring.Core/Objects/Factory/Attributes/AutowiredAttribute.cs index 9be3154a..bd395fce 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Attributes/AutowiredAttribute.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Attributes/AutowiredAttribute.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects.Factory.Attributes { /// diff --git a/src/Spring/Spring.Core/Objects/Factory/Attributes/AutowiredAttributeObjectPostProcessor.cs b/src/Spring/Spring.Core/Objects/Factory/Attributes/AutowiredAttributeObjectPostProcessor.cs index 38a38ab9..34a22a8e 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Attributes/AutowiredAttributeObjectPostProcessor.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Attributes/AutowiredAttributeObjectPostProcessor.cs @@ -18,12 +18,7 @@ #endregion -using System; -using System.Collections; -using System.Collections.Generic; using System.Reflection; -using System.Linq; - using Spring.Collections; using Spring.Core; using Spring.Objects.Factory.Config; @@ -40,25 +35,25 @@ namespace Spring.Objects.Factory.Attributes /// that autowires annotated fields, properties and arbitrary config methods. /// Such members to be injected are detected through an attribute: by default, /// Spring's . - /// + /// /// Only one constructor (at max) of any given bean class may carry this - /// annotation with the 'required' parameter set to true, - /// indicating the constructor to autowire when used as a Spring bean. - /// If multiple non-required constructors carry the annotation, they - /// will be considered as candidates for autowiring. The constructor with + /// annotation with the 'required' parameter set to true, + /// indicating the constructor to autowire when used as a Spring bean. + /// If multiple non-required constructors carry the annotation, they + /// will be considered as candidates for autowiring. The constructor with /// the greatest number of dependencies that can be satisfied by matching /// beans in the Spring container will be chosen. If none of the candidates /// can be satisfied, then a default constructor (if present) will be used. /// An annotated constructor does not have to be public. - /// + /// /// Fields are injected right after construction of a bean, before any /// config methods are invoked. Such a config field does not have to be public. - /// + /// /// Config methods may have an arbitrary name and any number of arguments; each of /// those arguments will be autowired with a matching bean in the Spring container. /// Bean property setter methods are effectively just a special case of such a /// general config method. Config methods do not have to be public. - /// + /// /// Note: A default AutowiredAttributeObjectPostProcessor will be registered /// by the "context:annotation-config" and "context:component-scan" XML tags. /// Remove or turn off the default annotation configuration there if you intend @@ -120,7 +115,7 @@ namespace Spring.Objects.Factory.Attributes { set => objectFactory = (IConfigurableListableObjectFactory) value; } - + public void PostProcessMergedObjectDefinition(RootObjectDefinition objectDefinition, Type objectType, string objectName) { var metadata = FindAutowiringMetadata(objectName, objectType, null); @@ -146,7 +141,7 @@ namespace Spring.Objects.Factory.Attributes /// /// Create a new instance of an Autowire Post Processor - /// with standard attributes of + /// with standard attributes of /// and /// public AutowiredAttributeObjectPostProcessor() @@ -164,7 +159,7 @@ namespace Spring.Objects.Factory.Attributes /// in case of errors public override ConstructorInfo[] DetermineCandidateConstructors(Type objectType, string objectName) { - /* TODO implement Lookup + /* TODO implement Lookup // Let's check for lookup methods here.. if (!lookupMethodsChecked.Contains(objectName)) { @@ -197,7 +192,7 @@ namespace Spring.Objects.Factory.Attributes lookupMethodsChecked.Add(objectName); }*/ - + // Quick check on the concurrent map first, with minimal locking. ConstructorInfo[] candidateConstructors = candidateConstructorsCache.ContainsKey(objectType) ? (ConstructorInfo[]) candidateConstructorsCache[objectType] @@ -304,7 +299,7 @@ namespace Spring.Objects.Factory.Attributes /// /// /// Name of the object. - /// The actual property values to apply to the given object (can be the + /// The actual property values to apply to the given object (can be the /// passed-in PropertyValues instances0 or null to skip property population. public override IPropertyValues PostProcessPropertyValues(IPropertyValues pvs, IList pis, object objectInstance, string objectName) @@ -331,7 +326,7 @@ namespace Spring.Objects.Factory.Attributes { lock (injectionMetadataCache) { - if (!injectionMetadataCache.TryGetValue(cacheKey, out metadata) + if (!injectionMetadataCache.TryGetValue(cacheKey, out metadata) || InjectionMetadata.NeedsRefresh(metadata, objectType)) { metadata = BuildAutowiringMetadata(objectType); @@ -718,4 +713,4 @@ namespace Spring.Objects.Factory.Attributes } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Attributes/InitDestroyAttributeObjectPostProcessor.cs b/src/Spring/Spring.Core/Objects/Factory/Attributes/InitDestroyAttributeObjectPostProcessor.cs index deecbcc2..2338861c 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Attributes/InitDestroyAttributeObjectPostProcessor.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Attributes/InitDestroyAttributeObjectPostProcessor.cs @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections.Generic; -using System.Linq; using System.Reflection; using Common.Logging; @@ -313,4 +310,4 @@ namespace Spring.Objects.Factory.Attributes } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Attributes/InjectionMetadata.cs b/src/Spring/Spring.Core/Objects/Factory/Attributes/InjectionMetadata.cs index c91f3654..67d6a580 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Attributes/InjectionMetadata.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Attributes/InjectionMetadata.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Reflection; using Common.Logging; using Spring.Objects.Factory.Support; diff --git a/src/Spring/Spring.Core/Objects/Factory/Attributes/PostConstructAttribute.cs b/src/Spring/Spring.Core/Objects/Factory/Attributes/PostConstructAttribute.cs index 16cf0dd6..5d154bdb 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Attributes/PostConstructAttribute.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Attributes/PostConstructAttribute.cs @@ -18,9 +18,6 @@ #endregion - -using System; - namespace Spring.Objects.Factory.Attributes { /// @@ -53,10 +50,10 @@ namespace Spring.Objects.Factory.Attributes /// /// Defined the order in which the PostContruct methods are called /// - public int Order - { + public int Order + { get { return _order; } - set { _order = value; } + set { _order = value; } } } } diff --git a/src/Spring/Spring.Core/Objects/Factory/Attributes/PreDestroyAttribute.cs b/src/Spring/Spring.Core/Objects/Factory/Attributes/PreDestroyAttribute.cs index 78e52fb7..e10a15b2 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Attributes/PreDestroyAttribute.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Attributes/PreDestroyAttribute.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects.Factory.Attributes { /// @@ -52,10 +50,10 @@ namespace Spring.Objects.Factory.Attributes /// /// Defined the order in which the PreDestroy methods are called /// - public int Order - { + public int Order + { get { return _order; } - set { _order = value; } + set { _order = value; } } } } diff --git a/src/Spring/Spring.Core/Objects/Factory/Attributes/QualifierAnnotationAutowireCandidateResolver.cs b/src/Spring/Spring.Core/Objects/Factory/Attributes/QualifierAnnotationAutowireCandidateResolver.cs index ae036f04..3bfe2196 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Attributes/QualifierAnnotationAutowireCandidateResolver.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Attributes/QualifierAnnotationAutowireCandidateResolver.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Runtime.Serialization; using Spring.Core; @@ -87,7 +85,7 @@ namespace Spring.Objects.Factory.Attributes _qualifierTypes.Add(type); } } - + protected QualifierAnnotationAutowireCandidateResolver(SerializationInfo info, StreamingContext context) { _objectFactory = (IObjectFactory) info.GetValue("objectFactory", typeof(IObjectFactory)); @@ -358,4 +356,4 @@ namespace Spring.Objects.Factory.Attributes return null; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Attributes/QualifierAttribute.cs b/src/Spring/Spring.Core/Objects/Factory/Attributes/QualifierAttribute.cs index 4b8453de..1fd35836 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Attributes/QualifierAttribute.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Attributes/QualifierAttribute.cs @@ -1,6 +1,4 @@ -using System; - -namespace Spring.Objects.Factory.Attributes +namespace Spring.Objects.Factory.Attributes { /// /// This annotation may be used on a field or parameter as a qualifier for diff --git a/src/Spring/Spring.Core/Objects/Factory/Attributes/RequiredAttribute.cs b/src/Spring/Spring.Core/Objects/Factory/Attributes/RequiredAttribute.cs index 3ff99188..8d58f19a 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Attributes/RequiredAttribute.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Attributes/RequiredAttribute.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,22 +18,20 @@ #endregion -using System; - namespace Spring.Objects.Factory.Attributes { /// - /// Marks a property as being 'required': that is, the setter property + /// Marks a property as being 'required': that is, the setter property /// must be configured to be dependency-injected with a value. /// - /// Consult the SDK documentation for , + /// Consult the SDK documentation for , /// which, by default, checks for the presence of this annotation. /// /// Rob Harrop /// Mark Pollack - [AttributeUsage(AttributeTargets.Property, Inherited = true)] + [AttributeUsage(AttributeTargets.Property, Inherited = true)] public class RequiredAttribute : Attribute { - + } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Attributes/RequiredAttributeObjectPostProcessor.cs b/src/Spring/Spring.Core/Objects/Factory/Attributes/RequiredAttributeObjectPostProcessor.cs index 2f822123..a9fd15dc 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Attributes/RequiredAttributeObjectPostProcessor.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Attributes/RequiredAttributeObjectPostProcessor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion - -using System; -using System.Collections.Generic; using System.Reflection; using System.Text; @@ -68,12 +65,12 @@ namespace Spring.Objects.Factory.Attributes /// /// /// The default required attribute type is the Spring-provided attribute. - /// This setter property exists so that developers can provide their own + /// This setter property exists so that developers can provide their own /// (non-Spring-specific) annotation type to indicate that a property value is required. /// /// The type of the required attribute. public Type RequiredAttributeType - { + { set { AssertUtils.ArgumentNotNull(value, "RequiredAttributeType", "RequiredAttributeType property must not be null"); @@ -179,4 +176,4 @@ namespace Spring.Objects.Factory.Attributes } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Attributes/ValueAttribute.cs b/src/Spring/Spring.Core/Objects/Factory/Attributes/ValueAttribute.cs index 62155b4c..5ca21b73 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Attributes/ValueAttribute.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Attributes/ValueAttribute.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects.Factory.Attributes { [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)] diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/AbstractConfigurer.cs b/src/Spring/Spring.Core/Objects/Factory/Config/AbstractConfigurer.cs index 4e00537e..b04239bf 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/AbstractConfigurer.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/AbstractConfigurer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - using Spring.Core; using Spring.Core.TypeResolution; @@ -119,4 +117,4 @@ namespace Spring.Objects.Factory.Config return requiredType; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/AbstractFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/AbstractFactoryObject.cs index fa8ff45b..d4b584ec 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/AbstractFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/AbstractFactoryObject.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,12 +18,6 @@ #endregion -#region Imports - -using System; - -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -32,7 +26,7 @@ namespace Spring.Objects.Factory.Config /// instance (depending on a flag). /// /// - /// If the value of the + /// If the value of the /// /// property is (this is the default), this class /// will create a single instance of it's object upon initialization and diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/AutoWiringMode.cs b/src/Spring/Spring.Core/Objects/Factory/Config/AutoWiringMode.cs index 370e4be2..6c6a561c 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/AutoWiringMode.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/AutoWiringMode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects.Factory.Config { @@ -28,7 +26,7 @@ namespace Spring.Objects.Factory.Config /// /// Rick Evans [Serializable] - public enum AutoWiringMode + public enum AutoWiringMode { /// /// Do not autowire. diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/CommandLineArgsVariableSource.cs b/src/Spring/Spring.Core/Objects/Factory/Config/CommandLineArgsVariableSource.cs index 8065aa6c..70f8d04e 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/CommandLineArgsVariableSource.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/CommandLineArgsVariableSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections.Generic; - namespace Spring.Objects.Factory.Config { /// @@ -148,4 +145,4 @@ namespace Spring.Objects.Factory.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ConfigSectionVariableSource.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ConfigSectionVariableSource.cs index 443b6345..3c0e8a36 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ConfigSectionVariableSource.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ConfigSectionVariableSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections.Specialized; using System.Configuration; using Spring.Util; @@ -109,7 +108,7 @@ namespace Spring.Objects.Factory.Config InitVariables(); } return CollectionUtils.Contains(variables.AllKeys, name); - } + } } /// @@ -131,15 +130,15 @@ namespace Spring.Objects.Factory.Config InitVariables(); } return variables.Get(name); - } + } } /// - /// Initializes properties based on the specified + /// Initializes properties based on the specified /// property file locations. /// protected virtual void InitVariables() - { + { foreach (string sectionName in sectionNames) { object section = ConfigurationUtils.GetSection(sectionName); @@ -163,4 +162,4 @@ namespace Spring.Objects.Factory.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ConfigurableVariableSource.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ConfigurableVariableSource.cs index 67cf129d..fdb4fcb6 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ConfigurableVariableSource.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ConfigurableVariableSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections.Specialized; namespace Spring.Objects.Factory.Config @@ -78,4 +77,4 @@ namespace Spring.Objects.Factory.Config return this._variables.Get(name); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ConfigurationReader.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ConfigurationReader.cs index 205663ff..cc50e8e6 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ConfigurationReader.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ConfigurationReader.cs @@ -18,12 +18,8 @@ #endregion -#region Imports - -using System; using System.Collections.Specialized; using System.Configuration; -using System.IO; using System.Reflection; using System.Runtime.InteropServices; using System.Xml; @@ -36,8 +32,6 @@ using Spring.Util; using ConfigurationException=Common.Logging.ConfigurationException; using ConfigXmlDocument = Spring.Util.ConfigXmlDocument; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -398,7 +392,7 @@ namespace Spring.Objects.Factory.Config foreach (XmlNode node in section.ChildNodes) { var settings = new ConnectionStringSettings( - node.Attributes["name"].Value, + node.Attributes["name"].Value, node.Attributes["connectionString"]?.Value, node.Attributes["providerName"]?.Value); data.ConnectionStrings.Add(settings); @@ -494,4 +488,4 @@ namespace Spring.Objects.Factory.Config #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ConnectionStringsVariableSource.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ConnectionStringsVariableSource.cs index 73deefd7..8d514f78 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ConnectionStringsVariableSource.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ConnectionStringsVariableSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Configuration; using Spring.Util; @@ -92,7 +90,7 @@ namespace Spring.Objects.Factory.Config } /// - /// Initializes properties based on the specified + /// Initializes properties based on the specified /// property file locations. /// private void InitVariables() diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ConstructorArgumentValues.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ConstructorArgumentValues.cs index b3926d31..6daae6e9 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ConstructorArgumentValues.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ConstructorArgumentValues.cs @@ -14,9 +14,7 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using Spring.Collections; using Spring.Util; @@ -40,16 +38,16 @@ namespace Spring.Objects.Factory.Config public class ConstructorArgumentValues { private static readonly CultureInfo enUSCultureInfo = new CultureInfo("en-US", false); - + private static readonly IReadOnlyDictionary _emptyIndexedArgumentValues = new Dictionary(); internal Dictionary _indexedArgumentValues = null; private static readonly IReadOnlyList _emptyGenericArgumentValues = new List(); internal List _genericArgumentValues = null; - + private static readonly IReadOnlyDictionary _emptyNamedArgumentValues = new Dictionary(); internal Dictionary _namedArgumentValues = null; - + /// /// Can be used as an argument filler for the /// @@ -492,7 +490,7 @@ namespace Spring.Objects.Factory.Config /// /// /// The name of the argument in the constructor argument list. May be - /// , in which case generic matching by + /// , in which case generic matching by /// is assumed. /// /// @@ -515,7 +513,7 @@ namespace Spring.Objects.Factory.Config /// /// /// The name of the argument in the constructor argument list. May be - /// , in which case generic matching by + /// , in which case generic matching by /// is assumed. /// /// @@ -575,7 +573,7 @@ namespace Spring.Objects.Factory.Config int index, string name, Type requiredType, ISet usedValues) { ValueHolder valueHolder = null; - if(index != NoIndex) + if(index != NoIndex) { valueHolder = GetIndexedArgumentValue(index, requiredType); } @@ -594,7 +592,7 @@ namespace Spring.Objects.Factory.Config { return argument != null ? argument.ToLower(enUSCultureInfo) : argument; } - + private Dictionary GetAndInitializeIndexedArgumentValuesIfNeeded() { return _indexedArgumentValues = _indexedArgumentValues ?? new Dictionary(); @@ -692,4 +690,4 @@ namespace Spring.Objects.Factory.Config public string Type => typeName; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/CustomConverterConfigurer.cs b/src/Spring/Spring.Core/Objects/Factory/Config/CustomConverterConfigurer.cs index 81b31dce..997b188c 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/CustomConverterConfigurer.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/CustomConverterConfigurer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Collections; using System.ComponentModel; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -117,26 +112,26 @@ namespace Spring.Objects.Factory.Config /// private string _userName; /// private string _password; /// private string _host; - /// + /// /// public string Host /// { /// get { return _host; } /// set { _host = value; } /// } - /// + /// /// public string UserName /// { /// get { return _userName; } /// set { _userName = value; } /// } - /// + /// /// public string Password /// { /// get { return _password; } /// set { _password = value; } /// } /// } - /// + /// /// public sealed class MailSettingsConverter : TypeConverter /// { /// public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) @@ -147,11 +142,11 @@ namespace Spring.Objects.Factory.Config /// } /// return base.CanConvertFrom(context, sourceType); /// } - /// + /// /// public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) /// { /// string text = value as string; - /// if(text != null) + /// if(text != null) /// { /// MailSettings mailSettings = new MailSettings(); /// string[] tokens = text.Split(','); @@ -167,21 +162,21 @@ namespace Spring.Objects.Factory.Config /// return base.ConvertFrom(context, culture, value); /// } /// } - /// + /// /// // a very naieve class that uses the MailSettings class... /// public sealed class ExceptionLogger /// { /// private MailSettings _mailSettings; - /// + /// /// public MailSettings MailSettings { /// { /// set { _mailSettings = value; } /// } - /// + /// /// public void Log(object value) /// { /// Exception ex = value as Exception; - /// if(ex != null) + /// if(ex != null) /// { /// // use _mailSettings instance... /// } @@ -298,4 +293,4 @@ namespace Spring.Objects.Factory.Config } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/DelegateFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/DelegateFactoryObject.cs index 40623529..b9f73780 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/DelegateFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/DelegateFactoryObject.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -48,7 +43,7 @@ namespace Spring.Objects.Factory.Config /// In the event of misconfiguration (such as failure to set an essential /// property) or if initialization fails. /// - /// + /// public override void AfterPropertiesSet() { if (DelegateType == null) @@ -86,7 +81,7 @@ namespace Spring.Objects.Factory.Config /// If an exception occured during object creation. /// /// The object returned by this factory. - /// + /// protected override object CreateInstance() { Delegate instance = null; @@ -175,4 +170,4 @@ namespace Spring.Objects.Factory.Config #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/DependencyDescriptor.cs b/src/Spring/Spring.Core/Objects/Factory/Config/DependencyDescriptor.cs index 305432ea..401596eb 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/DependencyDescriptor.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/DependencyDescriptor.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Core; using System.Reflection; @@ -170,8 +169,8 @@ namespace Spring.Objects.Factory.Config /// /// Gets the Attributes assigned to Field, Property or Paramater /// - public Attribute[] Attributes - { + public Attribute[] Attributes + { get { if (methodParameter != null) @@ -203,4 +202,4 @@ namespace Spring.Objects.Factory.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/DictionaryFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/DictionaryFactoryObject.cs index 94bbe695..bd69d6e1 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/DictionaryFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/DictionaryFactoryObject.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Globalization; @@ -81,14 +80,14 @@ namespace Spring.Objects.Factory.Config "The Type passed to the TargetDictionaryType property must implement the '{0}' interface.", ObjectType.FullName)); } - if (value.IsInterface) + if (value.IsInterface) { throw new ArgumentException( string.Format(CultureInfo.InvariantCulture, "The Type passed to the TargetDictionaryType property cannot be an interface; it must be a concrete class that implements the '{0}' interface.", ObjectType.FullName)); } - if (value.IsAbstract) + if (value.IsAbstract) { throw new ArgumentException( string.Format(CultureInfo.InvariantCulture, @@ -128,4 +127,4 @@ namespace Spring.Objects.Factory.Config return result; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/DictionaryVariableSource.cs b/src/Spring/Spring.Core/Objects/Factory/Config/DictionaryVariableSource.cs index bdda3904..e72395b3 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/DictionaryVariableSource.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/DictionaryVariableSource.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; namespace Spring.Objects.Factory.Config { @@ -158,4 +156,4 @@ namespace Spring.Objects.Factory.Config return variables.GetEnumerator(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/EnvironmentVariableMode.cs b/src/Spring/Spring.Core/Objects/Factory/Config/EnvironmentVariableMode.cs index 657f61bd..273ed405 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/EnvironmentVariableMode.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/EnvironmentVariableMode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects.Factory.Config { /// @@ -48,4 +46,4 @@ namespace Spring.Objects.Factory.Config /// Override = 3 } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/EnvironmentVariableSource.cs b/src/Spring/Spring.Core/Objects/Factory/Config/EnvironmentVariableSource.cs index 8d104205..6b353b52 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/EnvironmentVariableSource.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/EnvironmentVariableSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects.Factory.Config { /// @@ -55,4 +53,4 @@ namespace Spring.Objects.Factory.Config return Environment.GetEnvironmentVariable(name); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/EventValues.cs b/src/Spring/Spring.Core/Objects/Factory/Config/EventValues.cs index 1e28a21e..baddc04d 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/EventValues.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/EventValues.cs @@ -14,10 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections; -using System.Collections.Generic; - namespace Spring.Objects.Factory.Config { /// diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ExpressionHolder.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ExpressionHolder.cs index 1c2cff7c..0cd6c38b 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ExpressionHolder.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ExpressionHolder.cs @@ -14,8 +14,6 @@ * limitations under the License. */ -using System; -using System.Globalization; using Spring.Expressions; namespace Spring.Objects.Factory.Config diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/FieldRetrievingFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/FieldRetrievingFactoryObject.cs index 9e40f554..f437447c 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/FieldRetrievingFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/FieldRetrievingFactoryObject.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Globalization; using System.Reflection; using System.Text; @@ -28,8 +25,6 @@ using System.Text; using Spring.Core.TypeResolution; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -306,4 +301,4 @@ namespace Spring.Objects.Factory.Config TargetField = fieldName; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/IAutowireCapableObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/Config/IAutowireCapableObjectFactory.cs index 4de8aab6..740eff30 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/IAutowireCapableObjectFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/IAutowireCapableObjectFactory.cs @@ -18,13 +18,6 @@ #endregion -#region Imports - -using System; -using System.Collections.Generic; - -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -144,4 +137,4 @@ namespace Spring.Objects.Factory.Config string objectName, IList autowiredObjectNames); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/IConfigurableListableObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/Config/IConfigurableListableObjectFactory.cs index bb4b982c..f61cf0fd 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/IConfigurableListableObjectFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/IConfigurableListableObjectFactory.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects.Factory.Config { /// @@ -100,7 +98,7 @@ namespace Spring.Objects.Factory.Config /// If the object definition is invalid. /// void RegisterObjectDefinition(string name, IObjectDefinition definition); - + /// /// Injects dependencies into the supplied instance /// using the supplied . @@ -148,7 +146,7 @@ namespace Spring.Objects.Factory.Config /// ApplicationContext instance that the object is living in. /// /// Note there are no such default types registered in a plain IObjectFactory, - /// not even for the IObjectFactory interface itself. + /// not even for the IObjectFactory interface itself. /// /// /// Type of the dependency to register. @@ -157,7 +155,7 @@ namespace Spring.Objects.Factory.Config /// as long as the given value actually implements the extended interface. /// /// The autowired value. This may also be an - /// implementation o the interface, + /// implementation o the interface, /// which allows for lazy resolution of the actual target value. void RegisterResolvableDependency(Type dependencyType, object autowiredValue); @@ -173,8 +171,8 @@ namespace Spring.Objects.Factory.Config /// /// if there is no object with the given name. bool IsAutowireCandidate(string objectName, DependencyDescriptor descriptor); - - + + /// /// Clear the merged object definition cache, removing entries for objects /// which are not considered eligible for full metadata caching yet. diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/IConfigurableObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/Config/IConfigurableObjectFactory.cs index dd357903..fc785c7e 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/IConfigurableObjectFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/IConfigurableObjectFactory.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.ComponentModel; using Spring.Util; @@ -111,7 +110,7 @@ namespace Spring.Objects.Factory.Config /// The current number of registered /// s. /// - int ObjectPostProcessorCount + int ObjectPostProcessorCount { get; } diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/IDestructionAwareObjectPostProcessor.cs b/src/Spring/Spring.Core/Objects/Factory/Config/IDestructionAwareObjectPostProcessor.cs index 40ffc039..eb872234 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/IDestructionAwareObjectPostProcessor.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/IDestructionAwareObjectPostProcessor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -16,12 +16,6 @@ * limitations under the License. */ -#endregion - -#region Imports - - - #endregion namespace Spring.Objects.Factory.Config diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/IInstantiationAwareObjectPostProcessor.cs b/src/Spring/Spring.Core/Objects/Factory/Config/IInstantiationAwareObjectPostProcessor.cs index 4fee589b..ecd58295 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/IInstantiationAwareObjectPostProcessor.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/IInstantiationAwareObjectPostProcessor.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Reflection; namespace Spring.Objects.Factory.Config { @@ -39,7 +37,7 @@ namespace Spring.Objects.Factory.Config { /// /// /// This interface is a special purpose interface, mainly for internal use within the framework. - /// It is recommended to implement the plain interface as far as + /// It is recommended to implement the plain interface as far as /// possible, or to derive from in order to be shielded /// from extension to this interface. /// @@ -102,7 +100,7 @@ namespace Spring.Objects.Factory.Config { /// Name of the object. /// true if properties should be set on the object; false if property population /// should be skipped. Normal implementations should return true. Returning false will also - /// prevent any subsequent InstantiationAwareObjectPostProcessor instances from being + /// prevent any subsequent InstantiationAwareObjectPostProcessor instances from being /// invoked on this object instance. bool PostProcessAfterInstantiation(object objectInstance, string objectName); @@ -120,10 +118,10 @@ namespace Spring.Objects.Factory.Config { /// The property values that the factory is about to apply (never null). /// he relevant property infos for the target object (with ignored /// dependency types - which the factory handles specifically - already filtered out) - /// The object instance created, but whose properties have not yet + /// The object instance created, but whose properties have not yet /// been set. /// Name of the object. - /// The actual property values to apply to the given object (can be the + /// The actual property values to apply to the given object (can be the /// passed-in PropertyValues instances0 or null to skip property population. IPropertyValues PostProcessPropertyValues(IPropertyValues pvs, IList pis, object objectInstance, string objectName); } diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/IManagedCollection.cs b/src/Spring/Spring.Core/Objects/Factory/Config/IManagedCollection.cs index 1dfc60df..7433600e 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/IManagedCollection.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/IManagedCollection.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,8 @@ #endregion -#region Imports - using System.Collections; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -74,21 +70,21 @@ namespace Spring.Objects.Factory.Config ///

/// /// using System; - /// + /// /// using Spring.Objects.Factory.Support; - /// + /// /// namespace MyNamespace /// { /// public sealed class Bag : ICollection /// { /// // ICollection implementation elided for clarity... - /// + /// /// public void Add(object o) /// { /// // implementation elided for clarity... /// } /// } - /// + /// /// public class ManagedBag : Bag, IManagedCollection /// { /// public ICollection Resolve( @@ -160,4 +156,4 @@ namespace Spring.Objects.Factory.Config /// A fully resolved element. public delegate object ManagedCollectionElementResolver( string name, IObjectDefinition definition, string argumentName, object element); -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/IObjectDefinition.cs b/src/Spring/Spring.Core/Objects/Factory/Config/IObjectDefinition.cs index 1cd9b561..171e6ca8 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/IObjectDefinition.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/IObjectDefinition.cs @@ -18,13 +18,6 @@ #endregion -#region Imports - -using System; -using System.Collections.Generic; - -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -65,7 +58,7 @@ namespace Spring.Objects.Factory.Config /// /// Is this object definition a "template", i.e. not meant to be instantiated - /// itself but rather just serving as an object definition for configuration + /// itself but rather just serving as an object definition for configuration /// templates used by . /// /// @@ -143,11 +136,11 @@ namespace Spring.Objects.Factory.Config /// /// Note that this does not have to be the actual type name used at runtime, /// in case of a child definition overrding/inheriting the the type name from its - /// parent. It can be modifed during object factory post-processing, typically + /// parent. It can be modifed during object factory post-processing, typically /// replacing the original class name with a parsed variant of it. /// Hence, do not consider this to be the definitive bean type at runtime /// but rather only use it for parsing purposes at the individual object - /// definition level. + /// definition level. /// string ObjectTypeName { get; set;} @@ -234,4 +227,4 @@ namespace Spring.Objects.Factory.Config ///
bool IsPrimary { get; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/IObjectFactoryPostProcessor.cs b/src/Spring/Spring.Core/Objects/Factory/Config/IObjectFactoryPostProcessor.cs index 1e80e848..5f33bfa4 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/IObjectFactoryPostProcessor.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/IObjectFactoryPostProcessor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -16,12 +16,6 @@ * limitations under the License. */ -#endregion - -#region Imports - - - #endregion namespace Spring.Objects.Factory.Config @@ -48,7 +42,7 @@ namespace Spring.Objects.Factory.Config /// /// Juergen Hoeller /// Rick Evans (.Net) - public interface IObjectFactoryPostProcessor + public interface IObjectFactoryPostProcessor { /// /// Modify the application context's internal object factory after its diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ISingletonObjectRegistry.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ISingletonObjectRegistry.cs index 311346ed..670fd195 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ISingletonObjectRegistry.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ISingletonObjectRegistry.cs @@ -18,8 +18,6 @@ #endregion -using System.Collections.Generic; - using Spring.Objects.Factory.Support; namespace Spring.Objects.Factory.Config @@ -143,7 +141,7 @@ namespace Spring.Objects.Factory.Config /// /// IList SingletonNames - { + { get; } @@ -166,8 +164,8 @@ namespace Spring.Objects.Factory.Config /// /// int SingletonCount - { + { get; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/InstantiationAwareObjectPostProcessorAdapter.cs b/src/Spring/Spring.Core/Objects/Factory/Config/InstantiationAwareObjectPostProcessorAdapter.cs index aafb088a..5ab6e545 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/InstantiationAwareObjectPostProcessorAdapter.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/InstantiationAwareObjectPostProcessorAdapter.cs @@ -14,8 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; using System.Reflection; namespace Spring.Objects.Factory.Config @@ -118,7 +116,7 @@ namespace Spring.Objects.Factory.Config /// Name of the object. /// true if properties should be set on the object; false if property population /// should be skipped. Normal implementations should return true. Returning false will also - /// prevent any subsequent InstantiationAwareObjectPostProcessor instances from being + /// prevent any subsequent InstantiationAwareObjectPostProcessor instances from being /// invoked on this object instance. public virtual bool PostProcessAfterInstantiation(object objectInstance, string objectName) { @@ -139,10 +137,10 @@ namespace Spring.Objects.Factory.Config /// The property values that the factory is about to apply (never null). /// he relevant property infos for the target object (with ignored /// dependency types - which the factory handles specifically - already filtered out) - /// The object instance created, but whose properties have not yet + /// The object instance created, but whose properties have not yet /// been set. /// Name of the object. - /// The actual property values to apply to the given object (can be the + /// The actual property values to apply to the given object (can be the /// passed-in PropertyValues instances0 or null to skip property population. public virtual IPropertyValues PostProcessPropertyValues(IPropertyValues pvs, IList pis, object objectInstance, string objectName) { @@ -203,4 +201,4 @@ namespace Spring.Objects.Factory.Config return instance; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ListFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ListFactoryObject.cs index 2aa2a0a2..8aa60bc4 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ListFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ListFactoryObject.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Globalization; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -127,4 +122,4 @@ namespace Spring.Objects.Factory.Config return result; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/LogFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/LogFactoryObject.cs index 3510902f..3d2cb97f 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/LogFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/LogFactoryObject.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using Common.Logging; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -38,7 +33,7 @@ namespace Spring.Objects.Factory.Config /// instances for common topics (such as the 'DAL', 'BLL', etc). The /// /// property determines the name of the - /// Common.Logging logger. + /// Common.Logging logger. ///

/// /// Rick Evans @@ -167,4 +162,4 @@ namespace Spring.Objects.Factory.Config private ILog log; private string logName; } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ManagedDictionary.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ManagedDictionary.cs index 18d9efea..98cf812e 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ManagedDictionary.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ManagedDictionary.cs @@ -1,5 +1,24 @@ #region License +/* + * Copyright � 2002-2011 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 License + /* * Copyright � 2002-2011 the original author or authors. * @@ -18,11 +37,7 @@ #endregion -#region Imports - -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.Globalization; @@ -31,8 +46,6 @@ using Spring.Core.TypeConversion; using Spring.Core.TypeResolution; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -63,7 +76,7 @@ namespace Spring.Objects.Factory.Config } /// - /// Gets or sets the unresolved name for the + /// Gets or sets the unresolved name for the /// of the keys of this managed dictionary. /// /// The unresolved name for the type of the keys of this managed dictionary. @@ -74,7 +87,7 @@ namespace Spring.Objects.Factory.Config } /// - /// Gets or sets the unresolved name for the + /// Gets or sets the unresolved name for the /// of the values of this managed dictionary. /// /// The unresolved name for the type of the values of this managed dictionary. @@ -83,7 +96,7 @@ namespace Spring.Objects.Factory.Config get { return this.valueTypeName; } set { this.valueTypeName = value; } } - + /// /// Resolves this managed collection at runtime. /// @@ -127,7 +140,7 @@ namespace Spring.Objects.Factory.Config else { Type type = typeof(Dictionary<,>); - Type[] genericArgs = new Type[2] { + Type[] genericArgs = new Type[2] { (keyType == null) ? typeof(object) : keyType, (valueType == null) ? typeof(object) : valueType }; type = type.MakeGenericType(genericArgs); @@ -152,7 +165,7 @@ namespace Spring.Objects.Factory.Config throw new TypeMismatchException( String.Format( "Unable to convert managed dictionary key '{0}' from [{1}] into [{2}] during initialization" - + " of property '{3}' for object '{4}'. Do you have an appropriate type converter registered?", + + " of property '{3}' for object '{4}'. Do you have an appropriate type converter registered?", resolvedKey, resolvedKey.GetType(), keyType, propertyName, objectName)); } } @@ -168,7 +181,7 @@ namespace Spring.Objects.Factory.Config throw new TypeMismatchException( String.Format( "Unable to convert managed dictionary value '{0}' from [{1}] into [{2}] during initialization" - + " of property '{3}' for object '{4}'. Do you have an appropriate type converter registered?", + + " of property '{3}' for object '{4}'. Do you have an appropriate type converter registered?", resolvedValue, resolvedValue.GetType(), valueType, propertyName, objectName)); } } @@ -194,7 +207,7 @@ namespace Spring.Objects.Factory.Config /// /// Merges the current value set with that of the supplied object. /// - /// The supplied object is considered the parent, and values in the + /// The supplied object is considered the parent, and values in the /// callee's value set must override those of the supplied object. /// /// The parent object to merge with @@ -203,7 +216,7 @@ namespace Spring.Objects.Factory.Config /// If merging is not enabled for this instance, /// (i.e. MergeEnabled equals false. public object Merge(object parent) - { + { if (!this.mergeEnabled) { throw new InvalidOperationException( diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ManagedList.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ManagedList.cs index 242e518d..91575c38 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ManagedList.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ManagedList.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,11 +18,7 @@ #endregion -#region Imports - -using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using Spring.Core; @@ -30,8 +26,6 @@ using Spring.Core.TypeConversion; using Spring.Core.TypeResolution; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -63,7 +57,7 @@ namespace Spring.Objects.Factory.Config /// - /// Gets or sets the unresolved name for the + /// Gets or sets the unresolved name for the /// of the elements of this managed list. /// /// The unresolved name for the type of the elements of this managed list. @@ -159,7 +153,7 @@ namespace Spring.Objects.Factory.Config /// /// Merges the current value set with that of the supplied object. /// - /// The supplied object is considered the parent, and values in the + /// The supplied object is considered the parent, and values in the /// callee's value set must override those of the supplied object. /// /// The parent object to merge with @@ -195,4 +189,4 @@ namespace Spring.Objects.Factory.Config return merged; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ManagedNameValueCollection.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ManagedNameValueCollection.cs index cdcebe45..c998881a 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ManagedNameValueCollection.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ManagedNameValueCollection.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections.Specialized; namespace Spring.Objects.Factory.Config @@ -61,7 +60,7 @@ namespace Spring.Objects.Factory.Config /// /// Merges the current value set with that of the supplied object. /// - /// The supplied object is considered the parent, and values in the + /// The supplied object is considered the parent, and values in the /// callee's value set must override those of the supplied object. /// /// The parent object to merge with @@ -97,4 +96,4 @@ namespace Spring.Objects.Factory.Config return merged; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ManagedSet.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ManagedSet.cs index 85b13f3e..a435f213 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ManagedSet.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ManagedSet.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Collections; using Spring.Collections; @@ -29,8 +26,6 @@ using Spring.Core.TypeConversion; using Spring.Core.TypeResolution; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -64,7 +59,7 @@ namespace Spring.Objects.Factory.Config } /// - /// Gets or sets the unresolved name for the + /// Gets or sets the unresolved name for the /// of the elements of this managed set. /// /// The unresolved name for the type of the elements of this managed set. @@ -95,7 +90,7 @@ namespace Spring.Objects.Factory.Config public ICollection Resolve(string objectName, IObjectDefinition definition, string propertyName, ManagedCollectionElementResolver resolver) { ISet set = new HybridSet(); - + Type elementType = null; if (StringUtils.HasText(this.elementTypeName)) { @@ -118,7 +113,7 @@ namespace Spring.Objects.Factory.Config throw new TypeMismatchException( String.Format( "Unable to convert managed set element '{0}' from [{1}] into [{2}] during initialization" - + " of property '{3}' for object '{4}'. Do you have an appropriate type converter registered?", + + " of property '{3}' for object '{4}'. Do you have an appropriate type converter registered?", resolvedElement, resolvedElement.GetType(), elementType, propertyName, objectName)); } } @@ -144,7 +139,7 @@ namespace Spring.Objects.Factory.Config /// /// Merges the current value set with that of the supplied object. /// - /// The supplied object is considered the parent, and values in the + /// The supplied object is considered the parent, and values in the /// callee's value set must override those of the supplied object. /// /// The parent object to merge with @@ -180,4 +175,4 @@ namespace Spring.Objects.Factory.Config return merged; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/MethodInvokingFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/MethodInvokingFactoryObject.cs index 6ec09699..3c4a5753 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/MethodInvokingFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/MethodInvokingFactoryObject.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using Spring.Objects.Support; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -267,4 +262,4 @@ namespace Spring.Objects.Factory.Config Prepare(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ObjectDefinitionHolder.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ObjectDefinitionHolder.cs index 059998d2..fa6d2afe 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ObjectDefinitionHolder.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ObjectDefinitionHolder.cs @@ -14,9 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; - using Spring.Objects.Factory.Xml; using Spring.Util; @@ -78,13 +75,13 @@ namespace Spring.Objects.Factory.Config /// Any aliases for the supplied /// public ObjectDefinitionHolder( - IObjectDefinition definition, + IObjectDefinition definition, string name, IReadOnlyList aliases) { objectDefinition = definition; objectName = name; - this.aliases = aliases != null && aliases.Count > 0 + this.aliases = aliases != null && aliases.Count > 0 ? new List(aliases) : null; } @@ -120,8 +117,8 @@ namespace Spring.Objects.Factory.Config /// public bool MatchesName(string candidateName) { - return !string.IsNullOrEmpty(candidateName) + return !string.IsNullOrEmpty(candidateName) && (candidateName == ObjectName || aliases?.Contains(candidateName) == true); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ObjectDefinitionVisitor.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ObjectDefinitionVisitor.cs index 4164c32b..6fd7b85f 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ObjectDefinitionVisitor.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ObjectDefinitionVisitor.cs @@ -18,18 +18,12 @@ #endregion -#region Imports - -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using Spring.Collections; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -64,7 +58,7 @@ namespace Spring.Objects.Factory.Config /// /// Subclasses should override the ResolveStringValue method protected ObjectDefinitionVisitor() - { + { } /// @@ -87,7 +81,7 @@ namespace Spring.Objects.Factory.Config } /// - /// Visits the ObjectDefinition property ObjectTypeName, replacing string values using + /// Visits the ObjectDefinition property ObjectTypeName, replacing string values using /// the specified IVariableSource. /// /// The object definition. @@ -241,11 +235,11 @@ namespace Spring.Objects.Factory.Config } /// - /// Visits the ManagedList property ElementTypeName and + /// Visits the ManagedList property ElementTypeName and /// calls for list element. /// protected virtual void VisitManagedList(ManagedList listVal) - { + { string elementTypeName = listVal.ElementTypeName; if (elementTypeName != null) { @@ -268,7 +262,7 @@ namespace Spring.Objects.Factory.Config } /// - /// Visits the ManagedSet property ElementTypeName and + /// Visits the ManagedSet property ElementTypeName and /// calls for list element. /// protected virtual void VisitManagedSet(ManagedSet setVal) @@ -296,7 +290,7 @@ namespace Spring.Objects.Factory.Config } /// - /// Visits the ManagedSet properties KeyTypeName and ValueTypeName and + /// Visits the ManagedSet properties KeyTypeName and ValueTypeName and /// calls for dictionary's value element. /// protected virtual void VisitManagedDictionary(ManagedDictionary dictVal) @@ -334,9 +328,9 @@ namespace Spring.Objects.Factory.Config mods[entry.Key] = newValue; }*/ - object key = entry.Key; + object key = entry.Key; object newKey = ResolveValue(key); - object oldValue = entry.Value; + object oldValue = entry.Value; object newValue = ResolveValue(oldValue); if (!ObjectUtils.NullSafeEquals(newValue, oldValue) || key != newKey) @@ -391,4 +385,4 @@ namespace Spring.Objects.Factory.Config return resolveHandler(rawStringValue); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ObjectFactoryCreatingFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ObjectFactoryCreatingFactoryObject.cs index 0ac45700..9098ecd4 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ObjectFactoryCreatingFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ObjectFactoryCreatingFactoryObject.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -61,12 +56,12 @@ namespace Spring.Objects.Factory.Config /// /// /// - /// + /// /// /// /// - /// + /// /// /// /// @@ -140,7 +135,7 @@ namespace Spring.Objects.Factory.Config /// public override void AfterPropertiesSet() { - if(StringUtils.IsNullOrEmpty(_targetObjectName)) + if(StringUtils.IsNullOrEmpty(_targetObjectName)) { throw new ArgumentException("The 'TargetObjectName' property must have a value."); } @@ -174,4 +169,4 @@ namespace Spring.Objects.Factory.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ObjectReferenceFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ObjectReferenceFactoryObject.cs index 01ace460..8d83bfe6 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ObjectReferenceFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ObjectReferenceFactoryObject.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Util; namespace Spring.Objects.Factory.Config @@ -147,4 +146,4 @@ namespace Spring.Objects.Factory.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/PropertyFileVariableSource.cs b/src/Spring/Spring.Core/Objects/Factory/Config/PropertyFileVariableSource.cs index 41c44e7e..9c7ab2b6 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/PropertyFileVariableSource.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/PropertyFileVariableSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; -using System.IO; using Spring.Core.IO; using Spring.Util; @@ -40,11 +38,11 @@ namespace Spring.Objects.Factory.Config private bool ignoreMissingResources; /// - /// Gets or sets the locations of the property files + /// Gets or sets the locations of the property files /// to read properties from. /// /// - /// The locations of the property files + /// The locations of the property files /// to read properties from. /// public IResource[] Locations @@ -66,7 +64,7 @@ namespace Spring.Objects.Factory.Config } /// - /// Sets a value indicating whether to ignore resource locations that do not exist. This will call + /// Sets a value indicating whether to ignore resource locations that do not exist. This will call /// the Exists property. /// /// @@ -113,17 +111,17 @@ namespace Spring.Objects.Factory.Config { properties = new Properties(); InitProperties(); - } + } return properties.GetProperty(name); } } /// - /// Initializes properties based on the specified + /// Initializes properties based on the specified /// property file locations. /// protected virtual void InitProperties() - { + { foreach (IResource location in locations) { bool exists = location.Exists; @@ -134,8 +132,8 @@ namespace Spring.Objects.Factory.Config using (Stream input = location.InputStream) { properties.Load(input); - } - } + } + } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/PropertyOverrideConfigurer.cs b/src/Spring/Spring.Core/Objects/Factory/Config/PropertyOverrideConfigurer.cs index 85e46459..281c387b 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/PropertyOverrideConfigurer.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/PropertyOverrideConfigurer.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Collections.Specialized; using System.Globalization; using Common.Logging; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -159,7 +154,7 @@ namespace Spring.Objects.Factory.Config string name = key.Substring(0, dotIndex); string objectProperty = key.Substring(dotIndex + 1); IObjectDefinition definition = factory.GetObjectDefinition(name); - if(definition != null) + if(definition != null) { PropertyValue pv = definition.PropertyValues.GetPropertyValue(objectProperty); if (pv != null && pv.Value is RuntimeObjectReference) @@ -175,7 +170,7 @@ namespace Spring.Objects.Factory.Config definition.PropertyValues.Add(objectProperty, value); } } - else + else { #region Instrumentation @@ -199,4 +194,4 @@ namespace Spring.Objects.Factory.Config #endregion } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/PropertyPathFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/PropertyPathFactoryObject.cs index 014a1eca..a280f26e 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/PropertyPathFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/PropertyPathFactoryObject.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects.Factory.Config { /// @@ -48,7 +46,7 @@ namespace Spring.Objects.Factory.Config /// /// /// - /// + /// /// @@ -57,13 +55,13 @@ namespace Spring.Objects.Factory.Config /// /// ///
- /// + /// /// /// - /// + /// /// @@ -72,11 +70,11 @@ namespace Spring.Objects.Factory.Config /// /// /// - /// + /// /// @@ -108,7 +106,7 @@ namespace Spring.Objects.Factory.Config /// /// The target object that the property path lookup is to be applied to. /// - /// + /// public object TargetObject { set { this.targetObjectWrapper = new ObjectWrapper(value); } @@ -130,7 +128,7 @@ namespace Spring.Objects.Factory.Config /// The (object) name of the target object that the property path lookup /// is to be applied to. /// - /// + /// public string TargetObjectName { set @@ -333,4 +331,4 @@ namespace Spring.Objects.Factory.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/PropertyPlaceholderConfigurer.cs b/src/Spring/Spring.Core/Objects/Factory/Config/PropertyPlaceholderConfigurer.cs index ee389399..91bc7411 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/PropertyPlaceholderConfigurer.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/PropertyPlaceholderConfigurer.cs @@ -2,13 +2,13 @@ /* * Copyright © 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,10 +18,6 @@ #endregion -#region Imports - -using System; -using System.Collections.Generic; using System.Collections.Specialized; using System.Globalization; @@ -30,8 +26,6 @@ using Common.Logging; using Spring.Collections; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -171,7 +165,7 @@ namespace Spring.Objects.Factory.Config logger = LogManager.GetLogger(this.GetType()); } - #region Properties + #region Properties /// /// The placeholder prefix (the default is ${). @@ -201,7 +195,7 @@ namespace Spring.Objects.Factory.Config } /// - /// Controls how environment variables will be used to + /// Controls how environment variables will be used to /// replace property placeholders. /// /// @@ -350,7 +344,7 @@ namespace Spring.Objects.Factory.Config /// /// ///

- /// The default implementation delegates to + /// The default implementation delegates to /// /// before/afer the environment variable check. Subclasses can override /// this for custom resolution strategies, including customized points @@ -433,4 +427,4 @@ namespace Spring.Objects.Factory.Config #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/PropertyResourceConfigurer.cs b/src/Spring/Spring.Core/Objects/Factory/Config/PropertyResourceConfigurer.cs index e4cef88a..aaab22a7 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/PropertyResourceConfigurer.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/PropertyResourceConfigurer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,17 +18,12 @@ #endregion -#region Imports - -using System; using System.Collections.Specialized; using System.Globalization; using Common.Logging; using Spring.Core; using Spring.Core.IO; -#endregion - namespace Spring.Objects.Factory.Config { ///

@@ -74,7 +69,7 @@ namespace Spring.Objects.Factory.Config : IObjectFactoryPostProcessor, IOrdered { /// - /// The default configuration section name to use if none is explictly supplied. + /// The default configuration section name to use if none is explictly supplied. /// /// public static readonly string DefaultConfigSectionName = "spring-config"; @@ -259,7 +254,7 @@ namespace Spring.Objects.Factory.Config } /// - /// Loads properties from the configuration sections + /// Loads properties from the configuration sections /// specified in into . /// /// The instance to be filled with properties. @@ -390,4 +385,4 @@ namespace Spring.Objects.Factory.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/PropertyRetrievingFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/PropertyRetrievingFactoryObject.cs index 8eab3de8..fbb47b31 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/PropertyRetrievingFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/PropertyRetrievingFactoryObject.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Reflection; using System.Text; @@ -28,8 +25,6 @@ using Spring.Core; using Spring.Core.TypeResolution; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -220,7 +215,7 @@ namespace Spring.Objects.Factory.Config } else { - // $£%#@! a nested static property... recurse to the end property + // $�%#@! a nested static property... recurse to the end property string property = TargetProperty; int propertyIndex = property.IndexOf("."); string startProperty = property.Substring(0, propertyIndex); @@ -270,7 +265,7 @@ namespace Spring.Objects.Factory.Config { if (Arguments.Length == 0 && target != null) { - // using object wrapper supports nested property lookup... + // using object wrapper supports nested property lookup... instance = _targetObjectWrapper.GetPropertyValue(_targetProperty); } else @@ -298,4 +293,4 @@ namespace Spring.Objects.Factory.Config #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ResourceHandlerConfigurer.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ResourceHandlerConfigurer.cs index ee56711e..d8d62812 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ResourceHandlerConfigurer.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ResourceHandlerConfigurer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Collections; using Spring.Core.IO; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -42,12 +37,12 @@ namespace Spring.Objects.Factory.Config /// scope of an /// will /// automatically be picked up by the application context and made - /// available to the IoC container whenever resolution of IResources is required. + /// available to the IoC container whenever resolution of IResources is required. ///

/// /// Mark Pollack /// - /// + /// [Serializable] public class ResourceHandlerConfigurer : AbstractConfigurer { @@ -62,10 +57,10 @@ namespace Spring.Objects.Factory.Config /// contains the resource protocol name as the key and type as the value. /// The key name can either be a string or an object, in which case /// ToString() will be used to obtain the string name. - /// The value can be the fully qualified name of the IResource + /// The value can be the fully qualified name of the IResource /// implementation, a string, or /// an actual of the IResource class - /// + /// ///

/// public IDictionary ResourceHandlers @@ -99,4 +94,4 @@ namespace Spring.Objects.Factory.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/ResourceManagerFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/ResourceManagerFactoryObject.cs index d22f75d6..031ba7d3 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/ResourceManagerFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/ResourceManagerFactoryObject.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,17 +18,11 @@ #endregion -#region Imports - -using System; -using System.IO; using System.Reflection; using System.Resources; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -147,4 +141,4 @@ namespace Spring.Objects.Factory.Config base.AfterPropertiesSet(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/RuntimeObjectReference.cs b/src/Spring/Spring.Core/Objects/Factory/Config/RuntimeObjectReference.cs index c2b686f1..da8b96b9 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/RuntimeObjectReference.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/RuntimeObjectReference.cs @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Globalization; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -126,9 +121,9 @@ namespace Spring.Objects.Factory.Config private bool _isToParent; #endregion - + #region Equality Members - + /// /// Determines whether the specified RuntimeObjectReference is equal to the current RuntimeObjectReference. /// @@ -149,7 +144,7 @@ namespace Spring.Objects.Factory.Config if (obj.GetType() != this.GetType()) return false; return Equals((RuntimeObjectReference)obj); } - + /// /// Serves as a hash function for RuntimeObjectReference. /// @@ -161,7 +156,7 @@ namespace Spring.Objects.Factory.Config return (_objectName.GetHashCode() * 397) ^ _isToParent.GetHashCode(); } } - + #endregion } } diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/SetFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Config/SetFactoryObject.cs index a3480203..1347673e 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/SetFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/SetFactoryObject.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Globalization; using Spring.Collections; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -119,4 +114,4 @@ namespace Spring.Objects.Factory.Config return result; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/SharedStateAwareProcessor.cs b/src/Spring/Spring.Core/Objects/Factory/Config/SharedStateAwareProcessor.cs index 56484bad..0b57ed25 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/SharedStateAwareProcessor.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/SharedStateAwareProcessor.cs @@ -18,17 +18,12 @@ #endregion -#region Imports - -using System; using System.Collections; using Common.Logging; using Spring.Core; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -69,7 +64,7 @@ namespace Spring.Objects.Factory.Config /// Get/Set the (already ordererd!) list of instances. /// /// - /// If this list is not set, the containing object factory will automatically + /// If this list is not set, the containing object factory will automatically /// be scanned for instances. /// public ISharedStateFactory[] SharedStateFactories @@ -99,7 +94,7 @@ namespace Spring.Objects.Factory.Config } /// - /// Iterates over configured list of s until + /// Iterates over configured list of s until /// the first provider is found that
/// a) true == provider.CanProvideState( instance, name )
/// b) null != provider.GetSharedState( instance, name )
@@ -148,4 +143,4 @@ namespace Spring.Objects.Factory.Config return instance; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/SmartInstantiationAwareObjectPostProcessor.cs b/src/Spring/Spring.Core/Objects/Factory/Config/SmartInstantiationAwareObjectPostProcessor.cs index 46dbb6e6..a38d2ef8 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/SmartInstantiationAwareObjectPostProcessor.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/SmartInstantiationAwareObjectPostProcessor.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Reflection; namespace Spring.Objects.Factory.Config @@ -59,4 +58,4 @@ namespace Spring.Objects.Factory.Config ConstructorInfo[] DetermineCandidateConstructors(Type objectType, string objectName); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/SpecialFolderVariableSource.cs b/src/Spring/Spring.Core/Objects/Factory/Config/SpecialFolderVariableSource.cs index 30d3b8fb..29bdac8a 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/SpecialFolderVariableSource.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/SpecialFolderVariableSource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects.Factory.Config { /// @@ -67,4 +65,4 @@ namespace Spring.Objects.Factory.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/TypeAliasConfigurer.cs b/src/Spring/Spring.Core/Objects/Factory/Config/TypeAliasConfigurer.cs index 69d8991f..55c3a5ee 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/TypeAliasConfigurer.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/TypeAliasConfigurer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Collections; using Spring.Core.TypeResolution; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -44,12 +39,12 @@ namespace Spring.Objects.Factory.Config /// scope of an /// will /// automatically be picked up by the application context and made - /// available to the IoC container whenever resolution of type aliases is required. + /// available to the IoC container whenever resolution of type aliases is required. ///

/// /// Mark Pollack /// - /// + /// [Serializable] public class TypeAliasConfigurer : AbstractConfigurer { @@ -66,7 +61,7 @@ namespace Spring.Objects.Factory.Config /// The key name can either be a string or an object, in which case /// ToString() will be used to obtain the string name. /// the value can be the fully qualified name of the type as a string or - /// an actual of the class that + /// an actual of the class that /// being aliased. ///

/// @@ -102,4 +97,4 @@ namespace Spring.Objects.Factory.Config } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/TypedStringValue.cs b/src/Spring/Spring.Core/Objects/Factory/Config/TypedStringValue.cs index 4606dcd0..38626362 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/TypedStringValue.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/TypedStringValue.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; using Spring.Util; using Spring.Core.TypeResolution; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -106,7 +101,7 @@ namespace Spring.Objects.Factory.Config /// The unresolved type to convert to. /// /// - /// If the supplied is a + /// If the supplied is a /// or an empty string. /// public TypedStringValue(string value, string targetTypeName) @@ -123,7 +118,7 @@ namespace Spring.Objects.Factory.Config } /// - /// The value that is to be converted. + /// The value that is to be converted. /// /// ///

@@ -182,10 +177,10 @@ namespace Spring.Objects.Factory.Config return targetType as string; } } - set - { + set + { AssertUtils.ArgumentHasText(value, "TargetTypeName"); - targetType = value; + targetType = value; } } @@ -203,7 +198,7 @@ namespace Spring.Objects.Factory.Config ///

/// Determine the type to convert to, resolving it from a specified type name if necessary. /// - /// The resolved type to convert to. + /// The resolved type to convert to. public Type ResolveTargetType() { if (this.targetType == null) @@ -230,4 +225,4 @@ namespace Spring.Objects.Factory.Config info.AddValue("Value", theValue); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/VariableAccessor.cs b/src/Spring/Spring.Core/Objects/Factory/Config/VariableAccessor.cs index 17d01d61..f021dda5 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/VariableAccessor.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/VariableAccessor.cs @@ -1,14 +1,14 @@ #region Licence /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Globalization; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -52,7 +47,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public float GetFloat(string name, float defaultValue) @@ -66,11 +61,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public float GetFloat(string name, float defaultValue, bool throwOnInvalidValue) @@ -99,7 +94,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public double GetDouble(string name, double defaultValue) @@ -113,11 +108,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public double GetDouble(string name, double defaultValue, bool throwOnInvalidValue) @@ -146,7 +141,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public decimal GetDecimal(string name, decimal defaultValue) @@ -160,11 +155,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public decimal GetDecimal(string name, decimal defaultValue, bool throwOnInvalidValue) @@ -193,7 +188,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public long GetInt64(string name, long defaultValue) @@ -207,11 +202,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public long GetInt64(string name, long defaultValue, bool throwOnInvalidValue) @@ -240,7 +235,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public ulong GetUInt64(string name, ulong defaultValue) @@ -254,11 +249,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public ulong GetUInt64(string name, ulong defaultValue, bool throwOnInvalidValue) @@ -287,7 +282,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public int GetInt32(string name, int defaultValue) @@ -301,11 +296,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public int GetInt32(string name, int defaultValue, bool throwOnInvalidValue) @@ -325,7 +320,7 @@ namespace Spring.Objects.Factory.Config { return defaultValue; } - } + } } /// @@ -334,7 +329,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public uint GetUInt32(string name, uint defaultValue) @@ -348,11 +343,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public uint GetUInt32(string name, uint defaultValue, bool throwOnInvalidValue) @@ -381,7 +376,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public short GetInt16(string name, short defaultValue) @@ -395,11 +390,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public short GetInt16(string name, short defaultValue, bool throwOnInvalidValue) @@ -428,7 +423,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public ushort GetUInt16(string name, ushort defaultValue) @@ -442,11 +437,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public ushort GetUInt16(string name, ushort defaultValue, bool throwOnInvalidValue) @@ -475,7 +470,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public byte GetByte(string name, byte defaultValue) @@ -489,11 +484,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public byte GetByte(string name, byte defaultValue, bool throwOnInvalidValue) @@ -522,7 +517,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public Guid GetGuid(string name, Guid defaultValue) @@ -536,11 +531,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public Guid GetGuid(string name, Guid defaultValue, bool throwOnInvalidValue) @@ -570,7 +565,7 @@ namespace Spring.Objects.Factory.Config /// The expected format of the variable's value /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public DateTime GetDateTime(string name, string format, DateTime defaultValue) @@ -585,11 +580,11 @@ namespace Spring.Objects.Factory.Config /// The expected format of the variable's value /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public DateTime GetDateTime(string name, string format, DateTime defaultValue, bool throwOnInvalidValue) @@ -625,7 +620,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public char GetChar(string name, char defaultValue) @@ -639,11 +634,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public char GetChar(string name, char defaultValue, bool throwOnInvalidValue) @@ -676,7 +671,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public bool GetBoolean(string name, bool defaultValue) @@ -690,11 +685,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if cannot be parsed. /// public bool GetBoolean(string name, bool defaultValue, bool throwOnInvalidValue) @@ -713,7 +708,7 @@ namespace Spring.Objects.Factory.Config else { return defaultValue; - } + } } } @@ -723,7 +718,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// An of 's type that contains the value of the specified variable + /// An of 's type that contains the value of the specified variable /// or , if returns null. /// public Enum GetEnum(string name, Enum defaultValue) @@ -737,11 +732,11 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns null. /// - /// If false, suppresses exceptions if the result + /// If false, suppresses exceptions if the result /// of cannot be parsed /// and returns instead. /// - /// An of 's type that contains the value of the specified variable + /// An of 's type that contains the value of the specified variable /// or , if cannot be parsed. /// public Enum GetEnum(string name, Enum defaultValue, bool throwOnInvalidValue) @@ -755,7 +750,7 @@ namespace Spring.Objects.Factory.Config if (throwOnInvalidValue) { throw; - } + } else { return defaultValue; @@ -769,7 +764,7 @@ namespace Spring.Objects.Factory.Config /// The name of the variable to be read. /// The value to be returned if returns or . /// - /// A that contains the value of the specified variable + /// A that contains the value of the specified variable /// or , if returns null. /// public string GetString(string name, string defaultValue) @@ -788,4 +783,4 @@ namespace Spring.Objects.Factory.Config return value; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Config/VariablePlaceholderConfigurer.cs b/src/Spring/Spring.Core/Objects/Factory/Config/VariablePlaceholderConfigurer.cs index fc3304c2..a7db6f88 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Config/VariablePlaceholderConfigurer.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Config/VariablePlaceholderConfigurer.cs @@ -14,9 +14,7 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using Common.Logging; using Spring.Collections; @@ -30,11 +28,11 @@ namespace Spring.Objects.Factory.Config /// /// /// The placeholder syntax follows the NAnt style: ${...}. - /// Placeholders values are resolved against a list of + /// Placeholders values are resolved against a list of /// s. In case of multiple definitions - /// for the same property placeholder name, the first one in the + /// for the same property placeholder name, the first one in the /// list is used. - /// Variable substitution is performed on simple property values, + /// Variable substitution is performed on simple property values, /// lists, dictionaries, sets, constructor /// values, object type name, and object names in /// runtime object references ( @@ -237,7 +235,7 @@ namespace Spring.Objects.Factory.Config { string name = objectDefinitionNames[i]; IObjectDefinition definition = factory.GetObjectDefinition( name, includeAncestors ); - + if (definition == null) continue; @@ -336,7 +334,7 @@ namespace Spring.Objects.Factory.Config } } return strVal; - } + } } private class CompositeVariableSource : IVariableSource @@ -370,4 +368,4 @@ namespace Spring.Objects.Factory.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/FactoryObjectNotInitializedException.cs b/src/Spring/Spring.Core/Objects/Factory/FactoryObjectNotInitializedException.cs index 112e85fc..2028d380 100644 --- a/src/Spring/Spring.Core/Objects/Factory/FactoryObjectNotInitializedException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/FactoryObjectNotInitializedException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; using Spring.Util; -#endregion - namespace Spring.Objects.Factory { /// diff --git a/src/Spring/Spring.Core/Objects/Factory/IFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/IFactoryObject.cs index bea29aa2..a19937c9 100644 --- a/src/Spring/Spring.Core/Objects/Factory/IFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/IFactoryObject.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,6 @@ #endregion -#region Imports - -using System; - -#endregion - namespace Spring.Objects.Factory { /// @@ -80,4 +74,4 @@ namespace Spring.Objects.Factory /// bool IsSingleton { get; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/IHierarchicalObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/IHierarchicalObjectFactory.cs index 409c82b0..082d3608 100644 --- a/src/Spring/Spring.Core/Objects/Factory/IHierarchicalObjectFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/IHierarchicalObjectFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -16,12 +16,6 @@ * limitations under the License. */ -#endregion - -#region Imports - - - #endregion namespace Spring.Objects.Factory @@ -57,4 +51,4 @@ namespace Spring.Objects.Factory /// bool ContainsLocalObject(string name); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/IListableObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/IListableObjectFactory.cs index 76d3a203..848424f4 100644 --- a/src/Spring/Spring.Core/Objects/Factory/IListableObjectFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/IListableObjectFactory.cs @@ -18,13 +18,6 @@ #endregion -#region Imports - -using System; -using System.Collections.Generic; - -#endregion - namespace Spring.Objects.Factory { /// @@ -101,7 +94,7 @@ namespace Spring.Objects.Factory /// /// to include parent factories in result /// - /// The names of all objects defined in this factory, if includeAncestors is true includes all + /// The names of all objects defined in this factory, if includeAncestors is true includes all /// objects defined in parent factories, or an empty array if none are defined. /// IReadOnlyList GetObjectDefinitionNames(bool includeAncestors); @@ -258,7 +251,7 @@ namespace Spring.Objects.Factory /// If the objects could not be created. /// IReadOnlyDictionary GetObjectsOfType(Type type); - + /// /// Return the object instances that match the given object /// (including subclasses), judging from either object @@ -344,4 +337,4 @@ namespace Spring.Objects.Factory /// IReadOnlyDictionary GetObjects(bool includePrototypes, bool includeFactoryObjects); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/IObjectDefinitionFactory.cs b/src/Spring/Spring.Core/Objects/Factory/IObjectDefinitionFactory.cs index e8860d31..7cd98ecd 100644 --- a/src/Spring/Spring.Core/Objects/Factory/IObjectDefinitionFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/IObjectDefinitionFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Objects.Factory.Support diff --git a/src/Spring/Spring.Core/Objects/Factory/IObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/IObjectFactory.cs index 4eac7afc..1d41218c 100644 --- a/src/Spring/Spring.Core/Objects/Factory/IObjectFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/IObjectFactory.cs @@ -20,9 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; - #endregion namespace Spring.Objects.Factory @@ -182,14 +179,14 @@ namespace Spring.Objects.Factory /// always return independent instances? /// /// This method returning false does not clearly indicate a singleton object. - /// It indicated non-independent instances, which may correspond to a scoped object as - /// well. use the IsSingleton property to explicitly check for a shared + /// It indicated non-independent instances, which may correspond to a scoped object as + /// well. use the IsSingleton property to explicitly check for a shared /// singleton instance. /// Translates aliases back to the corresponding canonical object name. Will ask the /// parent factory if the object can not be found in this factory instance. /// /// - /// + /// /// The name of the object to query /// /// true if the specified object name will always deliver independent instances; otherwise, false. @@ -318,7 +315,7 @@ namespace Spring.Objects.Factory /// If the object could not be created. /// object GetObject(string name); - + /// /// Return an instance (possibly shared or independent) of the given object name. /// @@ -387,7 +384,7 @@ namespace Spring.Objects.Factory /// If the supplied is . /// object GetObject(string name, object[] arguments); - + /// /// Return an instance (possibly shared or independent) of the given object name. /// @@ -427,7 +424,7 @@ namespace Spring.Objects.Factory /// If the supplied is . /// T GetObject(string name, object[] arguments); - + /// /// Return an instance (possibly shared or independent) of the given object name. /// @@ -652,9 +649,9 @@ namespace Spring.Objects.Factory /// public class BusinessObject /// { /// private IDao _dao; - /// + /// /// public BusinessObject() {} - /// + /// /// public IDao Dao /// { /// get { return _dao; } @@ -686,4 +683,4 @@ namespace Spring.Objects.Factory /// object ConfigureObject(object target, string name); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/IObjectNameAware.cs b/src/Spring/Spring.Core/Objects/Factory/IObjectNameAware.cs index 48771255..b52e8023 100644 --- a/src/Spring/Spring.Core/Objects/Factory/IObjectNameAware.cs +++ b/src/Spring/Spring.Core/Objects/Factory/IObjectNameAware.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -16,12 +16,6 @@ * limitations under the License. */ -#endregion - -#region Imports - - - #endregion namespace Spring.Objects.Factory diff --git a/src/Spring/Spring.Core/Objects/Factory/NoSuchObjectDefinitionException.cs b/src/Spring/Spring.Core/Objects/Factory/NoSuchObjectDefinitionException.cs index 46e13146..f5fcce9c 100644 --- a/src/Spring/Spring.Core/Objects/Factory/NoSuchObjectDefinitionException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/NoSuchObjectDefinitionException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Globalization; using System.Runtime.Serialization; using System.Security.Permissions; using Spring.Util; -#endregion - namespace Spring.Objects.Factory { /// @@ -208,4 +203,4 @@ namespace Spring.Objects.Factory #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/ObjectCreationException.cs b/src/Spring/Spring.Core/Objects/Factory/ObjectCreationException.cs index bb1bd09a..93110101 100644 --- a/src/Spring/Spring.Core/Objects/Factory/ObjectCreationException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/ObjectCreationException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Globalization; using System.Runtime.Serialization; using System.Security.Permissions; @@ -28,8 +25,6 @@ using System.Text; using Spring.Core; using Spring.Util; -#endregion - namespace Spring.Objects.Factory { /// @@ -51,7 +46,7 @@ namespace Spring.Objects.Factory } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -63,7 +58,7 @@ namespace Spring.Objects.Factory } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -78,7 +73,7 @@ namespace Spring.Objects.Factory } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -93,7 +88,7 @@ namespace Spring.Objects.Factory } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -112,7 +107,7 @@ namespace Spring.Objects.Factory } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -133,7 +128,7 @@ namespace Spring.Objects.Factory } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -160,7 +155,7 @@ namespace Spring.Objects.Factory } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -243,12 +238,12 @@ namespace Spring.Objects.Factory if (StringUtils.IsNullOrEmpty(callStack)) { return StringUtils.IsNullOrEmpty(resourceDescription) ? - string.Format( + string.Format( "Error creating object with name '{0}' : {1}", objectName, message) : - string.Format( + string.Format( "Error creating object with name '{0}' defined in '{1}' : {2}", objectName, resourceDescription, @@ -329,4 +324,4 @@ namespace Spring.Objects.Factory private string _resourceDescription = string.Empty; private string _objectName = string.Empty; } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/ObjectCurrentlyInCreationException.cs b/src/Spring/Spring.Core/Objects/Factory/ObjectCurrentlyInCreationException.cs index 432c6319..ebb616ee 100644 --- a/src/Spring/Spring.Core/Objects/Factory/ObjectCurrentlyInCreationException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/ObjectCurrentlyInCreationException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; using Spring.Util; -#endregion - namespace Spring.Objects.Factory { /// @@ -48,7 +43,7 @@ namespace Spring.Objects.Factory public const string DEFAULTMESSAGE = "Requested object is currently in creation: Is there an unresolvable circular reference?"; /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// public ObjectCurrentlyInCreationException() @@ -56,19 +51,19 @@ namespace Spring.Objects.Factory } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// /// The name of the object that triggered the exception. /// - public ObjectCurrentlyInCreationException(string objectName) + public ObjectCurrentlyInCreationException(string objectName) : this(null, objectName, null, null) { } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -83,7 +78,7 @@ namespace Spring.Objects.Factory } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -98,7 +93,7 @@ namespace Spring.Objects.Factory } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -116,7 +111,7 @@ namespace Spring.Objects.Factory } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -137,7 +132,7 @@ namespace Spring.Objects.Factory } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -158,8 +153,8 @@ namespace Spring.Objects.Factory string message, Exception rootCause) : base(resourceDescription, - objectName, - StringUtils.HasText(message) ? message : DEFAULTMESSAGE, + objectName, + StringUtils.HasText(message) ? message : DEFAULTMESSAGE, rootCause) { } @@ -180,4 +175,4 @@ namespace Spring.Objects.Factory { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/ObjectDefinitionException.cs b/src/Spring/Spring.Core/Objects/Factory/ObjectDefinitionException.cs index 78de64e2..88b3178a 100644 --- a/src/Spring/Spring.Core/Objects/Factory/ObjectDefinitionException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/ObjectDefinitionException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; using System.Security.Permissions; using Spring.Objects.Factory.Xml; -#endregion - namespace Spring.Objects.Factory { /// diff --git a/src/Spring/Spring.Core/Objects/Factory/ObjectDefinitionStoreException.cs b/src/Spring/Spring.Core/Objects/Factory/ObjectDefinitionStoreException.cs index 59119971..cb496b25 100644 --- a/src/Spring/Spring.Core/Objects/Factory/ObjectDefinitionStoreException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/ObjectDefinitionStoreException.cs @@ -1,24 +1,23 @@ #region License -/* - * Copyright 2002-2005 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. +/* + * Copyright 2002-2005 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 -using System; using System.Runtime.Serialization; using System.Security.Permissions; using Spring.Core.IO; diff --git a/src/Spring/Spring.Core/Objects/Factory/ObjectFactoryUtils.cs b/src/Spring/Spring.Core/Objects/Factory/ObjectFactoryUtils.cs index 0334a12a..2c51ae2f 100644 --- a/src/Spring/Spring.Core/Objects/Factory/ObjectFactoryUtils.cs +++ b/src/Spring/Spring.Core/Objects/Factory/ObjectFactoryUtils.cs @@ -18,15 +18,9 @@ #endregion -#region Imports - -using System; -using System.Collections.Generic; using System.Runtime.CompilerServices; using Spring.Util; -#endregion - namespace Spring.Objects.Factory { /// @@ -129,8 +123,8 @@ namespace Spring.Objects.Factory /// Will return unique names in case of overridden object definitions. ///

///

- /// Does consider objects created by s - /// if is set to true, + /// Does consider objects created by s + /// if is set to true, /// which means that s will get initialized. ///

/// @@ -443,4 +437,4 @@ namespace Spring.Objects.Factory throw new NoSuchObjectDefinitionException(type, "Expected single object but found " + objectsOfType.Count); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/ObjectInitializationException.cs b/src/Spring/Spring.Core/Objects/Factory/ObjectInitializationException.cs index 2ba4d759..8a16517e 100644 --- a/src/Spring/Spring.Core/Objects/Factory/ObjectInitializationException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/ObjectInitializationException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Objects.Factory { /// diff --git a/src/Spring/Spring.Core/Objects/Factory/ObjectIsNotAFactoryException.cs b/src/Spring/Spring.Core/Objects/Factory/ObjectIsNotAFactoryException.cs index 4648a97d..4a2b0a22 100644 --- a/src/Spring/Spring.Core/Objects/Factory/ObjectIsNotAFactoryException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/ObjectIsNotAFactoryException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Objects.Factory { /// diff --git a/src/Spring/Spring.Core/Objects/Factory/ObjectNotOfRequiredTypeException.cs b/src/Spring/Spring.Core/Objects/Factory/ObjectNotOfRequiredTypeException.cs index b56c32b8..8ea35775 100644 --- a/src/Spring/Spring.Core/Objects/Factory/ObjectNotOfRequiredTypeException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/ObjectNotOfRequiredTypeException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; using System.Security.Permissions; -#endregion - namespace Spring.Objects.Factory { /// /// Thrown when an object doesn't match the required . diff --git a/src/Spring/Spring.Core/Objects/Factory/Parsing/ObjectDefinitionParsingException.cs b/src/Spring/Spring.Core/Objects/Factory/Parsing/ObjectDefinitionParsingException.cs index 84fa4cb6..5c1c7270 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Parsing/ObjectDefinitionParsingException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Parsing/ObjectDefinitionParsingException.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Spring.Core.IO; diff --git a/src/Spring/Spring.Core/Objects/Factory/Parsing/Problem.cs b/src/Spring/Spring.Core/Objects/Factory/Parsing/Problem.cs index e3735825..c7036bd2 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Parsing/Problem.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Parsing/Problem.cs @@ -18,8 +18,6 @@ #endregion - -using System; using System.Text; using Spring.Util; diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractAutowireCapableObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractAutowireCapableObjectFactory.cs index 5d48abfa..453f6b2b 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractAutowireCapableObjectFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractAutowireCapableObjectFactory.cs @@ -14,16 +14,10 @@ * limitations under the License. */ -using System; using System.Collections; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Globalization; using System.Reflection; -using System.Runtime.Serialization; - -using Common.Logging; - using Spring.Collections; using Spring.Core.TypeResolution; using Spring.Objects.Factory.Config; @@ -56,24 +50,24 @@ namespace Spring.Objects.Factory.Support [Serializable] public abstract class AbstractAutowireCapableObjectFactory : AbstractObjectFactory, IAutowireCapableObjectFactory { - + private IInstantiationStrategy instantiationStrategy = new MethodInjectingInstantiationStrategy(); /// - /// Cache of filtered PropertyInfos: object Type -> PropertyInfo array + /// Cache of filtered PropertyInfos: object Type -> PropertyInfo array /// private readonly ConcurrentDictionary> filteredPropertyDescriptorsCache = new ConcurrentDictionary>(); /// /// Dependency interfaces to ignore on dependency check and autowire, as Set of - /// Class objects. By default, only the IObjectFactoryAware and IObjectNameAware + /// Class objects. By default, only the IObjectFactoryAware and IObjectNameAware /// interfaces are ignored. /// private readonly HybridSet ignoredDependencyInterfaces = new HybridSet(); [NonSerialized] private ObjectDefinitionValueResolver cachedValueResolver; - + /// /// The used during the invocation and /// searching for of methods. @@ -155,14 +149,14 @@ namespace Spring.Objects.Factory.Support /// /// Determines the of the object defined - /// by the supplied object . + /// by the supplied object . /// /// /// The name associated with the supplied object . /// /// /// The - /// that the is to be determined for. + /// that the is to be determined for. /// /// /// The of the object defined by the supplied @@ -944,7 +938,7 @@ namespace Spring.Objects.Factory.Support } /// - /// Remove the specified singleton from the singleton cache that has + /// Remove the specified singleton from the singleton cache that has /// been added before by a call to /// /// the name of the object to remove from the cache. @@ -1009,7 +1003,7 @@ namespace Spring.Objects.Factory.Support InitObjectWrapper(instanceWrapper); } return instanceWrapper; - + */ } @@ -1386,8 +1380,8 @@ namespace Spring.Objects.Factory.Support } /// - /// Destroys all of the objects registered as dependant on the - /// object (definition) identified by the supplied . + /// Destroys all of the objects registered as dependant on the + /// object (definition) identified by the supplied . /// /// /// The name of the root object (definition) that is itself being destroyed. @@ -1472,7 +1466,7 @@ namespace Spring.Objects.Factory.Support // } // else if (argumentValue is IObjectDefinition) // { - // // resolve plain IObjectDefinition, without contained name: use dummy name... + // // resolve plain IObjectDefinition, without contained name: use dummy name... // IObjectDefinition def = (IObjectDefinition)argumentValue; // resolvedValue = ResolveInnerObjectDefinition(name, "(inner object)", argumentName, def, definition.IsSingleton); // @@ -1975,7 +1969,7 @@ namespace Spring.Objects.Factory.Support /// /// if dependency resolution failed public abstract object ResolveDependency( - DependencyDescriptor descriptor, + DependencyDescriptor descriptor, string objectName, IList autowiredObjectNames); } diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractMethodReplacer.cs b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractMethodReplacer.cs index a71c6fe9..2326cc6d 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractMethodReplacer.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractMethodReplacer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Reflection; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -93,7 +88,7 @@ namespace Spring.Objects.Factory.Support /// /// Helper method for subclasses to retrieve the appropriate /// for the - /// supplied . + /// supplied . /// /// /// The to use to retrieve diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectDefinition.cs b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectDefinition.cs index 49a46fc6..60684f02 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectDefinition.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectDefinition.cs @@ -14,8 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.Reflection; @@ -911,4 +909,4 @@ namespace Spring.Objects.Factory.Support info.AddValue("factoryObjectName", factoryObjectName); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectDefinitionReader.cs b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectDefinitionReader.cs index 668a983e..9e43d50f 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectDefinitionReader.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectDefinitionReader.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using Common.Logging; using Spring.Core.IO; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -208,10 +203,10 @@ namespace Spring.Objects.Factory.Support /// /// Loads the object definitions from the specified resource location. /// - /// The resource location, to be loaded with the + /// The resource location, to be loaded with the /// IResourceLoader location . /// - /// The number of object definitions found + /// The number of object definitions found /// public int LoadObjectDefinitions(string location) { @@ -245,7 +240,7 @@ namespace Spring.Objects.Factory.Support /// The the resource locations to be loaded with the /// IResourceLoader of this object definition reader. /// - /// The number of object definitions found + /// The number of object definitions found /// public int LoadObjectDefinitions(string[] locations) { @@ -269,4 +264,4 @@ namespace Spring.Objects.Factory.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs index 7cfa20e0..f56fc24e 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/AbstractObjectFactory.cs @@ -14,10 +14,8 @@ * limitations under the License. */ -using System; using System.Collections; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; @@ -30,7 +28,6 @@ using Spring.Objects.Factory.Config; using Spring.Threading; using Spring.Util; using System.Threading; -using System.Linq; using System.Runtime.Serialization; namespace Spring.Objects.Factory.Support @@ -139,7 +136,7 @@ namespace Spring.Objects.Factory.Support singletonsInCreation = new OrderedDictionary(comparer); prototypesInCreation = new LogicalThreadContextSetVariable(); } - + [OnDeserializing] private void OnDeserializing(StreamingContext c) { @@ -200,7 +197,7 @@ namespace Spring.Objects.Factory.Support /// Returns, whether this object factory instance contains objects. /// protected bool HasDestructionAwareObjectPostProcessors => hasDestructionAwareObjectPostProcessors; - + /// /// Check whether this factory's bean creation phase already started, /// i.e. whether any bean has been marked as created in the meantime. @@ -500,15 +497,15 @@ namespace Spring.Objects.Factory.Support { // handle aliasing... string canonicalName = (string) aliasMap[objectName]; - return canonicalName ?? objectName; + return canonicalName ?? objectName; } return objectName; } /// - /// Ensures, that the given name is prefixed with - /// if it incidentially already starts with this prefix. This avoids troubles when dereferencing + /// Ensures, that the given name is prefixed with + /// if it incidentially already starts with this prefix. This avoids troubles when dereferencing /// the object name during /// protected string OriginalObjectName(string name) @@ -781,7 +778,7 @@ namespace Spring.Objects.Factory.Support return null; } } - + /// /// Mark the specified bean as already created (or about to be created). /// @@ -808,9 +805,9 @@ namespace Spring.Objects.Factory.Support } } } - + /// - /// Perform appropriate cleanup of cached metadata after bean creation failed. + /// Perform appropriate cleanup of cached metadata after bean creation failed. /// /// The name of the object protected void CleanupAfterObjectCreationFailure(string objectName) @@ -1402,7 +1399,7 @@ namespace Spring.Objects.Factory.Support /// /// Determines the of the object defined - /// by the supplied object . + /// by the supplied object . /// /// ///

@@ -1420,7 +1417,7 @@ namespace Spring.Objects.Factory.Support /// /// /// The - /// that the is to be determined for. + /// that the is to be determined for. /// /// /// The of the object defined by the supplied @@ -1566,7 +1563,7 @@ namespace Spring.Objects.Factory.Support */ } } - + ///

/// Remove the merged bean definition for the specified bean, /// recreating it on next access. @@ -1576,7 +1573,7 @@ namespace Spring.Objects.Factory.Support { mergedObjectDefinitions.TryRemove(objectName, out _); } - + /// /// Clear the merged object definition cache, removing entries for objects /// which are not considered eligible for full metadata caching yet. @@ -1599,7 +1596,7 @@ namespace Spring.Objects.Factory.Support } /// - /// Gets the temporary object that is placed + /// Gets the temporary object that is placed /// into the singleton cache during object resolution. /// protected object TemporarySingletonPlaceHolder => CurrentlyInCreation; @@ -1631,7 +1628,7 @@ namespace Spring.Objects.Factory.Support private bool hasInstantiationAwareObjectPostProcessors; /// - /// Indicates whether any IDestructionAwareBeanPostProcessors have been registered + /// Indicates whether any IDestructionAwareBeanPostProcessors have been registered /// private bool hasDestructionAwareObjectPostProcessors; @@ -1641,7 +1638,7 @@ namespace Spring.Objects.Factory.Support private ConcurrentDictionary> singletonLocks; /// - /// Set of registered singletons, containing the instance names in registration order + /// Set of registered singletons, containing the instance names in registration order /// private HashSet registeredSingletons = new HashSet(); @@ -1693,7 +1690,7 @@ namespace Spring.Objects.Factory.Support /// /// Is this object a singleton? /// - /// + /// public bool IsSingleton(string name) { string objectName = TransformedObjectName(name); @@ -1772,7 +1769,7 @@ namespace Spring.Objects.Factory.Support IObjectFactory parentFactory = ParentObjectFactory; if (parentFactory != null && !ContainsObjectDefinition(objectName)) { - // No object definition found in this factory -> delegate to parent + // No object definition found in this factory -> delegate to parent return parentFactory.IsPrototype(OriginalObjectName(name)); } @@ -1802,7 +1799,7 @@ namespace Spring.Objects.Factory.Support /// Does this object factory or one of its parent factories contain an object with the given name? /// /// - /// This method scans the object factory hierarchy starting with the current factory instance upwards. + /// This method scans the object factory hierarchy starting with the current factory instance upwards. /// Use if you want to explicitely check just this object factory instance. /// /// . @@ -2064,7 +2061,7 @@ namespace Spring.Objects.Factory.Support } /// - /// Return an instance (possibly shared or independent) of the given object name, + /// Return an instance (possibly shared or independent) of the given object name, /// optionally injecting dependencies. /// /// The name of the object to return. @@ -2102,7 +2099,7 @@ namespace Spring.Objects.Factory.Support const int indent = 3; bool hasErrors = false; var isDebugEnabled = log.IsDebugEnabled; - + try { string objectName = TransformedObjectName(name); @@ -2118,7 +2115,7 @@ namespace Spring.Objects.Factory.Support // those are cases, where singleton cache can be used if (arguments == null && !suppressConfigure) { - // eagerly check singleton cache for manually registered singletons... + // eagerly check singleton cache for manually registered singletons... object sharedInstance = GetSingleton(objectName); if (sharedInstance != null) { @@ -2226,7 +2223,7 @@ namespace Spring.Objects.Factory.Support } CleanupAfterObjectCreationFailure(name); - + hasErrors = true; if (log.IsErrorEnabled) { @@ -2655,7 +2652,7 @@ namespace Spring.Objects.Factory.Support } } /// - /// Tries to find a cached object for the specified name. + /// Tries to find a cached object for the specified name. /// /// Teh object name to look for. /// The cached object if found, otherwise. @@ -2709,7 +2706,7 @@ namespace Spring.Objects.Factory.Support { return singletonLocks.GetOrAdd(objectName, key => new Lazy(() => new object())).Value; } - + [Serializable] private class LogicalThreadContextSetVariable : IDisposable { @@ -2735,16 +2732,16 @@ namespace Spring.Objects.Factory.Support } /// - /// Makes a distinction between sort order and object identity. + /// Makes a distinction between sort order and object identity. /// This is important when used with , since most /// implementations assume Order == Identity /// [Serializable] private class ObjectOrderComparator : OrderComparator { - public static readonly ObjectOrderComparator ObjectOrderComparatorInstance = new ObjectOrderComparator(); + public static readonly ObjectOrderComparator ObjectOrderComparatorInstance = new ObjectOrderComparator(); /// - /// Handle the case when both objects have equal sort order priority. By default returns 0, + /// Handle the case when both objects have equal sort order priority. By default returns 0, /// but may be overriden for handling special cases. /// /// The first object to compare. @@ -2764,4 +2761,4 @@ namespace Spring.Objects.Factory.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/AutowireCandidateQualifier.cs b/src/Spring/Spring.Core/Objects/Factory/Support/AutowireCandidateQualifier.cs index ce160eb6..68f0e139 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/AutowireCandidateQualifier.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/AutowireCandidateQualifier.cs @@ -14,7 +14,6 @@ /// limitations under the License. */ -using System; using System.Diagnostics; namespace Spring.Objects.Factory.Support diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/AutowireUtils.cs b/src/Spring/Spring.Core/Objects/Factory/Support/AutowireUtils.cs index e9ed2185..52ca54d9 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/AutowireUtils.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/AutowireUtils.cs @@ -14,9 +14,7 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; using Spring.Collections; @@ -78,13 +76,13 @@ namespace Spring.Objects.Factory.Support { return rootObjectDefinition.defaultConstructor; } - + const BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic - | BindingFlags.Instance + | BindingFlags.Instance | BindingFlags.DeclaredOnly; - + ConstructorInfo[] constructors; if (minimumArgumentCount > 0) { @@ -176,7 +174,7 @@ namespace Spring.Objects.Factory.Support /// /// /// Determines a weight that represents the class hierarchy difference between types and - /// arguments. The following a an example based on the Java class hierarchy for Integer. + /// arguments. The following a an example based on the Java class hierarchy for Integer. /// A direct match, i.e. type Integer -> arg of class Integer, does not increase /// the result - all direct matches means weight 0. A match between type Object and arg of /// class Integer would increase the weight by 2, due to the superclass 2 steps up in the @@ -209,7 +207,7 @@ namespace Spring.Objects.Factory.Support { result = result + 2; superType = null; - } + } if (paramType.IsAssignableFrom(superType)) { result = result + 2; @@ -266,7 +264,7 @@ namespace Spring.Objects.Factory.Support private sealed class ConstructorComparer : IComparer { internal static readonly ConstructorComparer Instance = new ConstructorComparer(); - + public int Compare(object lhs, object rhs) { ConstructorInfo lhsCtor = (ConstructorInfo) lhs; @@ -325,7 +323,7 @@ namespace Spring.Objects.Factory.Support foreach (Type interfaceType in interfaces) { if (interfaceType.IsAssignableFrom(targetType) && - ReflectionUtils.GetMethod(interfaceType, setter.Name, ReflectionUtils.GetParameterTypes(setter)) != null) + ReflectionUtils.GetMethod(interfaceType, setter.Name, ReflectionUtils.GetParameterTypes(setter)) != null) { return true; } @@ -366,4 +364,4 @@ namespace Spring.Objects.Factory.Support return unsatisfiedDependenciesList; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/ChildObjectDefinition.cs b/src/Spring/Spring.Core/Objects/Factory/Support/ChildObjectDefinition.cs index 278b9ca5..28f5b1f4 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/ChildObjectDefinition.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/ChildObjectDefinition.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Text; using Spring.Objects.Factory.Config; using Spring.Util; @@ -227,4 +226,4 @@ namespace Spring.Objects.Factory.Support private string parentName; } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/ConstructorResolver.cs b/src/Spring/Spring.Core/Objects/Factory/Support/ConstructorResolver.cs index ad41d1d5..d813fd07 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/ConstructorResolver.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/ConstructorResolver.cs @@ -14,9 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; -using System.Globalization; using System.Reflection; using Common.Logging; using Spring.Collections; @@ -26,12 +23,10 @@ using Spring.Core.TypeResolution; using Spring.Objects.Factory.Config; using Spring.Util; -using System.Linq; - namespace Spring.Objects.Factory.Support { /// - /// Helper class for resolving constructors and factory methods. + /// Helper class for resolving constructors and factory methods. /// Performs constructor resolution through argument matching. /// /// @@ -69,7 +64,7 @@ namespace Spring.Objects.Factory.Support } /// - /// "autowire constructor" (with constructor arguments by type) behavior. + /// "autowire constructor" (with constructor arguments by type) behavior. /// Also applied if explicit constructor argument values are specified, /// matching all remaining arguments with objects from the object factory. /// @@ -150,7 +145,7 @@ namespace Spring.Objects.Factory.Support wrapper = new ObjectWrapper(); minNrOfArgs = ResolveConstructorArguments(objectName, rod, wrapper, cargs, resolvedValues); } - // Take specified constructors, if any. + // Take specified constructors, if any. ConstructorInfo[] candidates = chosenConstructors ?? AutowireUtils.GetConstructors(rod, 0); AutowireUtils.SortConstructors(candidates); int minTypeDiffWeight = int.MaxValue; @@ -182,11 +177,11 @@ namespace Spring.Objects.Factory.Support //need to check for null as indicator of no ctor arg match instead of using exceptions for flow //control as in the Java implementation args = CreateArgumentArray( - objectName, - rod, - resolvedValues, - wrapper, - paramTypes, + objectName, + rod, + resolvedValues, + wrapper, + paramTypes, candidate, autowiring, out var unsatisfiedDependencyExceptionData); @@ -375,18 +370,18 @@ namespace Spring.Objects.Factory.Support /// information for use in throwing a UnsatisfiedDependencyException by the caller. This avoids using /// exceptions for flow control as in the original implementation. private ArgumentsHolder CreateArgumentArray( - string objectName, + string objectName, RootObjectDefinition rod, - ConstructorArgumentValues resolvedValues, - ObjectWrapper wrapper, - Type[] paramTypes, - MethodBase methodOrCtorInfo, - bool autowiring, + ConstructorArgumentValues resolvedValues, + ObjectWrapper wrapper, + Type[] paramTypes, + MethodBase methodOrCtorInfo, + bool autowiring, out UnsatisfiedDependencyExceptionData unsatisfiedDependencyExceptionData) { string GetMethodType() { - return methodOrCtorInfo is ConstructorInfo ? "constructor" : "factory method"; + return methodOrCtorInfo is ConstructorInfo ? "constructor" : "factory method"; } unsatisfiedDependencyExceptionData = null; @@ -408,7 +403,7 @@ namespace Spring.Objects.Factory.Support string parameterName = argTypes[paramIndex].Name; // If we couldn't find a direct match and are not supposed to autowire, // let's try the next generic, untyped argument value as fallback: - // it could match after type conversion (for example, String -> int). + // it could match after type conversion (for example, String -> int). ConstructorArgumentValues.ValueHolder valueHolder = null; if (resolvedValues.GetNamedArgumentValue(parameterName) != null) { @@ -495,7 +490,7 @@ namespace Spring.Objects.Factory.Support private object ResolveAutoWiredArgument( MethodParameter methodParameter, - string objectName, + string objectName, List autowiredObjectNames) { return autowireFactory.ResolveDependency( @@ -550,7 +545,7 @@ namespace Spring.Objects.Factory.Support if (index < 0) { throw new ObjectCreationException( - definition.ResourceDescription, + definition.ResourceDescription, objectName, $"Invalid constructor argument index: {index}"); } @@ -663,7 +658,7 @@ namespace Spring.Objects.Factory.Support } return new ArgumentsHolder(args); } - + public static ArgumentsHolder Create(int size) { if (size == 0) diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/DefaultListableObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/Support/DefaultListableObjectFactory.cs index 8a9e142d..1c1143fc 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/DefaultListableObjectFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/DefaultListableObjectFactory.cs @@ -14,10 +14,8 @@ * limitations under the License. */ -using System; using System.Collections; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Globalization; using Spring.Collections.Generic; using Spring.Core; diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/DefaultObjectDefinitionFactory.cs b/src/Spring/Spring.Core/Objects/Factory/Support/DefaultObjectDefinitionFactory.cs index 3b2cb902..fc687c14 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/DefaultObjectDefinitionFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/DefaultObjectDefinitionFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,8 +14,6 @@ * limitations under the License. */ -using System; - using Spring.Core.TypeResolution; using Spring.Util; @@ -41,7 +39,7 @@ namespace Spring.Objects.Factory.Support /// /// instances. /// - /// /// If no parent is specified, a RootObjectDefinition is created, otherwise a + /// /// If no parent is specified, a RootObjectDefinition is created, otherwise a /// ChildObjectDefinition. /// The of the defined object. /// The name of the parent object definition (if any). @@ -67,7 +65,7 @@ namespace Spring.Objects.Factory.Support if (StringUtils.IsNullOrEmpty(parent)) { if (objectType != null) - { + { return new RootObjectDefinition(objectType); } @@ -95,4 +93,4 @@ namespace Spring.Objects.Factory.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/DefaultObjectNameGenerator.cs b/src/Spring/Spring.Core/Objects/Factory/Support/DefaultObjectNameGenerator.cs index 1c693a44..3f4bdf9b 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/DefaultObjectNameGenerator.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/DefaultObjectNameGenerator.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Objects.Factory.Config; namespace Spring.Objects.Factory.Support diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/DelegateInvokingFactoryObject.cs b/src/Spring/Spring.Core/Objects/Factory/Support/DelegateInvokingFactoryObject.cs index 2fb656bd..267be067 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/DelegateInvokingFactoryObject.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/DelegateInvokingFactoryObject.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects.Factory.Support { /// @@ -90,4 +88,4 @@ namespace Spring.Objects.Factory.Support get { return _isSingleton; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/DelegatingMethodReplacer.cs b/src/Spring/Spring.Core/Objects/Factory/Support/DelegatingMethodReplacer.cs index 02eabf9c..9ce08eb2 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/DelegatingMethodReplacer.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/DelegatingMethodReplacer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Reflection; -#endregion - namespace Spring.Objects.Factory.Support { /// diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/DependencyCheckingMode.cs b/src/Spring/Spring.Core/Objects/Factory/Support/DependencyCheckingMode.cs index a45e6ac7..6d9cc10d 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/DependencyCheckingMode.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/DependencyCheckingMode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,6 @@ #endregion -#region Imports - - - -#endregion - -using System; - namespace Spring.Objects.Factory.Support { /// @@ -33,7 +25,7 @@ namespace Spring.Objects.Factory.Support { /// /// Rick Evans (.NET) [Serializable] - public enum DependencyCheckingMode + public enum DependencyCheckingMode { /// /// DO not do any dependency checking. diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/DisposableObjectAdapter.cs b/src/Spring/Spring.Core/Objects/Factory/Support/DisposableObjectAdapter.cs index 4c9b5c0f..1b7de22e 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/DisposableObjectAdapter.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/DisposableObjectAdapter.cs @@ -1,6 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Linq; using System.Reflection; using Common.Logging; using Spring.Objects.Factory.Config; @@ -48,7 +45,7 @@ namespace Spring.Objects.Factory.Support string definedDestroyMethodName = objectDefinition.DestroyMethodName; - if (definedDestroyMethodName != null && !(this.invokeDisposableObject && "Destroy".Equals(definedDestroyMethodName))) // && !beanDefinition.isExternallyManagedDestroyMethod(destroyMethodName)) + if (definedDestroyMethodName != null && !(this.invokeDisposableObject && "Destroy".Equals(definedDestroyMethodName))) // && !beanDefinition.isExternallyManagedDestroyMethod(destroyMethodName)) { this.destroyMethodName = definedDestroyMethodName; this.destroyMethod = DetermineDestroyMethod(); @@ -250,4 +247,4 @@ namespace Spring.Objects.Factory.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/GenericObjectDefinition.cs b/src/Spring/Spring.Core/Objects/Factory/Support/GenericObjectDefinition.cs index 9cdaf1f6..ebfa7f0f 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/GenericObjectDefinition.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/GenericObjectDefinition.cs @@ -1,24 +1,23 @@ #region License -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. +/* + * Copyright 2002-2010 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 -using System; using Spring.Objects.Factory.Config; namespace Spring.Objects.Factory.Support @@ -31,7 +30,7 @@ namespace Spring.Objects.Factory.Support /// /// In general, use this class for the purpose of /// registering user-visible object definitions (which a post-processor might operate on, - /// potentially even reconfiguring the parent name). + /// potentially even reconfiguring the parent name). /// Use / /// where parent/child relationships happen to be pre-determined. /// @@ -99,7 +98,7 @@ namespace Spring.Objects.Factory.Support // } /// - /// Returns a representation of this + /// Returns a representation of this /// for debugging purposes. /// public override string ToString() @@ -107,4 +106,4 @@ namespace Spring.Objects.Factory.Support return "Generic Object:" + base.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/IAutowireCandidateResolver.cs b/src/Spring/Spring.Core/Objects/Factory/Support/IAutowireCandidateResolver.cs index 4dfeff37..3d5e9ab6 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/IAutowireCandidateResolver.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/IAutowireCandidateResolver.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Objects.Factory.Config; namespace Spring.Objects.Factory.Support @@ -33,7 +32,7 @@ namespace Spring.Objects.Factory.Support public interface IAutowireCandidateResolver { /// - /// Determines whether the given object definition qualifies as an + /// Determines whether the given object definition qualifies as an /// autowire candidate for the given dependency. /// /// The object definition including object name and aliases. @@ -54,4 +53,4 @@ namespace Spring.Objects.Factory.Support Object GetSuggestedValue(DependencyDescriptor descriptor); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/IConfigurableObjectDefinition.cs b/src/Spring/Spring.Core/Objects/Factory/Support/IConfigurableObjectDefinition.cs index cbdcb424..0a5ab838 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/IConfigurableObjectDefinition.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/IConfigurableObjectDefinition.cs @@ -18,15 +18,8 @@ #endregion -#region Imports - -using System; -using System.Collections.Generic; - using Spring.Objects.Factory.Config; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -46,7 +39,7 @@ namespace Spring.Objects.Factory.Support /// Return the constructor argument values for this object. /// new ConstructorArgumentValues ConstructorArgumentValues { get; set; } - + /// /// The method overrides (if any) for this object. /// @@ -100,7 +93,7 @@ namespace Spring.Objects.Factory.Support /// of the object definition (if any). /// new string ObjectTypeName { get; set; } - + /// /// Return whether this a Singleton, with a single, shared instance /// returned on all calls. @@ -209,4 +202,4 @@ namespace Spring.Objects.Factory.Support /// new bool IsAutowireCandidate { get; set; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/IInstantiationStrategy.cs b/src/Spring/Spring.Core/Objects/Factory/Support/IInstantiationStrategy.cs index 2827021d..4197a0ec 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/IInstantiationStrategy.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/IInstantiationStrategy.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,8 @@ #endregion -#region Imports - using System.Reflection; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -115,4 +111,4 @@ namespace Spring.Objects.Factory.Support RootObjectDefinition definition, string name, IObjectFactory factory, MethodInfo factoryMethod, object[] arguments); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/IMethodReplacer.cs b/src/Spring/Spring.Core/Objects/Factory/Support/IMethodReplacer.cs index d43eb627..f2993488 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/IMethodReplacer.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/IMethodReplacer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,8 @@ #endregion -#region Imports - using System.Reflection; -#endregion - namespace Spring.Objects.Factory.Support { /// diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/IObjectDefinitionReader.cs b/src/Spring/Spring.Core/Objects/Factory/Support/IObjectDefinitionReader.cs index 2ac183a0..564e4c6c 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/IObjectDefinitionReader.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/IObjectDefinitionReader.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using Spring.Core.IO; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -32,14 +27,14 @@ namespace Spring.Objects.Factory.Support { /// /// Juergen Hoeller /// Rick Evans - public interface IObjectDefinitionReader + public interface IObjectDefinitionReader { /// /// Gets the /// /// instance that this reader works on. /// - IObjectDefinitionRegistry Registry + IObjectDefinitionRegistry Registry { get; } @@ -48,7 +43,7 @@ namespace Spring.Objects.Factory.Support { /// The against which any class names /// will be resolved into instances. /// - AppDomain Domain + AppDomain Domain { get; } @@ -58,7 +53,7 @@ namespace Spring.Objects.Factory.Support { /// objects (wihtout explicit object name specified). /// IObjectNameGenerator ObjectNameGenerator - { + { get; } @@ -70,7 +65,7 @@ namespace Spring.Objects.Factory.Support { /// a convenience to avoid explicit ResourceLoader handling. /// The resource loader. IResourceLoader ResourceLoader - { + { get; } @@ -106,10 +101,10 @@ namespace Spring.Objects.Factory.Support { /// /// Loads the object definitions from the specified resource location. /// - /// The resource location, to be loaded with the + /// The resource location, to be loaded with the /// IResourceLoader location . /// - /// The number of object definitions found + /// The number of object definitions found /// int LoadObjectDefinitions(string location); @@ -119,7 +114,7 @@ namespace Spring.Objects.Factory.Support { /// The the resource locations to be loaded with the /// IResourceLoader of this object definition reader. /// - /// The number of object definitions found + /// The number of object definitions found /// int LoadObjectDefinitions(string[] locations); } diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/IObjectDefinitionRegistry.cs b/src/Spring/Spring.Core/Objects/Factory/Support/IObjectDefinitionRegistry.cs index 53ca3556..d4f0e850 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/IObjectDefinitionRegistry.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/IObjectDefinitionRegistry.cs @@ -18,14 +18,12 @@ #endregion -using System.Collections.Generic; - using Spring.Objects.Factory.Config; namespace Spring.Objects.Factory.Support { /// - /// Interface for registries that hold object definitions, i.e. + /// Interface for registries that hold object definitions, i.e. /// /// and /// @@ -40,10 +38,10 @@ namespace Spring.Objects.Factory.Support /// /// Juergen Hoeller /// Rick Evans (.NET) - public interface IObjectDefinitionRegistry + public interface IObjectDefinitionRegistry { /// - /// Determine whether the given object name is already in use within this registry, + /// Determine whether the given object name is already in use within this registry, /// i.e. whether there is a local object or alias registered under this name. /// bool IsObjectNameInUse(string objectName); @@ -55,7 +53,7 @@ namespace Spring.Objects.Factory.Support /// The number of objects defined in the registry. /// int ObjectDefinitionCount { get; } - + /// /// Return the names of all objects defined in this registry. /// @@ -87,7 +85,7 @@ namespace Spring.Objects.Factory.Support /// given name. /// bool ContainsObjectDefinition (string name); - + /// /// Returns the /// @@ -107,7 +105,7 @@ namespace Spring.Objects.Factory.Support /// In case of errors. /// IObjectDefinition GetObjectDefinition (string name); - + /// /// Register a new object definition with this registry. /// Must support @@ -150,7 +148,7 @@ namespace Spring.Objects.Factory.Support /// If there's no such object definition. /// IReadOnlyList GetAliases (string name); - + /// /// Given a object name, create an alias. We typically use this method to /// support names that are illegal within XML ids (used for object names). diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/Interface1.cs b/src/Spring/Spring.Core/Objects/Factory/Support/Interface1.cs index a498c43a..550f1479 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/Interface1.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/Interface1.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Objects.Factory.Config; namespace Spring.Objects.Factory.Support @@ -47,7 +46,7 @@ namespace Spring.Objects.Factory.Support /// The name of the object /// void PostProcessMergedObjectDefinition(RootObjectDefinition objectDefinition, Type objectType, string objectName); - + /// /// A notification that the object definition for the specified name has been reset, /// and that this post-processor should clear any metadata for the affected object. @@ -58,4 +57,4 @@ namespace Spring.Objects.Factory.Support /// The name of the object void ResetObjectDefinition(string objectName); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/LookupMethodOverride.cs b/src/Spring/Spring.Core/Objects/Factory/Support/LookupMethodOverride.cs index 56722776..4c1db91c 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/LookupMethodOverride.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/LookupMethodOverride.cs @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Reflection; using System.Text; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -112,4 +107,4 @@ namespace Spring.Objects.Factory.Support .Append("'.").ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/LookupMethodReplacer.cs b/src/Spring/Spring.Core/Objects/Factory/Support/LookupMethodReplacer.cs index be8f4d72..c0c28f0c 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/LookupMethodReplacer.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/LookupMethodReplacer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,8 @@ #endregion -#region Imports - using System.Reflection; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -83,4 +79,4 @@ namespace Spring.Objects.Factory.Support return GetObject(((LookupMethodOverride) GetOverride(method)).ObjectName); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/MethodInjectingInstantiationStrategy.cs b/src/Spring/Spring.Core/Objects/Factory/Support/MethodInjectingInstantiationStrategy.cs index 60568c9d..844bcbae 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/MethodInjectingInstantiationStrategy.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/MethodInjectingInstantiationStrategy.cs @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Globalization; using System.Reflection; @@ -28,8 +25,6 @@ using System.Reflection.Emit; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -53,7 +48,7 @@ namespace Spring.Objects.Factory.Support /// The name of the dynamic assembly that holds dynamically created code /// private const string DYNAMIC_ASSEMBLY_NAME = "Spring.MethodInjected"; - + /// /// A cache of generated instances, keyed on /// the object name for which the was generated. @@ -81,7 +76,7 @@ namespace Spring.Objects.Factory.Support /// An instance of the object described by the supplied /// from the supplied . /// - /// + /// protected override object InstantiateWithMethodInjection( RootObjectDefinition definition, string objectName, IObjectFactory factory) { @@ -116,7 +111,7 @@ namespace Spring.Objects.Factory.Support /// An instance of the object described by the supplied /// from the supplied . /// - /// + /// protected override object InstantiateWithMethodInjection( RootObjectDefinition definition, string objectName, IObjectFactory factory, ConstructorInfo constructor, object[] arguments) { @@ -187,7 +182,7 @@ namespace Spring.Objects.Factory.Support { lock (typeCache.SyncRoot) { - Type generatedType = (Type) typeCache[objectName]; + Type generatedType = (Type) typeCache[objectName]; if (generatedType == null) { #region Instrumentation @@ -281,10 +276,10 @@ namespace Spring.Objects.Factory.Support } /// - /// Builds a suitable for Method-Injection. + /// Builds a suitable for Method-Injection. /// /// - /// A suitable for Method-Injection. + /// A suitable for Method-Injection. /// public Type BuildType() { @@ -444,7 +439,7 @@ namespace Spring.Objects.Factory.Support il.Emit(OpCodes.Ret); } - /* + /* /// /// Defines the parameters to the method that is being overridden. /// @@ -571,7 +566,7 @@ namespace Spring.Objects.Factory.Support /// /// Simply generates the IL for a write only property for the - /// . + /// . /// /// /// The in which the property is defined. @@ -612,4 +607,4 @@ namespace Spring.Objects.Factory.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/MethodOverride.cs b/src/Spring/Spring.Core/Objects/Factory/Support/MethodOverride.cs index dd8191c5..ee55cae5 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/MethodOverride.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/MethodOverride.cs @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Reflection; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Support { /// diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/MethodOverrides.cs b/src/Spring/Spring.Core/Objects/Factory/Support/MethodOverrides.cs index c0a76996..85c34a07 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/MethodOverrides.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/MethodOverrides.cs @@ -14,10 +14,7 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; -using System.Linq; using System.Reflection; namespace Spring.Objects.Factory.Support @@ -176,4 +173,4 @@ namespace Spring.Objects.Factory.Support return GetEnumerator(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionBuilder.cs b/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionBuilder.cs index c9f84e18..be3c3131 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionBuilder.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionBuilder.cs @@ -14,8 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; using Spring.Objects.Factory.Config; namespace Spring.Objects.Factory.Support @@ -55,7 +53,7 @@ namespace Spring.Objects.Factory.Support builder.objectDefinition = new GenericObjectDefinition(); return builder; } - + /// /// Creates a new used to construct a . /// @@ -67,7 +65,7 @@ namespace Spring.Objects.Factory.Support builder.objectDefinition.ObjectType = objectType; return builder; } - + /// /// Creates a new used to construct a . /// @@ -79,7 +77,7 @@ namespace Spring.Objects.Factory.Support builder.objectDefinition.ObjectTypeName = objectTypeName; return builder; } - + /// /// Create a new ObjectDefinitionBuilder used to construct a root object definition. /// @@ -115,7 +113,7 @@ namespace Spring.Objects.Factory.Support return builder; - } + } /// /// Create a new ObjectDefinitionBuilder used to construct a root object definition. @@ -124,7 +122,7 @@ namespace Spring.Objects.Factory.Support /// Type of the object. /// A new ObjectDefinitionBuilder instance. public static ObjectDefinitionBuilder RootObjectDefinition(IObjectDefinitionFactory objectDefinitionFactory, - Type objectType) + Type objectType) { return RootObjectDefinition(objectDefinitionFactory, objectType, null); } @@ -140,7 +138,7 @@ namespace Spring.Objects.Factory.Support Type objectType, string factoryMethodName) { ObjectDefinitionBuilder builder = new ObjectDefinitionBuilder(); - + builder.objectDefinitionFactory = objectDefinitionFactory; builder.objectDefinition = @@ -401,4 +399,4 @@ namespace Spring.Objects.Factory.Support return this; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionReaderUtils.cs b/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionReaderUtils.cs index 668791eb..ce4b83f1 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionReaderUtils.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionReaderUtils.cs @@ -18,10 +18,6 @@ #endregion -#region Imports - -using System; -using System.Collections.Generic; using System.Text.RegularExpressions; using Spring.Objects.Factory.Config; @@ -29,8 +25,6 @@ using Spring.Objects.Factory.Xml; using Spring.Objects.Support; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -64,7 +58,7 @@ namespace Spring.Objects.Factory.Support ///

/// This is a convenience method that registers the /// - /// of the supplied under the + /// of the supplied under the /// /// property value of said . If the /// supplied has any @@ -288,4 +282,4 @@ namespace Spring.Objects.Factory.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionValidationException.cs b/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionValidationException.cs index 5b652415..8ad2a1ef 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionValidationException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionValidationException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - -namespace Spring.Objects.Factory.Support +namespace Spring.Objects.Factory.Support { ///

/// Thrown when the validation of an object definition failed. diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionValueResolver.cs b/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionValueResolver.cs index 72fe6402..9bee5699 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionValueResolver.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/ObjectDefinitionValueResolver.cs @@ -14,9 +14,7 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.Runtime.Remoting; using Common.Logging; @@ -128,7 +126,7 @@ namespace Spring.Objects.Factory.Support private object ResolvePropertyValue(string name, IObjectDefinition definition, string argumentName, object argumentValue) { object resolvedValue = null; - + // we must check the argument value to see whether it requires a runtime // reference to another object to be resolved. // if it does, we'll attempt to instantiate the object and set the reference. @@ -147,7 +145,7 @@ namespace Spring.Objects.Factory.Support } else if (argumentValue is IObjectDefinition def) { - // resolve plain IObjectDefinition, without contained name: use dummy name... + // resolve plain IObjectDefinition, without contained name: use dummy name... resolvedValue = ResolveInnerObjectDefinition(name, "(inner object)", argumentName, def, definition.IsSingleton); } @@ -243,7 +241,7 @@ namespace Spring.Objects.Factory.Support /// The resolved target type, if any. otherwise. protected virtual Type ResolveTargetType(TypedStringValue value) { - if (value.HasTargetType) + if (value.HasTargetType) { return value.TargetType; } @@ -374,4 +372,4 @@ namespace Spring.Objects.Factory.Support } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/PropertiesObjectDefinitionReader.cs b/src/Spring/Spring.Core/Objects/Factory/Support/PropertiesObjectDefinitionReader.cs index 154a2313..e6851819 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/PropertiesObjectDefinitionReader.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/PropertiesObjectDefinitionReader.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,20 +18,14 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Collections.Specialized; -using System.IO; using System.Resources; using Spring.Core.IO; using Spring.Objects.Factory.Config; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -270,10 +264,10 @@ namespace Spring.Objects.Factory.Support } /// - /// Registers object definitions contained in an + /// Registers object definitions contained in an /// using all property keys ( i.e. not filtering by prefix ) /// - /// The containing + /// The containing /// object definitions. /// /// diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/RootObjectDefinition.cs b/src/Spring/Spring.Core/Objects/Factory/Support/RootObjectDefinition.cs index f81f4fea..e1d590b7 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/RootObjectDefinition.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/RootObjectDefinition.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Reflection; using System.Runtime.Serialization; using Spring.Objects.Factory.Config; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -265,7 +260,7 @@ namespace Spring.Objects.Factory.Support /// Is always null for a . /// /// - /// It is safe to request this property's value. Setting any other value than null will + /// It is safe to request this property's value. Setting any other value than null will /// raise an . /// /// Raised on any attempt to set a non-null value on this property. @@ -315,4 +310,4 @@ namespace Spring.Objects.Factory.Support return $"{GetType().Name} : {base.ToString()}"; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/SimpleAutowireCandidateResolver.cs b/src/Spring/Spring.Core/Objects/Factory/Support/SimpleAutowireCandidateResolver.cs index 9df13e0f..5c291f5f 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/SimpleAutowireCandidateResolver.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/SimpleAutowireCandidateResolver.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Objects.Factory.Config; namespace Spring.Objects.Factory.Support @@ -59,4 +58,4 @@ namespace Spring.Objects.Factory.Support return null; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/SimpleInstantiationStrategy.cs b/src/Spring/Spring.Core/Objects/Factory/Support/SimpleInstantiationStrategy.cs index 2e5e87e9..02861d75 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/SimpleInstantiationStrategy.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/SimpleInstantiationStrategy.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Globalization; using System.Reflection; @@ -29,8 +26,6 @@ using Common.Logging; using Spring.Core.TypeResolution; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -45,7 +40,7 @@ namespace Spring.Objects.Factory.Support /// /// Rod Johnson /// Rick Evans (.NET) - /// + /// [Serializable] public class SimpleInstantiationStrategy : IInstantiationStrategy { @@ -307,4 +302,4 @@ namespace Spring.Objects.Factory.Support throw new InvalidOperationException("Method Injection not supported in SimpleInstantiationStrategy"); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Support/StaticListableObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/Support/StaticListableObjectFactory.cs index bf610f40..d2363b83 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Support/StaticListableObjectFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Support/StaticListableObjectFactory.cs @@ -1,12 +1,12 @@ /* * Copyright © 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -14,10 +14,7 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; - using Spring.Objects.Factory.Config; using Spring.Util; @@ -395,14 +392,14 @@ namespace Spring.Objects.Factory.Support /// always return independent instances? /// /// This method returning false does not clearly indicate a singleton object. - /// It indicated non-independent instances, which may correspond to a scoped object as - /// well. use the IsSingleton property to explicitly check for a shared + /// It indicated non-independent instances, which may correspond to a scoped object as + /// well. use the IsSingleton property to explicitly check for a shared /// singleton instance. /// Translates aliases back to the corresponding canonical object name. Will ask the /// parent factory if the object can not be found in this factory instance. /// /// - /// + /// /// The name of the object to query /// /// true if the specified object name will always deliver independent instances; otherwise, false. @@ -548,12 +545,12 @@ namespace Spring.Objects.Factory.Support /// /// to include parent factories in result /// - /// The names of all objects defined in this factory, if includeAncestors is true includes all + /// The names of all objects defined in this factory, if includeAncestors is true includes all /// objects defined in parent factories, or an empty array if none are defined. /// public IReadOnlyList GetObjectDefinitionNames(bool includeAncestors) { - throw new NotSupportedException("StaticListableObjectFactory does not contain object definitions."); + throw new NotSupportedException("StaticListableObjectFactory does not contain object definitions."); } /// @@ -919,7 +916,7 @@ namespace Spring.Objects.Factory.Support { Dictionary collector = new Dictionary(); DoGetObjectsOfType(typeof(T), includeFactoryObjects, includePrototypes, collector); - return collector; + return collector; } /// @@ -1026,4 +1023,4 @@ namespace Spring.Objects.Factory.Support { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/UnsatisfiedDependencyException.cs b/src/Spring/Spring.Core/Objects/Factory/UnsatisfiedDependencyException.cs index 32ca5c61..ab3e94d5 100644 --- a/src/Spring/Spring.Core/Objects/Factory/UnsatisfiedDependencyException.cs +++ b/src/Spring/Spring.Core/Objects/Factory/UnsatisfiedDependencyException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Objects.Factory { /// @@ -155,4 +150,4 @@ namespace Spring.Objects.Factory { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/AbstractObjectDefinitionParser.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/AbstractObjectDefinitionParser.cs index 440ec8b6..4dd5f28f 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/AbstractObjectDefinitionParser.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/AbstractObjectDefinitionParser.cs @@ -18,13 +18,10 @@ #endregion -#region Imports - using System.Xml; using Spring.Objects.Factory.Config; using Spring.Objects.Factory.Support; using Spring.Util; -#endregion namespace Spring.Objects.Factory.Xml { @@ -59,7 +56,7 @@ namespace Spring.Objects.Factory.Xml #region Properties /// - /// Gets a value indicating whether an ID should be generated instead of read + /// Gets a value indicating whether an ID should be generated instead of read /// from the passed in XmlElement. /// /// Note that this flag is about always generating an ID; the parser @@ -161,7 +158,7 @@ namespace Spring.Objects.Factory.Xml if (ShouldGenerateId) { return parserContext.ReaderContext.GenerateObjectName(definition); } - else { + else { string id = GetAttributeValue(element, ID_ATTRIBUTE); if (!StringUtils.HasText(id) && ShouldGenerateIdAsFallback) { id = parserContext.ReaderContext.GenerateObjectName(definition); @@ -184,46 +181,46 @@ namespace Spring.Objects.Factory.Xml /// to be registered as top level objects. /// /// - /// + /// /// The object definition to be registered. /// The registry that the bean is to be registered with. protected virtual void RegisterObjectDefinition(ObjectDefinitionHolder definition, IObjectDefinitionRegistry registry) { ObjectDefinitionReaderUtils.RegisterObjectDefinition(definition, registry); - } - - /// - /// Returns the value of the element's attribute or null, if the attribute is not specified. - /// - /// - /// This is a helper for bypassing the behavior of - /// to return if the attribute does not exist. - /// - protected static string GetAttributeValue(XmlElement element, string attributeName) - { - if (element.HasAttribute(attributeName)) - { - return element.GetAttribute(attributeName); - } - return null; - } - - /// - /// Returns the value of the element's attribute or , - /// if the attribute is not specified. - /// - /// - /// This is a helper for bypassing the behavior of - /// to return if the attribute does not exist. - /// - protected static string GetAttributeValue(XmlElement element, string attributeName, string defaultValue) - { - if (element.HasAttribute(attributeName)) - { - return element.GetAttribute(attributeName); - } - return defaultValue; - } + } + + /// + /// Returns the value of the element's attribute or null, if the attribute is not specified. + /// + /// + /// This is a helper for bypassing the behavior of + /// to return if the attribute does not exist. + /// + protected static string GetAttributeValue(XmlElement element, string attributeName) + { + if (element.HasAttribute(attributeName)) + { + return element.GetAttribute(attributeName); + } + return null; + } + + /// + /// Returns the value of the element's attribute or , + /// if the attribute is not specified. + /// + /// + /// This is a helper for bypassing the behavior of + /// to return if the attribute does not exist. + /// + protected static string GetAttributeValue(XmlElement element, string attributeName, string defaultValue) + { + if (element.HasAttribute(attributeName)) + { + return element.GetAttribute(attributeName); + } + return defaultValue; + } #endregion @@ -231,7 +228,7 @@ namespace Spring.Objects.Factory.Xml #region Abstract Methods /// - /// Central template method to actually parse the supplied XmlElement + /// Central template method to actually parse the supplied XmlElement /// into one or more IObjectDefinitions. /// /// The element that is to be parsed into one or more s diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/AbstractSingleObjectDefinitionParser.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/AbstractSingleObjectDefinitionParser.cs index 0b032ae2..36caeab3 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/AbstractSingleObjectDefinitionParser.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/AbstractSingleObjectDefinitionParser.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Xml; using Spring.Objects.Factory.Support; @@ -57,29 +56,29 @@ namespace Spring.Objects.Factory.Xml /// protected override AbstractObjectDefinition ParseInternal(XmlElement element, ParserContext parserContext) { - ObjectDefinitionBuilder builder = ObjectDefinitionBuilder.GenericObjectDefinition(); + ObjectDefinitionBuilder builder = ObjectDefinitionBuilder.GenericObjectDefinition(); string parentName = GetParentName(element); if (parentName != null) - { - builder.RawObjectDefinition.ParentName = parentName; + { + builder.RawObjectDefinition.ParentName = parentName; } Type objectType = GetObjectType(element); if (objectType != null) - { + { builder.RawObjectDefinition.ObjectType = objectType; } else - { - string objectTypeName = GetObjectTypeName(element); - if (objectTypeName != null) - { - builder.RawObjectDefinition.ObjectTypeName = objectTypeName; + { + string objectTypeName = GetObjectTypeName(element); + if (objectTypeName != null) + { + builder.RawObjectDefinition.ObjectTypeName = objectTypeName; } - } - - // TODO (EE) -// builder.getRawBeanDefinition().setSource(parserContext.extractSource(element)); + } + + // TODO (EE) +// builder.getRawBeanDefinition().setSource(parserContext.extractSource(element)); if (parserContext.IsNested) { @@ -96,17 +95,17 @@ namespace Spring.Objects.Factory.Xml } - /// - /// Determine the name for the parent of the currently parsed object, - /// in case of the current object being defined as a child object. - /// The default implementation returns null - /// indicating a root object definition. - /// - /// + /// + /// Determine the name for the parent of the currently parsed object, + /// in case of the current object being defined as a child object. + /// The default implementation returns null + /// indicating a root object definition. + /// + /// /// the name of the parent object for the currently parsed object. protected virtual string GetParentName(XmlElement element) - { - return null; + { + return null; } /// @@ -141,7 +140,7 @@ namespace Spring.Objects.Factory.Xml /// /// Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. /// - /// The default implementation delegates to the DoParse version without + /// The default implementation delegates to the DoParse version without /// ParameterContext argument. /// The element. /// The parser context. @@ -152,7 +151,7 @@ namespace Spring.Objects.Factory.Xml } /// - /// Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. + /// Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. /// /// The default implementation does nothing. /// The element. @@ -164,4 +163,4 @@ namespace Spring.Objects.Factory.Xml #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/DefaultObjectDefinitionDocumentReader.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/DefaultObjectDefinitionDocumentReader.cs index 171a89b7..12d9013c 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/DefaultObjectDefinitionDocumentReader.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/DefaultObjectDefinitionDocumentReader.cs @@ -14,9 +14,7 @@ * limitations under the License. */ -using System; using System.Globalization; -using System.IO; using System.Xml; using Common.Logging; using Spring.Core.IO; @@ -26,7 +24,7 @@ using Spring.Objects.Factory.Support; namespace Spring.Objects.Factory.Xml { /// - /// XML resource reader. + /// XML resource reader. /// /// ///

@@ -40,7 +38,7 @@ namespace Spring.Objects.Factory.Xml public class DefaultObjectDefinitionDocumentReader : IObjectDefinitionDocumentReader { ///

- /// The shared instance for this class (and derived classes). + /// The shared instance for this class (and derived classes). /// protected static readonly ILog log = LogManager.GetLogger(typeof(DefaultObjectDefinitionDocumentReader)); @@ -107,7 +105,7 @@ namespace Spring.Objects.Factory.Xml } /// - /// Parses object definitions starting at the given + /// Parses object definitions starting at the given /// using the passed . /// /// The root element to start parsing from. @@ -172,7 +170,7 @@ namespace Spring.Objects.Factory.Xml ///
protected virtual void ProcessAlias(XmlElement element) { - this.ParseAlias(element, this.ReaderContext.Registry); + this.ParseAlias(element, this.ReaderContext.Registry); } /// diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/INamespaceParser.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/INamespaceParser.cs index e0b6ef7b..f8ba9d12 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/INamespaceParser.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/INamespaceParser.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,9 @@ #endregion -#region Imports - using System.Xml; using Spring.Objects.Factory.Config; -#endregion - namespace Spring.Objects.Factory.Xml { @@ -95,4 +91,4 @@ namespace Spring.Objects.Factory.Xml /// gets returned. ObjectDefinitionHolder Decorate(XmlNode node, ObjectDefinitionHolder definition, ParserContext parserContext); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/NamespaceParserAttribute.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/NamespaceParserAttribute.cs index c041e9dd..e5d069da 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/NamespaceParserAttribute.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/NamespaceParserAttribute.cs @@ -18,12 +18,6 @@ #endregion -#region Imports - -using System; - -#endregion - namespace Spring.Objects.Factory.Xml { /// @@ -37,7 +31,7 @@ namespace Spring.Objects.Factory.Xml private string ns; private string schemaLocation; private Type schemaLocationAssemblyHint; - + /// /// Creates a new instance of . /// @@ -63,7 +57,7 @@ namespace Spring.Objects.Factory.Xml /// The default schema location for the configuration parser. /// /// - /// If the property is set, the will always resolve to an assembly-resource + /// If the property is set, the will always resolve to an assembly-resource /// and the set will be interpreted relative to this assembly. /// public string SchemaLocation @@ -76,7 +70,7 @@ namespace Spring.Objects.Factory.Xml /// Gets or sets a type from the assembly containing the schema /// /// - /// If this property is set, the will always resolve to an assembly-resource + /// If this property is set, the will always resolve to an assembly-resource /// and the will be interpreted relative to this assembly. /// public Type SchemaLocationAssemblyHint diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/NamespaceParserRegistry.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/NamespaceParserRegistry.cs index eb2a4a44..414ca01e 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/NamespaceParserRegistry.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/NamespaceParserRegistry.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Collections; using System.Collections.Specialized; using System.Xml; @@ -59,7 +58,7 @@ namespace Spring.Objects.Factory.Xml } /// - /// Name of the .Net config section that contains definitions + /// Name of the .Net config section that contains definitions /// for custom config parsers. /// private const string ConfigParsersSectionName = "spring/parsers"; @@ -232,8 +231,8 @@ namespace Spring.Objects.Factory.Xml /// The namespace with which to associate instance of the parser. /// /// - /// The location of the XML schema that should be used for validation - /// of the XML elements that belong to the specified namespace + /// The location of the XML schema that should be used for validation + /// of the XML elements that belong to the specified namespace /// (can be any valid Spring.NET resource URI). /// /// @@ -328,12 +327,12 @@ namespace Spring.Objects.Factory.Xml /// The parser instance. /// /// - /// The location of the XML schema that should be used for validation - /// of the XML elements that belong to the specified namespace + /// The location of the XML schema that should be used for validation + /// of the XML elements that belong to the specified namespace /// (can be any valid Spring.NET resource URI). /// /// - /// If is , or if + /// If is , or if /// is not specified and parser class /// does not have default value defined using . /// @@ -402,7 +401,7 @@ namespace Spring.Objects.Factory.Xml } /// - /// Returns default values for the parser namespace and schema location as + /// Returns default values for the parser namespace and schema location as /// defined by the . /// /// @@ -453,4 +452,4 @@ namespace Spring.Objects.Factory.Xml } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/NamespaceParserSupport.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/NamespaceParserSupport.cs index 86294bc3..3985939a 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/NamespaceParserSupport.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/NamespaceParserSupport.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using System.Xml; using Spring.Objects.Factory.Config; using Spring.Util; diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectDefinitionConstants.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectDefinitionConstants.cs index 929b017e..3c7603f0 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectDefinitionConstants.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectDefinitionConstants.cs @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using Spring.Objects.Factory.Config; using Spring.Objects.Factory.Support; -#endregion - namespace Spring.Objects.Factory.Xml { /// @@ -318,7 +313,7 @@ namespace Spring.Objects.Factory.Xml ///

/// public const string PropertyElement = "property"; - + /// /// A qualifier definition used for fine grained autowiring /// @@ -468,7 +463,7 @@ namespace Spring.Objects.Factory.Xml ///

/// public const string ValueAttribute = "value"; - + /// /// Contains delimiters that should be used to split delimited string values. /// @@ -478,7 +473,7 @@ namespace Spring.Objects.Factory.Xml ///

/// public const string DelimitersAttribute = "delimiters"; - + /// /// A reference to another objects. /// @@ -499,7 +494,7 @@ namespace Spring.Objects.Factory.Xml ///

/// public const string ExpressionAttribute = "expression"; - + /// /// A map entry can be an inner object, ref, collection, or value. /// @@ -517,7 +512,7 @@ namespace Spring.Objects.Factory.Xml ///

/// The property may be a string, or may be converted to the /// required using the - /// + /// /// machinery. This makes it possible for application developers to /// write custom /// implementations that can convert strings to objects. @@ -533,7 +528,7 @@ namespace Spring.Objects.Factory.Xml /// Contains a string representation of an expression. ///

public const string ExpressionElement = "expression"; - + /// /// Denotes value. /// @@ -702,7 +697,7 @@ namespace Spring.Objects.Factory.Xml ///
/// ///

- /// If this method is not overloaded, there's no need to use arg-type + /// If this method is not overloaded, there's no need to use arg-type /// subelements. ///

///

@@ -729,7 +724,7 @@ namespace Spring.Objects.Factory.Xml /// Subelement of replaced-method identifying an argument for a /// replaced method in the event of method overloading. ///

- /// + /// public const string ReplacedMethodArgumentTypeElement = "arg-type"; /// @@ -755,7 +750,7 @@ namespace Spring.Objects.Factory.Xml /// ///

/// - /// + /// public const string ReplacedMethodArgumentTypeMatchAttribute = "match"; /// @@ -824,4 +819,4 @@ namespace Spring.Objects.Factory.Xml #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectDefinitionParserHelper.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectDefinitionParserHelper.cs index cedb18b0..4f3d700d 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectDefinitionParserHelper.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectDefinitionParserHelper.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Globalization; using System.Xml; @@ -407,8 +405,8 @@ namespace Spring.Objects.Factory.Xml /// protected virtual ObjectDefinitionHolder CreateObjectDefinitionHolder( XmlElement element, - IConfigurableObjectDefinition definition, - string objectName, + IConfigurableObjectDefinition definition, + string objectName, IReadOnlyList aliases) { return new ObjectDefinitionHolder(definition, objectName, aliases); diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectFactorySectionHandler.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectFactorySectionHandler.cs index b8e53040..59c7f34c 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectFactorySectionHandler.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectFactorySectionHandler.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,21 +18,17 @@ #endregion -#region Imports - using System.Configuration; using System.Xml; using Spring.Core.IO; -#endregion - namespace Spring.Objects.Factory.Xml { /// /// Creates an instance /// populated with the object definitions supplied in the configuration - /// section. + /// section. /// /// ///

@@ -47,7 +43,7 @@ namespace Spring.Objects.Factory.Xml /// /// ///

- /// + /// ///

/// /// Mark Pollack (.NET) @@ -88,4 +84,4 @@ namespace Spring.Objects.Factory.Xml return new XmlObjectFactory(new ConfigSectionResource(section as XmlElement), true); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectsNamespaceParser.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectsNamespaceParser.cs index 6aec4f8a..6716af04 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectsNamespaceParser.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/ObjectsNamespaceParser.cs @@ -20,12 +20,9 @@ #region Imports -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.Globalization; -using System.IO; using System.Xml; using Common.Logging; diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/ReplacedMethodOverride.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/ReplacedMethodOverride.cs index 5b47f379..9c02f43c 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/ReplacedMethodOverride.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/ReplacedMethodOverride.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Collections.Specialized; using System.Reflection; using System.Text; using Spring.Util; -#endregion - namespace Spring.Objects.Factory.Support { /// @@ -57,7 +52,7 @@ namespace Spring.Objects.Factory.Support /// /// /// The object name of the - /// instance in the surrounding IoC container. + /// instance in the surrounding IoC container. /// /// /// If either of the supplied arguments is or @@ -82,7 +77,7 @@ namespace Spring.Objects.Factory.Support /// If the supplied is or /// contains only whitespace character(s). /// - /// + /// public void AddTypeIdentifier(string identifier) { AssertUtils.ArgumentHasText(identifier, "identifier"); @@ -91,7 +86,7 @@ namespace Spring.Objects.Factory.Support /// /// The object name of the - /// instance in the surrounding IoC container. + /// instance in the surrounding IoC container. /// public string MethodReplacerObjectName { @@ -156,4 +151,4 @@ namespace Spring.Objects.Factory.Support .Append("'.").ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/XmlObjectDefinitionReader.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/XmlObjectDefinitionReader.cs index 7636a4cc..0bc73418 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/XmlObjectDefinitionReader.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/XmlObjectDefinitionReader.cs @@ -20,8 +20,6 @@ #region Imports -using System; -using System.IO; using System.Xml; using System.Xml.Schema; using Spring.Core.IO; @@ -416,7 +414,7 @@ namespace Spring.Objects.Factory.Xml /// Creates the to use for actually /// reading object definitions from an XML document. /// - /// Default implementation instantiates the specified + /// Default implementation instantiates the specified /// or if no reader type is specified. /// protected virtual IObjectDefinitionDocumentReader CreateObjectDefinitionDocumentReader() @@ -429,7 +427,7 @@ namespace Spring.Objects.Factory.Xml } /// - /// Creates the to be passed along + /// Creates the to be passed along /// during the object definition reading process. /// /// The underlying that is currently processed. diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/XmlObjectFactory.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/XmlObjectFactory.cs index 4ade7b18..2161aca8 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/XmlObjectFactory.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/XmlObjectFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using Spring.Core.IO; using Spring.Objects.Factory.Support; @@ -66,7 +65,7 @@ namespace Spring.Objects.Factory.Xml public XmlObjectFactory(IResource resource) : this(resource, true, null) { } - + /// /// Creates a new instance of the class, /// with the given resource, which must be parsable using DOM. @@ -98,7 +97,7 @@ namespace Spring.Objects.Factory.Xml IResource resource, IObjectFactory parentFactory) : this(resource, true, parentFactory) {} - + /// /// Creates a new instance of the class, /// with the given resource, which must be parsable using DOM, and the @@ -130,4 +129,4 @@ namespace Spring.Objects.Factory.Xml } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Factory/Xml/XmlReaderContext.cs b/src/Spring/Spring.Core/Objects/Factory/Xml/XmlReaderContext.cs index c5e2cc4d..2ef4b60e 100644 --- a/src/Spring/Spring.Core/Objects/Factory/Xml/XmlReaderContext.cs +++ b/src/Spring/Spring.Core/Objects/Factory/Xml/XmlReaderContext.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Xml; using Spring.Core.IO; using Spring.Objects.Factory.Config; @@ -30,7 +29,7 @@ namespace Spring.Objects.Factory.Xml { /// /// Extension of specific to use with an XmlObjectDefinitionReader. - /// Provides access to configured in + /// Provides access to configured in /// public class XmlReaderContext : ReaderContext { @@ -54,8 +53,8 @@ namespace Spring.Objects.Factory.Xml /// Initializes a new instance of the class. /// /// The resource. - /// The reader. - public XmlReaderContext(IResource resource, IObjectDefinitionReader reader) + /// The reader. + public XmlReaderContext(IResource resource, IObjectDefinitionReader reader) : this(resource, reader, new DefaultObjectDefinitionFactory()) {} @@ -64,14 +63,14 @@ namespace Spring.Objects.Factory.Xml /// /// The resource. /// The reader. - /// The factory to use for creating new instances. - internal XmlReaderContext(IResource resource, IObjectDefinitionReader reader, IObjectDefinitionFactory objectDefinitionFactory) + /// The factory to use for creating new instances. + internal XmlReaderContext(IResource resource, IObjectDefinitionReader reader, IObjectDefinitionFactory objectDefinitionFactory) : base(resource) { this.reader = reader; if (reader is XmlObjectDefinitionReader) - { - this.namespaceParserResolver = ((XmlObjectDefinitionReader) reader).NamespaceParserResolver; + { + this.namespaceParserResolver = ((XmlObjectDefinitionReader) reader).NamespaceParserResolver; } this.objectDefinitionFactory = objectDefinitionFactory; } @@ -115,13 +114,13 @@ namespace Spring.Objects.Factory.Xml get { return objectDefinitionFactory; } } - /// - /// Get the instance to lookup parsers for custom namespaces. + /// + /// Get the instance to lookup parsers for custom namespaces. /// - internal INamespaceParserResolver NamespaceParserResolver - { - get { return namespaceParserResolver; } - set { namespaceParserResolver = value; } + internal INamespaceParserResolver NamespaceParserResolver + { + get { return namespaceParserResolver; } + set { namespaceParserResolver = value; } } /// @@ -248,6 +247,6 @@ namespace Spring.Objects.Factory.Xml { throw new FatalObjectException(message); } - + } } diff --git a/src/Spring/Spring.Core/Objects/FatalObjectException.cs b/src/Spring/Spring.Core/Objects/FatalObjectException.cs index 9bb0b7af..5340e8d7 100644 --- a/src/Spring/Spring.Core/Objects/FatalObjectException.cs +++ b/src/Spring/Spring.Core/Objects/FatalObjectException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Objects { /// @@ -86,4 +81,4 @@ namespace Spring.Objects { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/IMergable.cs b/src/Spring/Spring.Core/Objects/IMergable.cs index 27ac8bb8..8ad2daec 100644 --- a/src/Spring/Spring.Core/Objects/IMergable.cs +++ b/src/Spring/Spring.Core/Objects/IMergable.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects { /// @@ -42,7 +40,7 @@ namespace Spring.Objects /// /// Merges the current value set with that of the supplied object. /// - /// The supplied object is considered the parent, and values in the + /// The supplied object is considered the parent, and values in the /// callee's value set must override those of the supplied object. /// /// The parent object to merge with @@ -52,4 +50,4 @@ namespace Spring.Objects /// (i.e. MergeEnabled equals false. object Merge(object parent); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/IObjectMetadataElement.cs b/src/Spring/Spring.Core/Objects/IObjectMetadataElement.cs index d14d848a..bf6db7a6 100644 --- a/src/Spring/Spring.Core/Objects/IObjectMetadataElement.cs +++ b/src/Spring/Spring.Core/Objects/IObjectMetadataElement.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Objects { /// diff --git a/src/Spring/Spring.Core/Objects/IObjectWrapper.cs b/src/Spring/Spring.Core/Objects/IObjectWrapper.cs index 78d61452..eb789be7 100644 --- a/src/Spring/Spring.Core/Objects/IObjectWrapper.cs +++ b/src/Spring/Spring.Core/Objects/IObjectWrapper.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,17 +18,12 @@ #endregion -#region Imports - -using System; using System.Reflection; using Spring.Core; -#endregion - namespace Spring.Objects { - /// + /// /// The central interface of Spring.NET's low-level object infrastructure. /// /// @@ -65,7 +60,7 @@ namespace Spring.Objects /// /// ///

- /// Implementations are required to allow the type of the wrapped + /// Implementations are required to allow the type of the wrapped /// object to change. ///

///
diff --git a/src/Spring/Spring.Core/Objects/IPropertyValues.cs b/src/Spring/Spring.Core/Objects/IPropertyValues.cs index c885a28c..39a5d953 100644 --- a/src/Spring/Spring.Core/Objects/IPropertyValues.cs +++ b/src/Spring/Spring.Core/Objects/IPropertyValues.cs @@ -18,12 +18,7 @@ #endregion -#region Imports - using System.Collections; -using System.Collections.Generic; - -#endregion namespace Spring.Objects { @@ -86,4 +81,4 @@ namespace Spring.Objects /// IPropertyValues ChangesSince(IPropertyValues old); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/ISharedStateAware.cs b/src/Spring/Spring.Core/Objects/ISharedStateAware.cs index 8759d527..61d1a2a8 100644 --- a/src/Spring/Spring.Core/Objects/ISharedStateAware.cs +++ b/src/Spring/Spring.Core/Objects/ISharedStateAware.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,27 +18,23 @@ #endregion -#region Imports - using System.Collections; -#endregion - namespace Spring.Objects { /// - /// This interface should be implemented by classes that want to + /// This interface should be implemented by classes that want to /// have access to the shared state. /// /// ///

/// Shared state is very useful if you have data that needs to be shared by all instances - /// of e.g. the same webform (or other IHttpHandlers). + /// of e.g. the same webform (or other IHttpHandlers). ///

///

- /// For example, Spring.Web.UI.Page class implements this interface, which allows - /// each page derived from it to cache localizalization resources and parsed data binding - /// expressions only once and then reuse the cached values, regardless of how many instances + /// For example, Spring.Web.UI.Page class implements this interface, which allows + /// each page derived from it to cache localizalization resources and parsed data binding + /// expressions only once and then reuse the cached values, regardless of how many instances /// of the page are created. ///

///
@@ -50,4 +46,4 @@ namespace Spring.Objects ///
IDictionary SharedState { get; set; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/ISharedStateFactory.cs b/src/Spring/Spring.Core/Objects/ISharedStateFactory.cs index 8cc46abd..71df8fdd 100644 --- a/src/Spring/Spring.Core/Objects/ISharedStateFactory.cs +++ b/src/Spring/Spring.Core/Objects/ISharedStateFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,16 +18,12 @@ #endregion -#region Imports - using System.Collections; -#endregion - namespace Spring.Objects { /// - /// Abstracts the state sharing strategy used + /// Abstracts the state sharing strategy used /// by /// /// Erich Eichinger @@ -52,4 +48,4 @@ namespace Spring.Objects /// a dictionary containing shared state for or null. IDictionary GetSharedStateFor( object instance, string name ); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/MutablePropertyValues.cs b/src/Spring/Spring.Core/Objects/MutablePropertyValues.cs index 1c7dbdae..c5c048d8 100644 --- a/src/Spring/Spring.Core/Objects/MutablePropertyValues.cs +++ b/src/Spring/Spring.Core/Objects/MutablePropertyValues.cs @@ -14,9 +14,7 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.Text; using Spring.Util; @@ -182,7 +180,7 @@ namespace Spring.Objects } } } - + /// /// Add all property values from the given /// . @@ -270,7 +268,7 @@ namespace Spring.Objects { return null; } - + string propertyNameLowered = propertyName.ToLower(CultureInfo.CurrentCulture); for (var i = 0; i < propertyValuesList.Count; i++) { @@ -373,4 +371,4 @@ namespace Spring.Objects // CLOVER:ON } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/ObjectMetadataAttribute.cs b/src/Spring/Spring.Core/Objects/ObjectMetadataAttribute.cs index b0dcfca0..fb39ad61 100644 --- a/src/Spring/Spring.Core/Objects/ObjectMetadataAttribute.cs +++ b/src/Spring/Spring.Core/Objects/ObjectMetadataAttribute.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Diagnostics; using Spring.Util; @@ -81,7 +80,7 @@ namespace Spring.Objects ObjectUtils.NullSafeEquals(_source, otherMa._source)); } - + public override int GetHashCode() { return _name.GetHashCode() * 29 + ObjectUtils.NullSafeHashCode(_value); diff --git a/src/Spring/Spring.Core/Objects/ObjectMetadataAttributeAccessor.cs b/src/Spring/Spring.Core/Objects/ObjectMetadataAttributeAccessor.cs index 27c6ad6d..a732a7fd 100644 --- a/src/Spring/Spring.Core/Objects/ObjectMetadataAttributeAccessor.cs +++ b/src/Spring/Spring.Core/Objects/ObjectMetadataAttributeAccessor.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Core; namespace Spring.Objects diff --git a/src/Spring/Spring.Core/Objects/ObjectWrapper.cs b/src/Spring/Spring.Core/Objects/ObjectWrapper.cs index e8a6a520..d44947a1 100644 --- a/src/Spring/Spring.Core/Objects/ObjectWrapper.cs +++ b/src/Spring/Spring.Core/Objects/ObjectWrapper.cs @@ -14,8 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; using System.ComponentModel; using System.Reflection; using System.Text; @@ -504,4 +502,4 @@ namespace Spring.Objects return propertyExpression; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/ObjectsException.cs b/src/Spring/Spring.Core/Objects/ObjectsException.cs index 5e02312b..0d2469f2 100644 --- a/src/Spring/Spring.Core/Objects/ObjectsException.cs +++ b/src/Spring/Spring.Core/Objects/ObjectsException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Objects { /// diff --git a/src/Spring/Spring.Core/Objects/PropertyAccessExceptionsException.cs b/src/Spring/Spring.Core/Objects/PropertyAccessExceptionsException.cs index 3a167f59..1f20aac3 100644 --- a/src/Spring/Spring.Core/Objects/PropertyAccessExceptionsException.cs +++ b/src/Spring/Spring.Core/Objects/PropertyAccessExceptionsException.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; using System.Security.Permissions; using System.Text; @@ -163,7 +162,7 @@ namespace Spring.Objects } /// - /// Describe the group of exceptions. + /// Describe the group of exceptions. /// public override string Message { @@ -181,7 +180,7 @@ namespace Spring.Objects sb.Append(pae.GetType().FullName); sb.Append(": "); sb.Append(pae.Message); - if (pae.InnerException != null) + if (pae.InnerException != null) { sb.Append(", Inner Exception: "); sb.Append(pae.InnerException.ToString()); @@ -252,4 +251,4 @@ namespace Spring.Objects return Message; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/PropertyValue.cs b/src/Spring/Spring.Core/Objects/PropertyValue.cs index a24bcd05..8a013c50 100644 --- a/src/Spring/Spring.Core/Objects/PropertyValue.cs +++ b/src/Spring/Spring.Core/Objects/PropertyValue.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,6 @@ #endregion -using System; using System.Globalization; using Spring.Core; using Spring.Expressions; @@ -83,7 +82,7 @@ namespace Spring.Objects /// /// Pre-parsed property name. /// - /// If the supplied or + /// If the supplied or /// is , or if the name contains only whitespace characters. /// public PropertyValue(string name, object val, IExpression expression) @@ -156,7 +155,7 @@ namespace Spring.Objects /// /// Determines whether the supplied - /// is equal to the current . + /// is equal to the current . /// /// The other instance. /// @@ -180,14 +179,14 @@ namespace Spring.Objects /// /// Serves as a hash function for a particular type, suitable for use - /// in hashing algorithms and data structures like a hash table. + /// in hashing algorithms and data structures like a hash table. /// /// - /// A hash code for the current . + /// A hash code for the current . /// public override int GetHashCode() { return propertyName.GetHashCode() * 29 + (propertyValue != null ? propertyValue.GetHashCode() : 0); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Support/AbstractEventHandlerValue.cs b/src/Spring/Spring.Core/Objects/Support/AbstractEventHandlerValue.cs index 7cf867d0..60b330d3 100644 --- a/src/Spring/Spring.Core/Objects/Support/AbstractEventHandlerValue.cs +++ b/src/Spring/Spring.Core/Objects/Support/AbstractEventHandlerValue.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,9 @@ #endregion -#region Imports - using System.Globalization; using Spring.Util; -#endregion - namespace Spring.Objects.Support { /// @@ -60,7 +56,7 @@ namespace Spring.Objects.Support /// This is an class, and as such exposes no public constructors. ///

/// - protected AbstractEventHandlerValue (object source, string methodName) + protected AbstractEventHandlerValue (object source, string methodName) { _source = source; _methodName = methodName; @@ -73,13 +69,13 @@ namespace Spring.Objects.Support /// of a /// value). ///
- public virtual object Source + public virtual object Source { - get + get { return _source; } - set + set { _source = value; } @@ -88,13 +84,13 @@ namespace Spring.Objects.Support /// /// The name of the method that is going to handle the event. /// - public virtual string MethodName + public virtual string MethodName { - get + get { return _methodName; } - set + set { _methodName = StringUtils.HasText (value) ? value.Trim () : string.Empty; } @@ -103,13 +99,13 @@ namespace Spring.Objects.Support /// /// The name of the event that is being wired up. /// - public virtual string EventName + public virtual string EventName { - get + get { return _eventName; } - set + set { _eventName = StringUtils.HasText (value) ? value.Trim () : string.Empty; } diff --git a/src/Spring/Spring.Core/Objects/Support/AbstractSharedStateFactory.cs b/src/Spring/Spring.Core/Objects/Support/AbstractSharedStateFactory.cs index fe1243ed..fad0551a 100644 --- a/src/Spring/Spring.Core/Objects/Support/AbstractSharedStateFactory.cs +++ b/src/Spring/Spring.Core/Objects/Support/AbstractSharedStateFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Collections; using Spring.Collections; using Spring.Core; using Spring.Util; -#endregion - namespace Spring.Objects.Support { /// @@ -55,7 +50,7 @@ namespace Spring.Objects.Support /// the instance to obtain shared state for /// the name of the instance. /// - /// A dictionary containing the 's state, + /// A dictionary containing the 's state, /// or null if no state can be served by this provider. /// public IDictionary GetSharedStateFor( object instance, string name ) @@ -74,7 +69,7 @@ namespace Spring.Objects.Support } IDictionary sharedState = (IDictionary) _sharedStateCache[key]; - if (sharedState == null) + if (sharedState == null) { lock(_sharedStateCache) { @@ -106,7 +101,7 @@ namespace Spring.Objects.Support protected virtual IDictionary CreateSharedStateDictionary(object key) { return _caseSensitiveState ? new Hashtable() : new CaseInsensitiveHashtable(); - } + } /// /// Indicate, whether the given instance will be served by this provider @@ -114,7 +109,7 @@ namespace Spring.Objects.Support /// the instance to serve state /// the name of the instance /// - /// a boolean value indicating, whether state shall + /// a boolean value indicating, whether state shall /// be resolved for the given instance or not. /// public virtual bool CanProvideState(object instance, string name) @@ -133,7 +128,7 @@ namespace Spring.Objects.Support /// /// /// - /// Implementations may choose to return null from this method to indicate, + /// Implementations may choose to return null from this method to indicate, /// that they won't serve state for the given instance. /// /// @@ -142,4 +137,4 @@ namespace Spring.Objects.Support /// protected abstract object GetKey(object instance, string name); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Support/AbstractWiringEventHandlerValue.cs b/src/Spring/Spring.Core/Objects/Support/AbstractWiringEventHandlerValue.cs index 6fa32575..392b3077 100644 --- a/src/Spring/Spring.Core/Objects/Support/AbstractWiringEventHandlerValue.cs +++ b/src/Spring/Spring.Core/Objects/Support/AbstractWiringEventHandlerValue.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Globalization; using System.Reflection; using Spring.Util; -#endregion - namespace Spring.Objects.Support { /// @@ -155,4 +150,4 @@ namespace Spring.Objects.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Support/ArgumentConvertingMethodInvoker.cs b/src/Spring/Spring.Core/Objects/Support/ArgumentConvertingMethodInvoker.cs index d8e19a6b..6bd7ec63 100644 --- a/src/Spring/Spring.Core/Objects/Support/ArgumentConvertingMethodInvoker.cs +++ b/src/Spring/Spring.Core/Objects/Support/ArgumentConvertingMethodInvoker.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.ComponentModel; using Spring.Core.TypeConversion; using Spring.Util; -#endregion - namespace Spring.Objects.Support { /// @@ -115,4 +110,4 @@ namespace Spring.Objects.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Support/AutoWiringEventHandlerValue.cs b/src/Spring/Spring.Core/Objects/Support/AutoWiringEventHandlerValue.cs index 9a1a5874..e1c9c912 100644 --- a/src/Spring/Spring.Core/Objects/Support/AutoWiringEventHandlerValue.cs +++ b/src/Spring/Spring.Core/Objects/Support/AutoWiringEventHandlerValue.cs @@ -18,17 +18,12 @@ #endregion -#region Imports - -using System; using System.Globalization; using System.Reflection; using Common.Logging; using Spring.Core; using Spring.Util; -#endregion - namespace Spring.Objects.Support { /// @@ -317,4 +312,4 @@ namespace Spring.Objects.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Support/ByTypeSharedStateFactory.cs b/src/Spring/Spring.Core/Objects/Support/ByTypeSharedStateFactory.cs index c9562282..8e8c38fa 100644 --- a/src/Spring/Spring.Core/Objects/Support/ByTypeSharedStateFactory.cs +++ b/src/Spring/Spring.Core/Objects/Support/ByTypeSharedStateFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,6 @@ #endregion -#region Imports - -using System; - -#endregion - namespace Spring.Objects.Support { /// @@ -37,7 +31,7 @@ namespace Spring.Objects.Support /// Limit object types to be served by this state manager. /// /// - /// Only objects assignable to one of the types in this list + /// Only objects assignable to one of the types in this list /// will be served state by this manager. /// public Type[] TypeFilter @@ -66,7 +60,7 @@ namespace Spring.Objects.Support /// the instance to serve state /// the name of the instance /// - /// a boolean value indicating, whether state shall + /// a boolean value indicating, whether state shall /// be resolved for the given instance or not. /// public override bool CanProvideState( object instance, string name ) @@ -101,4 +95,4 @@ namespace Spring.Objects.Support return key; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Support/ISortDefinition.cs b/src/Spring/Spring.Core/Objects/Support/ISortDefinition.cs index 1aacf4d0..a961eae6 100644 --- a/src/Spring/Spring.Core/Objects/Support/ISortDefinition.cs +++ b/src/Spring/Spring.Core/Objects/Support/ISortDefinition.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -16,12 +16,6 @@ * limitations under the License. */ -#endregion - -#region Imports - - - #endregion namespace Spring.Objects.Support diff --git a/src/Spring/Spring.Core/Objects/Support/InstanceEventHandlerValue.cs b/src/Spring/Spring.Core/Objects/Support/InstanceEventHandlerValue.cs index 4c5354ee..b98e7e13 100644 --- a/src/Spring/Spring.Core/Objects/Support/InstanceEventHandlerValue.cs +++ b/src/Spring/Spring.Core/Objects/Support/InstanceEventHandlerValue.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Reflection; using Spring.Util; -#endregion - namespace Spring.Objects.Support { /// @@ -112,4 +107,4 @@ namespace Spring.Objects.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Support/MethodInvoker.cs b/src/Spring/Spring.Core/Objects/Support/MethodInvoker.cs index 04305cef..af727bdf 100644 --- a/src/Spring/Spring.Core/Objects/Support/MethodInvoker.cs +++ b/src/Spring/Spring.Core/Objects/Support/MethodInvoker.cs @@ -18,19 +18,13 @@ #endregion -#region Imports - -using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.Reflection; using Spring.Core; using Spring.Core.TypeResolution; -#endregion - namespace Spring.Objects.Support { /// @@ -537,4 +531,4 @@ namespace Spring.Objects.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Support/MutableSortDefinition.cs b/src/Spring/Spring.Core/Objects/Support/MutableSortDefinition.cs index d6b84268..1ee9fb9f 100644 --- a/src/Spring/Spring.Core/Objects/Support/MutableSortDefinition.cs +++ b/src/Spring/Spring.Core/Objects/Support/MutableSortDefinition.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using Spring.Util; -#endregion - namespace Spring.Objects.Support { /// @@ -44,7 +39,7 @@ namespace Spring.Objects.Support private bool _toggleAscendingOnProperty = false; #region Properties - private bool ToggleAscendingOnProperty + private bool ToggleAscendingOnProperty { get { @@ -69,16 +64,16 @@ namespace Spring.Objects.Support } set { - if (!StringUtils.HasText (value)) + if (!StringUtils.HasText (value)) { _property = string.Empty; } - else + else { // implicit toggling of ascending? - if (ToggleAscendingOnProperty) + if (ToggleAscendingOnProperty) { - if (value.Equals(_property)) + if (value.Equals(_property)) { _ascending = !_ascending; } @@ -189,9 +184,9 @@ namespace Spring.Objects.Support /// /// True if the supplied is equal to this instance. /// - public override bool Equals(object obj) + public override bool Equals(object obj) { - if (!(obj is ISortDefinition)) + if (!(obj is ISortDefinition)) { return false; } @@ -204,7 +199,7 @@ namespace Spring.Objects.Support /// Overrides the default method. /// /// The hashcode for this instance. - public override int GetHashCode() + public override int GetHashCode() { int result = 0; result = this.Property.GetHashCode(); diff --git a/src/Spring/Spring.Core/Objects/Support/PropertyComparator.cs b/src/Spring/Spring.Core/Objects/Support/PropertyComparator.cs index 3f82baf9..10331234 100644 --- a/src/Spring/Spring.Core/Objects/Support/PropertyComparator.cs +++ b/src/Spring/Spring.Core/Objects/Support/PropertyComparator.cs @@ -18,17 +18,12 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Globalization; using Common.Logging; using Spring.Core; using Spring.Util; -#endregion - namespace Spring.Objects.Support { /// @@ -202,4 +197,4 @@ namespace Spring.Objects.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Objects/Support/StaticEventHandlerValue.cs b/src/Spring/Spring.Core/Objects/Support/StaticEventHandlerValue.cs index 2906ec7d..dd8198cc 100644 --- a/src/Spring/Spring.Core/Objects/Support/StaticEventHandlerValue.cs +++ b/src/Spring/Spring.Core/Objects/Support/StaticEventHandlerValue.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Globalization; using System.Reflection; -#endregion - namespace Spring.Objects.Support { /// @@ -79,7 +74,7 @@ namespace Spring.Objects.Support protected override Delegate GetHandler(object instance, EventInfo info) { Type type = instance as Type; - if (type == null) + if (type == null) { throw new FatalObjectException (string.Format ( CultureInfo.InvariantCulture, diff --git a/src/Spring/Spring.Core/Pool/IObjectPool.cs b/src/Spring/Spring.Core/Pool/IObjectPool.cs index 3315e0ba..d1834fb2 100644 --- a/src/Spring/Spring.Core/Pool/IObjectPool.cs +++ b/src/Spring/Spring.Core/Pool/IObjectPool.cs @@ -1,14 +1,14 @@ #region License /* -* Copyright © 2002-2011 the original author or authors. -* +* Copyright � 2002-2011 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. * You may obtain a copy of the License at -* +* * http://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,13 +18,11 @@ #endregion -using System; - namespace Spring.Pool { /// /// A simple pooling interface for managing and monitoring a pool - /// of objects. + /// of objects. /// /// ///

@@ -40,7 +38,7 @@ namespace Spring.Pool ///

/// ///

- /// By contract, clients must return the borrowed + /// By contract, clients must return the borrowed /// instance using /// or a related method as defined in an implementation or /// sub-interface. @@ -58,7 +56,7 @@ namespace Spring.Pool ///

/// ///

- /// By contract, the object must have been obtained using + /// By contract, the object must have been obtained using /// /// or a related method as defined in an implementation or sub-interface. ///

@@ -71,11 +69,11 @@ namespace Spring.Pool /// Create an object using the factory set by /// the property /// or other implementation dependent mechanism - /// and place it into the pool. + /// and place it into the pool. ///
/// ///

- /// This is an optional operation. AddObject is useful for "pre-loading" a + /// This is an optional operation. AddObject is useful for "pre-loading" a /// pool with idle objects. ///

///
@@ -104,7 +102,7 @@ namespace Spring.Pool void Clear(); /// - /// Gets the number of instances currently borrowed from the pool. + /// Gets the number of instances currently borrowed from the pool. /// /// ///

@@ -113,9 +111,9 @@ namespace Spring.Pool /// /// /// If the implementation does not support the operation. - /// - int NumActive { get; } - + /// + int NumActive { get; } + ///

/// Gets the number of instances currently idle in the pool. /// diff --git a/src/Spring/Spring.Core/Pool/PoolException.cs b/src/Spring/Spring.Core/Pool/PoolException.cs index 502d6723..f2cf3ccb 100644 --- a/src/Spring/Spring.Core/Pool/PoolException.cs +++ b/src/Spring/Spring.Core/Pool/PoolException.cs @@ -1,13 +1,13 @@ #region License /* -* Copyright © 2002-2011 the original author or authors. -* +* Copyright � 2002-2011 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. * You may obtain a copy of the License at -* +* * http://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -16,7 +16,6 @@ */ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Pool @@ -77,4 +76,4 @@ namespace Spring.Pool { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Pool/Support/SimplePool.cs b/src/Spring/Spring.Core/Pool/Support/SimplePool.cs index 5add02ea..9d09ade6 100644 --- a/src/Spring/Spring.Core/Pool/Support/SimplePool.cs +++ b/src/Spring/Spring.Core/Pool/Support/SimplePool.cs @@ -1,14 +1,14 @@ #region License /* -* Copyright © 2002-2011 the original author or authors. -* +* Copyright � 2002-2011 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. * You may obtain a copy of the License at -* +* * http://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using Spring.Util; using Spring.Threading; @@ -72,7 +71,7 @@ namespace Spring.Pool.Support : this(factory, initialSize, initialSize) { } - + /// /// Creates a new instance of the /// class. diff --git a/src/Spring/Spring.Core/Proxy/AbstractProxyMethodBuilder.cs b/src/Spring/Spring.Core/Proxy/AbstractProxyMethodBuilder.cs index 50dd6983..79531545 100644 --- a/src/Spring/Spring.Core/Proxy/AbstractProxyMethodBuilder.cs +++ b/src/Spring/Spring.Core/Proxy/AbstractProxyMethodBuilder.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using System.Reflection.Emit; @@ -68,7 +67,7 @@ namespace Spring.Proxy /// if the interface is to be /// implemented explicitly; otherwise . /// - public AbstractProxyMethodBuilder(TypeBuilder typeBuilder, + public AbstractProxyMethodBuilder(TypeBuilder typeBuilder, IProxyTypeGenerator proxyGenerator, bool explicitImplementation) { this.typeBuilder = typeBuilder; @@ -92,7 +91,7 @@ namespace Spring.Proxy /// public virtual MethodBuilder BuildProxyMethod(MethodInfo method, MethodInfo interfaceMethod) { - MethodBuilder methodBuilder = + MethodBuilder methodBuilder = DefineMethod(method, interfaceMethod, explicitImplementation); ILGenerator il = methodBuilder.GetILGenerator(); @@ -101,7 +100,7 @@ namespace Spring.Proxy il.Emit(OpCodes.Ret); - if (explicitImplementation || + if (explicitImplementation || (interfaceMethod != null && interfaceMethod.Name != method.Name)) { typeBuilder.DefineMethodOverride(methodBuilder, interfaceMethod); @@ -115,7 +114,7 @@ namespace Spring.Proxy #region Protected Methods /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the proxy instance on stack. /// /// The IL generator to use. @@ -125,7 +124,7 @@ namespace Spring.Proxy } /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the target instance on which calls should be delegated to. /// /// The IL generator to use. @@ -169,7 +168,7 @@ namespace Spring.Proxy if (explicitImplementation || method.Name.IndexOf('.') != -1) { - name = String.Format("{0}.{1}", + name = String.Format("{0}.{1}", intfMethod.DeclaringType.FullName, intfMethod.Name); attributes |= MethodAttributes.Private; } diff --git a/src/Spring/Spring.Core/Proxy/AbstractProxyTypeBuilder.cs b/src/Spring/Spring.Core/Proxy/AbstractProxyTypeBuilder.cs index 6167b40f..5e4addd9 100644 --- a/src/Spring/Spring.Core/Proxy/AbstractProxyTypeBuilder.cs +++ b/src/Spring/Spring.Core/Proxy/AbstractProxyTypeBuilder.cs @@ -20,9 +20,7 @@ #region Imports -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; using System.Runtime.Serialization; @@ -35,7 +33,7 @@ using Spring.Util; namespace Spring.Proxy { /// - /// Base class for proxy builders that can be used + /// Base class for proxy builders that can be used /// to create a proxy for any class. /// /// @@ -58,7 +56,7 @@ namespace Spring.Proxy protected static readonly ILog log = LogManager.GetLogger(typeof(AbstractProxyTypeBuilder)); private const string DEFAULT_PROXY_TYPE_NAME = "Proxy"; - + private string _name; private Type _targetType; private Type _baseType = typeof (object); @@ -83,13 +81,13 @@ namespace Spring.Proxy /// The name of the proxy . public string Name { - get + get { if (StringUtils.IsNullOrEmpty(_name)) { _name = DEFAULT_PROXY_TYPE_NAME; } - return _name; + return _name; } set { _name = value; } } @@ -123,7 +121,7 @@ namespace Spring.Proxy /// Gets or sets the list of interfaces proxy should implement. /// /// - /// The default value of this property is all the interfaces + /// The default value of this property is all the interfaces /// implemented or inherited by the target type. /// public IList Interfaces @@ -176,7 +174,7 @@ namespace Spring.Proxy #region IProxyTypeGenerator Members /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the proxy instance on stack. /// /// The IL generator to use. @@ -186,7 +184,7 @@ namespace Spring.Proxy } /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the target instance on which calls should be delegated to. /// /// The IL generator to use. @@ -207,7 +205,7 @@ namespace Spring.Proxy protected virtual TypeBuilder CreateTypeBuilder(string name, Type baseType) { // Generates unique type name - string typeName = String.Format("{0}_{1}", + string typeName = String.Format("{0}_{1}", name, Guid.NewGuid().ToString("N")); return DynamicProxyManager.CreateTypeBuilder(typeName, baseType); @@ -375,7 +373,7 @@ namespace Spring.Proxy { ArrayList attributes = new ArrayList(); - if (this.ProxyTargetAttributes && + if (this.ProxyTargetAttributes && !method.DeclaringType.IsInterface) { // add attributes that apply to the target method @@ -421,9 +419,9 @@ namespace Spring.Proxy object[] attrs = method.ReturnTypeCustomAttributes.GetCustomAttributes(false); try { - System.Collections.Generic.IList attrsData = + System.Collections.Generic.IList attrsData = CustomAttributeData.GetCustomAttributes(method.ReturnParameter); - + if (attrs.Length != attrsData.Count) { // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=94803 @@ -471,7 +469,7 @@ namespace Spring.Proxy try { IList attrsData = CustomAttributeData.GetCustomAttributes(paramInfo); - + if (attrs.Length != attrsData.Count) { // http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=94803 @@ -539,7 +537,7 @@ namespace Spring.Proxy return false; } - private static readonly FieldInfo CustomAttributeConstructorField = + private static readonly FieldInfo CustomAttributeConstructorField = typeof(CustomAttributeBuilder).GetField("m_con", BindingFlags.Instance | BindingFlags.NonPublic); #endregion @@ -573,7 +571,7 @@ namespace Spring.Proxy { ConstructorBuilder cb = typeBuilder.DefineConstructor( constructor.Attributes, - constructor.CallingConvention, + constructor.CallingConvention, DefineConstructorParameters(constructor)); ILGenerator il = cb.GetILGenerator(); @@ -602,7 +600,7 @@ namespace Spring.Proxy /// Implements an interface. ///
/// - /// Generates proxy methods that belongs to the interface + /// Generates proxy methods that belongs to the interface /// using the specified . /// /// The type builder to use. @@ -613,7 +611,7 @@ namespace Spring.Proxy /// /// The of the target object. /// - protected virtual void ImplementInterface(TypeBuilder typeBuilder, + protected virtual void ImplementInterface(TypeBuilder typeBuilder, IProxyMethodBuilder proxyMethodBuilder, Type intf, Type targetType) { ImplementInterface(typeBuilder, proxyMethodBuilder, intf, targetType, true); @@ -623,7 +621,7 @@ namespace Spring.Proxy /// Implements an interface. ///
/// - /// Generates proxy methods that belongs to the interface + /// Generates proxy methods that belongs to the interface /// using the specified . /// /// The type builder to use. @@ -639,7 +637,7 @@ namespace Spring.Proxy /// otherwise . /// protected virtual void ImplementInterface(TypeBuilder typeBuilder, - IProxyMethodBuilder proxyMethodBuilder, Type intf, + IProxyMethodBuilder proxyMethodBuilder, Type intf, Type targetType, bool proxyVirtualMethods) { Dictionary methodMap = new Dictionary(); @@ -650,7 +648,7 @@ namespace Spring.Proxy for (int i = 0; i < mapping.InterfaceMethods.Length; i++) { - if (!proxyVirtualMethods && + if (!proxyVirtualMethods && !mapping.TargetMethods[i].DeclaringType.IsInterface && mapping.TargetMethods[i].IsVirtual && !mapping.TargetMethods[i].IsFinal) @@ -674,18 +672,18 @@ namespace Spring.Proxy } /// - /// Gets the mapping of the interface to proxy - /// into the actual methods on the target type + /// Gets the mapping of the interface to proxy + /// into the actual methods on the target type /// that does not need to implement that interface. /// /// ///

- /// If the target type does not implement the interface, + /// If the target type does not implement the interface, /// we return the interfaces methods as the target methods for many reasons : ///

    ///
  • /// The target object can change for an object that implements the interface. - /// (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder' + /// (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder' /// implementation in the Spring AOP framework for an example) ///
  • ///
  • @@ -694,7 +692,7 @@ namespace Spring.Proxy ///
  • ///
  • /// Allow null target to be proxied. - /// (See Spring AOP framework which avoid calls to the target object + /// (See Spring AOP framework which avoid calls to the target object /// by intercepting all methods. Think "dynamic mock") /// (See 'Spring.Web.Services.WebServiceProxyFactory' implementation for another example) ///
  • @@ -734,7 +732,7 @@ namespace Spring.Proxy /// Inherit from a type. ///
/// - /// Generates proxy methods for base virtual methods + /// Generates proxy methods for base virtual methods /// using the specified . /// /// @@ -744,7 +742,7 @@ namespace Spring.Proxy /// The implementation to use to override base virtual methods. /// /// The to inherit from. - protected virtual void InheritType(TypeBuilder typeBuilder, + protected virtual void InheritType(TypeBuilder typeBuilder, IProxyMethodBuilder proxyMethodBuilder, Type type) { InheritType(typeBuilder, proxyMethodBuilder, type, false); @@ -754,7 +752,7 @@ namespace Spring.Proxy /// Inherit from a type. ///
/// - /// Generates proxy methods for base virtual methods + /// Generates proxy methods for base virtual methods /// using the specified . /// /// @@ -765,8 +763,8 @@ namespace Spring.Proxy /// /// The to inherit from. /// - /// if only members declared at the level - /// of the supplied 's hierarchy should be proxied; + /// if only members declared at the level + /// of the supplied 's hierarchy should be proxied; /// otherwise . /// protected virtual void InheritType(TypeBuilder typeBuilder, @@ -823,7 +821,7 @@ namespace Spring.Proxy if (getMethod != null || setMethod != null) { - string propertyName = (type.IsInterface && + string propertyName = (type.IsInterface && ((getMethod != null && getMethod.IsPrivate) || (setMethod != null && setMethod.IsPrivate))) ? type.FullName + "." + property.Name : property.Name; @@ -858,31 +856,31 @@ namespace Spring.Proxy if (addOnMethod != null && removeOnMethod != null) { - string eventName = (addOnMethod.IsPrivate) - ? addOnMethod.DeclaringType.FullName + "." + evt.Name + string eventName = (addOnMethod.IsPrivate) + ? addOnMethod.DeclaringType.FullName + "." + evt.Name : evt.Name; EventBuilder eb = typeBuilder.DefineEvent( eventName, EventAttributes.None, evt.EventHandlerType); - + // set add/remove methods eb.SetAddOnMethod(addOnMethod); eb.SetRemoveOnMethod(removeOnMethod); - } + } } #endregion /// - /// Returns an array of s that represent + /// Returns an array of s that represent /// the proxiable interfaces. /// /// - /// An interface is proxiable if it's not marked with the + /// An interface is proxiable if it's not marked with the /// . /// /// - /// The array of interfaces from which + /// The array of interfaces from which /// we want to get the proxiable interfaces. /// /// @@ -918,7 +916,7 @@ namespace Spring.Proxy } /// - /// Checks if specified interface is of a special type + /// Checks if specified interface is of a special type /// that should never be proxied (i.e. ISerializable). /// /// Interface type to check. @@ -932,4 +930,4 @@ namespace Spring.Proxy #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Proxy/CompositionProxyTypeBuilder.cs b/src/Spring/Spring.Core/Proxy/CompositionProxyTypeBuilder.cs index 0fc1aef6..286a76bc 100644 --- a/src/Spring/Spring.Core/Proxy/CompositionProxyTypeBuilder.cs +++ b/src/Spring/Spring.Core/Proxy/CompositionProxyTypeBuilder.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using System.Reflection.Emit; diff --git a/src/Spring/Spring.Core/Proxy/DynamicProxyManager.cs b/src/Spring/Spring.Core/Proxy/DynamicProxyManager.cs index d3869c9e..c5f742a4 100644 --- a/src/Spring/Spring.Core/Proxy/DynamicProxyManager.cs +++ b/src/Spring/Spring.Core/Proxy/DynamicProxyManager.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Diagnostics; using System.Reflection; using System.Reflection.Emit; @@ -79,7 +78,7 @@ namespace Spring.Proxy Type alreadyRegisteredType = module.GetType(typeName, true); string msg; - + if (alreadyRegisteredType != null) msg = "Proxy already registered for \"{0}\" as Type \"{1}\"."; else @@ -101,4 +100,4 @@ namespace Spring.Proxy #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Proxy/IProxyTypeBuilder.cs b/src/Spring/Spring.Core/Proxy/IProxyTypeBuilder.cs index a88e8e6e..d6d8ca24 100644 --- a/src/Spring/Spring.Core/Proxy/IProxyTypeBuilder.cs +++ b/src/Spring/Spring.Core/Proxy/IProxyTypeBuilder.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,9 +20,7 @@ #region Imports -using System; using System.Collections; -using System.Collections.Generic; #endregion @@ -68,7 +66,7 @@ namespace Spring.Proxy ///
/// /// by default. - /// Target type attributes, method attributes, method's return type attributes + /// Target type attributes, method attributes, method's return type attributes /// and method's parameter attributes are copied to the proxy. /// bool ProxyTargetAttributes { get; set; } @@ -93,13 +91,13 @@ namespace Spring.Proxy /// // get a concrete implementation of an IProxyTypeBuilder... /// IProxyTypeBuilder builder = ... ; /// builder.TargetType = typeof( ... ); - /// + /// /// IDictionary typeAtts = new Hashtable(); /// builder.TypeAttributes = typeAtts; - /// + /// /// // applies a single Attribute to the proxied class... /// typeAtts = new Attribute[] { new MyCustomAttribute() }); - /// + /// /// // applies a number of Attributes to the proxied class... /// typeAtts = new Attribute[] /// { @@ -141,33 +139,33 @@ namespace Spring.Proxy /// // get a concrete implementation of an IProxyTypeBuilder... /// IProxyTypeBuilder builder = ... ; /// builder.TargetType = typeof( ... ); - /// + /// /// IDictionary memAtts = new Hashtable(); /// builder.MemberAttributes = memAtts; - /// + /// /// // applies a single Attribute to all members of the proxied class... /// memAtts ["*"] = new Attribute[] { new MyCustomAttribute() }); - /// + /// /// // applies a number of Attributes to all members of the proxied class... /// memAtts ["*"] = new Attribute[] /// { /// new MyCustomAttribute(), /// new AnotherAttribute(), /// }); - /// + /// /// // applies a single Attribute to those members of the proxied class /// // that have identifiers starting with 'Do' ... /// memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() }); - /// + /// /// // applies a number of Attributes to those members of the proxied class /// // that have identifiers starting with 'Do' ... /// memAtts ["Do*"] = new Attribute[] /// { /// new MyCustomAttribute(), /// new AnotherAttribute(), - /// }); + /// }); /// /// IDictionary MemberAttributes { get; set; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Proxy/IProxyTypeGenerator.cs b/src/Spring/Spring.Core/Proxy/IProxyTypeGenerator.cs index 7e36b6cc..e98b18db 100644 --- a/src/Spring/Spring.Core/Proxy/IProxyTypeGenerator.cs +++ b/src/Spring/Spring.Core/Proxy/IProxyTypeGenerator.cs @@ -1,7 +1,26 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 License + +/* + * Copyright � 2002-2011 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. @@ -18,16 +37,12 @@ #endregion -#region Imports - using System.Reflection.Emit; -#endregion - namespace Spring.Proxy { /// - /// Describes the operations that generates IL instructions + /// Describes the operations that generates IL instructions /// used to build the proxy type. /// /// Bruno Baia @@ -41,17 +56,17 @@ namespace Spring.Proxy TypeBuilder ProxyTypeBuilder { get; } */ /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the proxy instance on stack. /// /// The IL generator to use. void PushProxy(ILGenerator il); /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the target instance on which calls should be delegated to. /// /// The IL generator to use. - void PushTarget(ILGenerator il); + void PushTarget(ILGenerator il); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Proxy/InheritanceProxyTypeBuilder.cs b/src/Spring/Spring.Core/Proxy/InheritanceProxyTypeBuilder.cs index 3a4b15b0..2d2d304f 100644 --- a/src/Spring/Spring.Core/Proxy/InheritanceProxyTypeBuilder.cs +++ b/src/Spring/Spring.Core/Proxy/InheritanceProxyTypeBuilder.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Reflection; using System.Reflection.Emit; -#endregion - namespace Spring.Proxy { /// @@ -66,7 +61,7 @@ namespace Spring.Proxy #region Constructor(s) / Destructor /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// public InheritanceProxyTypeBuilder() @@ -130,7 +125,7 @@ namespace Spring.Proxy #region IProxyTypeGenerator Members /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the target instance on which calls should be delegated to. /// /// The IL generator to use. @@ -170,4 +165,4 @@ namespace Spring.Proxy #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Proxy/ProxyIgnoreAttribute.cs b/src/Spring/Spring.Core/Proxy/ProxyIgnoreAttribute.cs index 866b20ca..2a0f622d 100644 --- a/src/Spring/Spring.Core/Proxy/ProxyIgnoreAttribute.cs +++ b/src/Spring/Spring.Core/Proxy/ProxyIgnoreAttribute.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Proxy @@ -42,4 +40,4 @@ namespace Spring.Proxy { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Reflection/Dynamic/BaseDynamicMember.cs b/src/Spring/Spring.Core/Reflection/Dynamic/BaseDynamicMember.cs index 4c759eff..f0dea422 100644 --- a/src/Spring/Spring.Core/Reflection/Dynamic/BaseDynamicMember.cs +++ b/src/Spring/Spring.Core/Reflection/Dynamic/BaseDynamicMember.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Reflection; using System.Reflection.Emit; -#endregion - namespace Spring.Reflection.Dynamic { /// @@ -42,7 +37,7 @@ namespace Spring.Reflection.Dynamic | MethodAttributes.NewSlot | MethodAttributes.Virtual | MethodAttributes.Final; - private static ConstructorInfo invalidOperationException = + private static ConstructorInfo invalidOperationException = typeof(InvalidOperationException).GetConstructor(new Type[] { typeof(string) }); /// @@ -136,4 +131,4 @@ namespace Spring.Reflection.Dynamic } //#endif } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Reflection/Dynamic/DynamicConstructor.cs b/src/Spring/Spring.Core/Reflection/Dynamic/DynamicConstructor.cs index 53f2702c..16763933 100644 --- a/src/Spring/Spring.Core/Reflection/Dynamic/DynamicConstructor.cs +++ b/src/Spring/Spring.Core/Reflection/Dynamic/DynamicConstructor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System.Collections.Generic; using System.Reflection; using Spring.Util; -#endregion - namespace Spring.Reflection.Dynamic { #region IDynamicConstructor interface diff --git a/src/Spring/Spring.Core/Reflection/Dynamic/DynamicField.cs b/src/Spring/Spring.Core/Reflection/Dynamic/DynamicField.cs index c362d373..6e01e1b1 100644 --- a/src/Spring/Spring.Core/Reflection/Dynamic/DynamicField.cs +++ b/src/Spring/Spring.Core/Reflection/Dynamic/DynamicField.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System.Collections.Generic; using System.Reflection; using Spring.Util; -#endregion - namespace Spring.Reflection.Dynamic { #region IDynamicField interface diff --git a/src/Spring/Spring.Core/Reflection/Dynamic/DynamicMethod.cs b/src/Spring/Spring.Core/Reflection/Dynamic/DynamicMethod.cs index cb3a32c3..6977ad0c 100644 --- a/src/Spring/Spring.Core/Reflection/Dynamic/DynamicMethod.cs +++ b/src/Spring/Spring.Core/Reflection/Dynamic/DynamicMethod.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Reflection; using Spring.Util; @@ -127,7 +126,7 @@ namespace Spring.Reflection.Dynamic state = (SafeMethodState)stateCache[methodInfo]; if (state == null) { - state = newState; + state = newState; stateCache[methodInfo] = state; } } diff --git a/src/Spring/Spring.Core/Reflection/Dynamic/DynamicProperty.cs b/src/Spring/Spring.Core/Reflection/Dynamic/DynamicProperty.cs index d4198631..5ce0754f 100644 --- a/src/Spring/Spring.Core/Reflection/Dynamic/DynamicProperty.cs +++ b/src/Spring/Spring.Core/Reflection/Dynamic/DynamicProperty.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,17 +18,12 @@ #endregion -#region Imports - -using System.Collections.Generic; using System.Reflection; using Common.Logging; using Spring.Util; -#endregion - namespace Spring.Reflection.Dynamic { #region IDynamicProperty interface @@ -262,4 +257,4 @@ namespace Spring.Reflection.Dynamic return dynamicProperty; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Reflection/Dynamic/DynamicReflectionManager.cs b/src/Spring/Spring.Core/Reflection/Dynamic/DynamicReflectionManager.cs index 430c5e79..230e732a 100644 --- a/src/Spring/Spring.Core/Reflection/Dynamic/DynamicReflectionManager.cs +++ b/src/Spring/Spring.Core/Reflection/Dynamic/DynamicReflectionManager.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Reflection; using System.Reflection.Emit; @@ -30,8 +27,6 @@ using Spring.Util; using NetDynamicMethod = System.Reflection.Emit.DynamicMethod; -#endregion - namespace Spring.Reflection.Dynamic { /// @@ -108,7 +103,7 @@ namespace Spring.Reflection.Dynamic /// the field to create the delegate for /// a delegate that can be used to read the field. /// - /// If the field's returns true, the returned method + /// If the field's returns true, the returned method /// will throw an when called. /// public static FieldSetterDelegate CreateFieldSetter(FieldInfo fieldInfo) @@ -128,7 +123,7 @@ namespace Spring.Reflection.Dynamic /// the property to create the delegate for /// a delegate that can be used to read the property. /// - /// If the property's returns false, the returned method + /// If the property's returns false, the returned method /// will throw an when called. /// public static PropertyGetterDelegate CreatePropertyGetter(PropertyInfo propertyInfo) @@ -149,7 +144,7 @@ namespace Spring.Reflection.Dynamic /// the property to create the delegate for /// a delegate that can be used to write the property. /// - /// If the property's returns false, the returned method + /// If the property's returns false, the returned method /// will throw an when called. /// public static PropertySetterDelegate CreatePropertySetter(PropertyInfo propertyInfo) @@ -204,7 +199,7 @@ namespace Spring.Reflection.Dynamic /// Creates a instance with the highest possible code access security. /// /// - /// If allowed by security policy, associates the method with the s declaring type. + /// If allowed by security policy, associates the method with the s declaring type. /// Otherwise associates the dynamic method with . /// [MethodImpl(MethodImplOptions.NoInlining)] @@ -234,7 +229,7 @@ namespace Spring.Reflection.Dynamic } /* TODO (EE): I am not sure, if "skipVisibility" in "CreateDynamicMethodInternal" may be true all the time or if visibility needs to be calculated like below - * + * private static bool IsPublic(MemberInfo member) { if (member == null) return true; @@ -268,7 +263,7 @@ namespace Spring.Reflection.Dynamic { return false; } - if (member.MemberType == MemberTypes.Method + if (member.MemberType == MemberTypes.Method && !IsPublic(((MethodInfo)methodBase).ReturnType)) { return false; @@ -277,7 +272,7 @@ namespace Spring.Reflection.Dynamic { if (!IsPublic(arg.ParameterType)) return false; } - + return true; } case MemberTypes.NestedType: @@ -603,7 +598,7 @@ namespace Spring.Reflection.Dynamic private static readonly MethodInfo FnConvertArgumentIfNecessary = new ChangeTypeDelegate(ConvertValueTypeArgumentIfNecessary).Method; /// - /// Converts to an instance of if necessary to + /// Converts to an instance of if necessary to /// e.g. avoid e.g. double/int cast exceptions. /// /// @@ -613,7 +608,7 @@ namespace Spring.Reflection.Dynamic /// See about implicit, widening type conversions on MSDN - Type Conversion Tables /// /// - /// Note: is expected to be a value type! + /// Note: is expected to be a value type! /// /// public static object ConvertValueTypeArgumentIfNecessary(object value, Type targetType, int argIndex) @@ -765,4 +760,4 @@ namespace Spring.Reflection.Dynamic il.Emit(OpCodes.Throw); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Spring.Core.csproj b/src/Spring/Spring.Core/Spring.Core.csproj index 8d79718c..30f27dff 100644 --- a/src/Spring/Spring.Core/Spring.Core.csproj +++ b/src/Spring/Spring.Core/Spring.Core.csproj @@ -1,20 +1,25 @@  + netstandard2.0;$(TargetFullFrameworkVersion) Core functionality for Spring.Net IoC container 219, 162, 618, 1591 + + + + @@ -25,6 +30,12 @@ + + + + + + @@ -35,4 +46,5 @@ + \ No newline at end of file diff --git a/src/Spring/Spring.Core/Stereotype/ComponentAttribute.cs b/src/Spring/Spring.Core/Stereotype/ComponentAttribute.cs index 0b8c4d29..54f6790b 100644 --- a/src/Spring/Spring.Core/Stereotype/ComponentAttribute.cs +++ b/src/Spring/Spring.Core/Stereotype/ComponentAttribute.cs @@ -1,12 +1,10 @@ -using System; - namespace Spring.Stereotype { /// /// Indicates that an annotated class is a "component". - /// Such classes are considered as candidates for future features such + /// Such classes are considered as candidates for future features such /// as auto-detection when using attribute-based configuration and assembly scanning. /// /// Other class-level annotations may be considered as identifying @@ -51,4 +49,4 @@ namespace Spring.Stereotype { set { name = value; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Threading/Latch.cs b/src/Spring/Spring.Core/Threading/Latch.cs index 8df115ce..87632a70 100644 --- a/src/Spring/Spring.Core/Threading/Latch.cs +++ b/src/Spring/Spring.Core/Threading/Latch.cs @@ -1,13 +1,13 @@ #region License /* -* Copyright © 2002-2011 the original author or authors. -* +* Copyright � 2002-2011 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. * You may obtain a copy of the License at -* +* * http://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -16,7 +16,6 @@ */ #endregion -using System; using System.Threading; namespace Spring.Threading @@ -31,27 +30,27 @@ namespace Spring.Threading /// /// class Worker implements IRunnable { /// private readonly Latch startSignal; - /// Worker(Latch l) - /// { - /// startSignal = l; + /// Worker(Latch l) + /// { + /// startSignal = l; /// } /// /// public void Run() { /// startSignal.acquire(); /// DoWork(); /// } - /// + /// /// void DoWork() { ... } /// } - /// + /// /// class Driver { // ... /// void Main() { /// Latch go = new Latch(); /// for (int i = 0; i < N; ++i) // make threads /// new Thread(new ThreadStart(new Worker(go)).Start(); - /// DoSomethingElse(); // don't let run yet + /// DoSomethingElse(); // don't let run yet /// go.Release(); // let all threads proceed - /// } + /// } /// } /// /// @@ -117,7 +116,7 @@ namespace Spring.Threading } /// - /// Enable all current and future acquires to pass + /// Enable all current and future acquires to pass /// public void Release () { @@ -128,4 +127,4 @@ namespace Spring.Threading } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Threading/LogicalThreadContext.cs b/src/Spring/Spring.Core/Threading/LogicalThreadContext.cs index 0f80c4d7..38114d5a 100644 --- a/src/Spring/Spring.Core/Threading/LogicalThreadContext.cs +++ b/src/Spring/Spring.Core/Threading/LogicalThreadContext.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using Spring.Util; #endregion @@ -32,7 +31,7 @@ namespace Spring.Threading /// /// /// You may switch the storage strategy by calling .

- /// NOTE: Access to the underlying storage is not synchronized for performance reasons. + /// NOTE: Access to the underlying storage is not synchronized for performance reasons. /// You should call only once at application startup! /// /// Erich Eichinger @@ -42,7 +41,7 @@ namespace Spring.Threading /// Holds the current strategy. ///

/// - /// Access to this variable is not synchronized on purpose for performance reasons. + /// Access to this variable is not synchronized on purpose for performance reasons. /// Setting a different strategy should happen only once /// at application startup. /// @@ -96,4 +95,4 @@ namespace Spring.Threading threadStorage.FreeNamedDataSlot(name); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Threading/Semaphore.cs b/src/Spring/Spring.Core/Threading/Semaphore.cs index 8ce8f62f..da005c4c 100644 --- a/src/Spring/Spring.Core/Threading/Semaphore.cs +++ b/src/Spring/Spring.Core/Threading/Semaphore.cs @@ -1,13 +1,13 @@ #region License /* -* Copyright © 2002-2011 the original author or authors. -* +* Copyright � 2002-2011 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. * You may obtain a copy of the License at -* +* * http://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -16,7 +16,6 @@ */ #endregion -using System; using System.Threading; namespace Spring.Threading @@ -25,18 +24,18 @@ namespace Spring.Threading ///

Base class for counting semaphores based on Semaphore implementation /// from Doug Lea.

///
- /// - /// - ///

Conceptually, a semaphore - /// maintains a set of permits. Each acquire() blocks if + /// + /// + ///

Conceptually, a semaphore + /// maintains a set of permits. Each acquire() blocks if /// necessary until a permit is available, and then takes it.

- /// - ///

Each release adds a permit. However, no actual permit objects are used; - /// the Semaphore just keeps a count of the number available + /// + ///

Each release adds a permit. However, no actual permit objects are used; + /// the Semaphore just keeps a count of the number available /// and acts accordingly.

- /// + /// ///

A semaphore initialized to 1 can serve as a mutual exclusion lock.

- /// + /// /// Used for implementation of a ///
/// Doug Lea @@ -50,40 +49,40 @@ namespace Spring.Threading /// ///

Create a Semaphore with the given initial number of permits.

- ///

Using a seed of 1 makes the semaphore act as a mutual + ///

Using a seed of 1 makes the semaphore act as a mutual /// exclusion lock.

- /// - ///

Negative seeds are also allowed, - /// in which case no acquires will proceed until the number of + /// + ///

Negative seeds are also allowed, + /// in which case no acquires will proceed until the number of /// releases has pushed the number of permits past 0.

///
public Semaphore(long initialPermits) { nPermits = initialPermits; } - + /// /// Release a permit /// - public virtual void Release () + public virtual void Release () { - lock (this) + lock (this) { ++nPermits; Monitor.Pulse(this); } } - + /// /// Acquire a permit /// - public virtual void Acquire () + public virtual void Acquire () { - lock (this) + lock (this) { - try + try { - while (nPermits <= 0) + while (nPermits <= 0) Monitor.Wait(this); --nPermits; } @@ -117,7 +116,7 @@ namespace Spring.Threading { double startTime = Utils.CurrentTimeMillis; long waitTime = msecs; - + for (; ; ) { Monitor.Wait(this, TimeSpan.FromMilliseconds(waitTime)); @@ -151,7 +150,7 @@ namespace Spring.Threading /// But may be more efficient in some semaphore implementations. ///
/// if n is negative. - /// + /// /// public virtual void Release(long n) { @@ -159,7 +158,7 @@ namespace Spring.Threading { if (n < 0) throw new ArgumentOutOfRangeException("n", n, "Negative argument"); - + nPermits += n; for (long i = 0; i < n; ++i) Monitor.Pulse(this); diff --git a/src/Spring/Spring.Core/Threading/SyncHolder.cs b/src/Spring/Spring.Core/Threading/SyncHolder.cs index 4681d5df..304e91f2 100644 --- a/src/Spring/Spring.Core/Threading/SyncHolder.cs +++ b/src/Spring/Spring.Core/Threading/SyncHolder.cs @@ -1,13 +1,13 @@ #region License /* -* Copyright © 2002-2011 the original author or authors. -* +* Copyright � 2002-2011 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. * You may obtain a copy of the License at -* +* * http://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -16,12 +16,10 @@ */ #endregion -using System; - namespace Spring.Threading { /// - /// Utility class to use an with the + /// Utility class to use an with the /// C# using () {} idiom /// public class SyncHolder : IDisposable @@ -29,7 +27,7 @@ namespace Spring.Threading ISync _sync; /// - /// Creates a new trying to the given + /// Creates a new trying to the given /// /// /// the to be held @@ -39,7 +37,7 @@ namespace Spring.Threading } /// - /// Creates a new trying to the given + /// Creates a new trying to the given /// /// /// the to be held diff --git a/src/Spring/Spring.Core/Threading/ThreadStaticStorage.cs b/src/Spring/Spring.Core/Threading/ThreadStaticStorage.cs index ea120cba..83679129 100644 --- a/src/Spring/Spring.Core/Threading/ThreadStaticStorage.cs +++ b/src/Spring/Spring.Core/Threading/ThreadStaticStorage.cs @@ -1,4 +1,3 @@ -using System; using System.Collections; namespace Spring.Threading @@ -50,4 +49,4 @@ namespace Spring.Threading Data.Remove(name); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Threading/TimeoutException.cs b/src/Spring/Spring.Core/Threading/TimeoutException.cs index 4fee4cb1..8fd86bd4 100644 --- a/src/Spring/Spring.Core/Threading/TimeoutException.cs +++ b/src/Spring/Spring.Core/Threading/TimeoutException.cs @@ -1,14 +1,14 @@ #region License /* -* Copyright © 2002-2011 the original author or authors. -* +* Copyright � 2002-2011 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. * You may obtain a copy of the License at -* +* * http://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using System.Threading; @@ -36,14 +35,14 @@ namespace Spring.Threading /// as a form (subclass) of InterruptedException. This both /// simplifies handling, and conceptually reflects the fact that /// timed-out operations are artificially interrupted by timers. - /// + /// ///
[Serializable] public class TimeoutException : ThreadInterruptedException { - /// The approximate time that the operation lasted before + /// The approximate time that the operation lasted before /// this timeout exception was thrown. - /// + /// /// private readonly long _duration; /// @@ -100,7 +99,7 @@ namespace Spring.Threading base.GetObjectData( info, context ); } /// Constructs a TimeoutException with given duration value. - /// + /// /// public TimeoutException( long time ) { @@ -113,8 +112,8 @@ namespace Spring.Threading { _duration = time; } - /// - /// Gets the approximate time that the operation lasted before + /// + /// Gets the approximate time that the operation lasted before /// this timeout exception was thrown. /// public long Duration @@ -125,4 +124,4 @@ namespace Spring.Threading } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Threading/Utils.cs b/src/Spring/Spring.Core/Threading/Utils.cs index 96646d2a..4ad5a3dd 100644 --- a/src/Spring/Spring.Core/Threading/Utils.cs +++ b/src/Spring/Spring.Core/Threading/Utils.cs @@ -1,14 +1,14 @@ #region License /* -* Copyright © 2002-2011 the original author or authors. -* +* Copyright � 2002-2011 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. * You may obtain a copy of the License at -* +* * http://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,6 @@ #endregion -using System; using System.Threading; namespace Spring.Threading @@ -37,11 +36,11 @@ namespace Spring.Threading /// /// .NET threads have not a method to check if they have been interrupted. /// Moreover, differently from java threads, when entering locked - /// blocks, Monitor, Sleep, SpinWait and so on, a + /// blocks, Monitor, Sleep, SpinWait and so on, a /// will be raised by the runtime. ///

Spring.Threading classes usually call this method before entering a lock block, to mirror java code - ///

Usually this is non issue because the same exception will be raised entering the monitor - /// associated with the lock () + ///

Usually this is non issue because the same exception will be raised entering the monitor + /// associated with the lock () ///

///
/// if the thread has been interrupted @@ -60,7 +59,7 @@ namespace Spring.Threading } /// - /// Normalize the given so that + /// Normalize the given so that /// is is comparable with . /// /// Date. @@ -73,7 +72,7 @@ namespace Spring.Threading } /// - /// + /// /// /// /// @@ -109,7 +108,7 @@ namespace Spring.Threading public static TimeSpan NanoSecondsTimeSpan(long nanoSeconds ) { int milliseconds = Convert.ToInt32(nanoSeconds / 1000000); - return new TimeSpan(0,0,0,0, milliseconds); + return new TimeSpan(0,0,0,0, milliseconds); } /// @@ -133,4 +132,4 @@ namespace Spring.Threading } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/ArrayUtils.cs b/src/Spring/Spring.Core/Util/ArrayUtils.cs index 2e9dc7a1..5ae15c1c 100644 --- a/src/Spring/Spring.Core/Util/ArrayUtils.cs +++ b/src/Spring/Spring.Core/Util/ArrayUtils.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.Text; @@ -103,7 +102,7 @@ namespace Spring.Util { object elemA = a.GetValue(i); object elemB = b.GetValue(i); - + if (elemA is Array && elemB is Array) { if (!AreEqual(elemA as Array, elemB as Array)) @@ -184,10 +183,10 @@ namespace Spring.Util { object val = array.GetValue(i); sb.Append(val == null ? "null" : val.ToString()); - + if (i < array.Length - 1) { - sb.Append(", "); + sb.Append(", "); } } @@ -200,7 +199,7 @@ namespace Spring.Util /// Concatenates 2 arrays of compatible element types /// /// - /// If either of the arguments is null, the other array is returned as the result. + /// If either of the arguments is null, the other array is returned as the result. /// The array element types may differ as long as they are assignable. The result array will be of the "smaller" element type. /// public static Array Concat(Array first, Array second) @@ -229,4 +228,4 @@ namespace Spring.Util return result; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/AssertUtils.cs b/src/Spring/Spring.Core/Util/AssertUtils.cs index b161cb0a..8b6f0043 100644 --- a/src/Spring/Spring.Core/Util/AssertUtils.cs +++ b/src/Spring/Spring.Core/Util/AssertUtils.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Reflection; using System.Runtime.CompilerServices; @@ -39,7 +38,7 @@ namespace Spring.Util public static class AssertUtils { /// - /// Checks, whether may be invoked on . + /// Checks, whether may be invoked on . /// Supports testing transparent proxies. /// ///the target instance or null @@ -80,7 +79,7 @@ namespace Spring.Util /// if is null /// /// - /// if it is not possible to invoke methods of + /// if it is not possible to invoke methods of /// type on /// public static void Understands(object target, string targetName, Type requiredType) @@ -105,7 +104,7 @@ namespace Spring.Util return; } ThrowNotSupportedException( - $"Target '{targetName}' is a transparent proxy that does not support methods of '{requiredType.FullName}'."); + $"Target '{targetName}' is a transparent proxy that does not support methods of '{requiredType.FullName}'."); } targetType = rp.GetProxiedType(); #endif @@ -117,7 +116,7 @@ namespace Spring.Util if (!requiredType.IsAssignableFrom(targetType)) { - ThrowNotSupportedException($"Target '{targetName}' of type '{targetType}' does not support methods of '{requiredType.FullName}'."); + ThrowNotSupportedException($"Target '{targetName}' of type '{targetType}' does not support methods of '{requiredType.FullName}'."); } } @@ -251,7 +250,7 @@ namespace Spring.Util /// The array or collection to check. /// The argument name. /// - /// If the supplied is , + /// If the supplied is , /// contains no elements or only null elements. /// public static void ArgumentHasElements(ICollection argument, string name) @@ -261,11 +260,11 @@ namespace Spring.Util ThrowArgumentException( name, $"Argument '{name}' must not be null or resolve to an empty collection and must contain non-null elements"); - } + } } /// - /// Checks whether the specified can be cast + /// Checks whether the specified can be cast /// into the . /// /// @@ -348,20 +347,20 @@ namespace Spring.Util { throw new ArgumentNullException(paramName, $"Argument '{paramName}' cannot be null."); } - + private static void ThrowArgumentNullException(string paramName, string message) { throw new ArgumentNullException(paramName, message); } - + private static void ThrowArgumentException(string message) { throw new ArgumentException(message); } - + private static void ThrowArgumentException(string message, string paramName) { throw new ArgumentException(message, paramName); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/AttributeUtils.cs b/src/Spring/Spring.Core/Util/AttributeUtils.cs index d4129cb2..c405c8bc 100644 --- a/src/Spring/Spring.Core/Util/AttributeUtils.cs +++ b/src/Spring/Spring.Core/Util/AttributeUtils.cs @@ -1,8 +1,3 @@ - - -using System; -using System.Collections.Generic; - namespace Spring.Util { /// @@ -11,9 +6,9 @@ namespace Spring.Util public class AttributeUtils { /// - /// Find a single Attribute of the type 'attributeType' from the supplied class, - /// traversing it interfaces and super classes if no attribute can be found on the - /// class iteslf. + /// Find a single Attribute of the type 'attributeType' from the supplied class, + /// traversing it interfaces and super classes if no attribute can be found on the + /// class iteslf. /// /// /// This method explicitly handles class-level attributes which are not declared as @@ -85,4 +80,4 @@ namespace Spring.Util } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/CollectionUtils.cs b/src/Spring/Spring.Core/Util/CollectionUtils.cs index 652906aa..ec9f93fe 100644 --- a/src/Spring/Spring.Core/Util/CollectionUtils.cs +++ b/src/Spring/Spring.Core/Util/CollectionUtils.cs @@ -1,12 +1,12 @@ /* * Copyright © 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Collections; using System.Reflection; @@ -248,7 +247,7 @@ namespace Spring.Util } /// - /// Copies the elements of the to a + /// Copies the elements of the to a /// new array of the specified element type. /// /// The instance to be converted. @@ -356,14 +355,14 @@ namespace Spring.Util } /// - /// Find a value of one of the given types in the given Collection, + /// Find a value of one of the given types in the given Collection, /// searching the Collection for a value of the first type, then /// searching for a value of the second type, etc. /// /// The collection to search. /// The types to look for, in prioritized order. /// a value of the given types found, or null if none - /// If more than one value of the given type is found + /// If more than one value of the given type is found public static object FindValueOfType(ICollection collection, Type[] types) { if (IsEmpty(collection) || ObjectUtils.IsEmpty(types)) @@ -564,4 +563,4 @@ namespace Spring.Util } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/CompareUtils.cs b/src/Spring/Spring.Core/Util/CompareUtils.cs index 62392a58..09de2a60 100644 --- a/src/Spring/Spring.Core/Util/CompareUtils.cs +++ b/src/Spring/Spring.Core/Util/CompareUtils.cs @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Util @@ -36,7 +34,7 @@ namespace Spring.Util /// First object. /// Second object. /// - /// 0, if objects are equal; + /// 0, if objects are equal; /// less than zero, if the first object is smaller than the second one; /// greater than zero, if the first object is greater than the second one. public static int Compare(object first, object second) diff --git a/src/Spring/Spring.Core/Util/ConfigXmlDocument.cs b/src/Spring/Spring.Core/Util/ConfigXmlDocument.cs index 5b213f97..e1aa4d21 100644 --- a/src/Spring/Spring.Core/Util/ConfigXmlDocument.cs +++ b/src/Spring/Spring.Core/Util/ConfigXmlDocument.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; -using System.IO; using System.Xml; #endregion @@ -33,7 +31,7 @@ namespace Spring.Util /// about their location in the original XML text document the were read from. /// /// - /// When loading a document, the used must implement . + /// When loading a document, the used must implement . /// Typical XmlReader implementations like support this interface. /// /// Erich Eichinger @@ -79,7 +77,7 @@ namespace Spring.Util /// /// Get info about the current text position during loading a document. - /// Outside loading a document, the properties of + /// Outside loading a document, the properties of /// will always be null. /// protected ITextPosition CurrentTextPosition @@ -88,7 +86,7 @@ namespace Spring.Util } /// - /// Overridden to create a retaining the current + /// Overridden to create a retaining the current /// text position information. /// public override XmlElement CreateElement(string prefix, string localName, string namespaceURI) @@ -97,7 +95,7 @@ namespace Spring.Util } /// - /// Overridden to create a retaining the current + /// Overridden to create a retaining the current /// text position information. /// public override XmlAttribute CreateAttribute(string prefix, string localName, string namespaceURI) @@ -107,7 +105,7 @@ namespace Spring.Util /// /// Load the document from the given . - /// Child nodes will store as their property. + /// Child nodes will store as their property. /// ///the name of the resource ///The XML source @@ -144,7 +142,7 @@ namespace Spring.Util /// /// Load the document from the given . - /// Child nodes will store as their property. + /// Child nodes will store as their property. /// ///the name of the resource ///The XML source @@ -165,7 +163,7 @@ namespace Spring.Util /// /// Load the document from the given . - /// Child nodes will store as their property. + /// Child nodes will store as their property. /// ///the name of the resource ///The XML source @@ -184,7 +182,7 @@ namespace Spring.Util /// /// Load the document from the given . - /// Child nodes will store as their property. + /// Child nodes will store as their property. /// ///the name of the resource ///The XML source @@ -203,7 +201,7 @@ namespace Spring.Util /// /// Load the document from the given . - /// Child nodes will store as their property. + /// Child nodes will store as their property. /// ///the name of the resource ///The XML source @@ -222,7 +220,7 @@ namespace Spring.Util /// /// Load the document from the given . - /// Child nodes will store null as their property. + /// Child nodes will store null as their property. /// /// The XML source public override void Load(XmlReader reader) @@ -240,7 +238,7 @@ namespace Spring.Util /// ///Creates an object based on the information in the . The reader must be positioned on a node or attribute. - ///Child nodes will store as their property. + ///Child nodes will store as their property. /// /// ///The new XmlNode or null if no more nodes exist. @@ -264,7 +262,7 @@ namespace Spring.Util /// ///Creates an object based on the information in the . The reader must be positioned on a node or attribute. - ///Child nodes will store null as their property. + ///Child nodes will store null as their property. /// /// ///The new XmlNode or null if no more nodes exist. diff --git a/src/Spring/Spring.Core/Util/ConfigurationUtils.cs b/src/Spring/Spring.Core/Util/ConfigurationUtils.cs index e53ee6f9..525d3210 100644 --- a/src/Spring/Spring.Core/Util/ConfigurationUtils.cs +++ b/src/Spring/Spring.Core/Util/ConfigurationUtils.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Collections.Concurrent; using System.Configuration; using System.Reflection; @@ -30,13 +29,13 @@ namespace Spring.Util { private static readonly ConcurrentDictionary cachedSections = new ConcurrentDictionary(); - + /// /// Parses the configuration section. /// /// ///

- /// Primary purpose of this method is to allow us to parse and + /// Primary purpose of this method is to allow us to parse and /// load configuration sections using the same API regardless /// of the .NET framework version. ///

@@ -80,7 +79,7 @@ namespace Spring.Util ///
/// ///

- /// Primary purpose of this method is to allow us to parse and + /// Primary purpose of this method is to allow us to parse and /// load configuration sections using the same API regardless /// of the .NET framework version. ///

@@ -281,4 +280,4 @@ namespace Spring.Util initStateRef.SetValue(null, notStarted); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/DelegateInfo.cs b/src/Spring/Spring.Core/Util/DelegateInfo.cs index 6f35e78d..27d56040 100644 --- a/src/Spring/Spring.Core/Util/DelegateInfo.cs +++ b/src/Spring/Spring.Core/Util/DelegateInfo.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; #endregion @@ -171,7 +170,7 @@ namespace Spring.Util } /// - /// Gets the return of the + /// Gets the return of the /// method signature associated with this delegate type. /// /// The return . @@ -227,7 +226,7 @@ namespace Spring.Util /// is compatible with the signature /// expected by the supplied ; /// if not or either of the supplied - /// parameters is . + /// parameters is . /// /// public static bool IsSignatureCompatible( diff --git a/src/Spring/Spring.Core/Util/DynamicCodeManager.cs b/src/Spring/Spring.Core/Util/DynamicCodeManager.cs index 0909b991..c083639a 100644 --- a/src/Spring/Spring.Core/Util/DynamicCodeManager.cs +++ b/src/Spring/Spring.Core/Util/DynamicCodeManager.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.Diagnostics; using System.Reflection; @@ -168,4 +167,4 @@ namespace Spring.Util } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/EventUtils.cs b/src/Spring/Spring.Core/Util/EventUtils.cs index 6d897724..71ee6708 100644 --- a/src/Spring/Spring.Core/Util/EventUtils.cs +++ b/src/Spring/Spring.Core/Util/EventUtils.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Diagnostics; using System.Reflection; @@ -91,14 +89,14 @@ namespace Spring.Util /// The event to be raised. /// The arguments to the event. /// a map of sink/exception entries that occurred during event raising - public virtual IEventExceptionsCollector Raise(Delegate source, params object[] arguments) + public virtual IEventExceptionsCollector Raise(Delegate source, params object[] arguments) { EventExceptionsCollector exceptions = new EventExceptionsCollector(); if (source != null) { Delegate [] delegates = source.GetInvocationList (); - foreach (Delegate sink in delegates) + foreach (Delegate sink in delegates) { Invoke (sink, arguments, exceptions); } @@ -113,13 +111,13 @@ namespace Spring.Util /// The sink to be invoked. /// The arguments to the sink. /// the map of sink/exception entries to add any exception to - protected virtual void Invoke(Delegate sink, object[] arguments, EventExceptionsCollector exceptions) + protected virtual void Invoke(Delegate sink, object[] arguments, EventExceptionsCollector exceptions) { - try + try { sink.DynamicInvoke (arguments); - } - catch (TargetInvocationException ex) + } + catch (TargetInvocationException ex) { // unwrap the exception that actually caused the TargetInvocationException and throw that... Exception cause = ReflectionUtils.UnwrapTargetInvocationException(ex); @@ -149,9 +147,9 @@ namespace Spring.Util /// The sink to be invoked. /// The arguments to the sink. /// the map of sink/exception entries to add any exception to - protected override void Invoke(Delegate sink, object[] arguments, EventExceptionsCollector exceptions) + protected override void Invoke(Delegate sink, object[] arguments, EventExceptionsCollector exceptions) { - try + try { sink.DynamicInvoke (arguments); } diff --git a/src/Spring/Spring.Core/Util/FatalReflectionException.cs b/src/Spring/Spring.Core/Util/FatalReflectionException.cs index f618449e..c4d86347 100644 --- a/src/Spring/Spring.Core/Util/FatalReflectionException.cs +++ b/src/Spring/Spring.Core/Util/FatalReflectionException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; #endregion @@ -86,4 +85,4 @@ namespace Spring.Util { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/Generic/CollectionUtils.cs b/src/Spring/Spring.Core/Util/Generic/CollectionUtils.cs index b07cc1ee..1bf0914d 100644 --- a/src/Spring/Spring.Core/Util/Generic/CollectionUtils.cs +++ b/src/Spring/Spring.Core/Util/Generic/CollectionUtils.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -20,9 +20,7 @@ #region Imports -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; #endregion @@ -147,7 +145,7 @@ namespace Spring.Util.Generic { if (targetCollection.Contains(element)) { - targetCollection.Remove(element); + targetCollection.Remove(element); } } } diff --git a/src/Spring/Spring.Core/Util/IErrorHandler.cs b/src/Spring/Spring.Core/Util/IErrorHandler.cs index d113c9c7..82cf42a0 100644 --- a/src/Spring/Spring.Core/Util/IErrorHandler.cs +++ b/src/Spring/Spring.Core/Util/IErrorHandler.cs @@ -18,12 +18,10 @@ #endregion -using System; - namespace Spring.Util { /// - /// A strategy for handling errors. This is especially useful for handling + /// A strategy for handling errors. This is especially useful for handling /// errors that occur during asynchronous execution as in such cases it may not be /// possible to throw the error to the original caller. /// @@ -39,4 +37,4 @@ namespace Spring.Util } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/IEventExceptionsCollector.cs b/src/Spring/Spring.Core/Util/IEventExceptionsCollector.cs index 710f1cf6..ee1fbd8b 100644 --- a/src/Spring/Spring.Core/Util/IEventExceptionsCollector.cs +++ b/src/Spring/Spring.Core/Util/IEventExceptionsCollector.cs @@ -1,6 +1,3 @@ -using System; -using System.Collections.Generic; - namespace Spring.Util { public interface IEventExceptionsCollector @@ -10,4 +7,4 @@ namespace Spring.Util IList Exceptions { get; } Exception this[Delegate source] { get; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/IoUtils.cs b/src/Spring/Spring.Core/Util/IoUtils.cs index 2d405aff..ed187e11 100644 --- a/src/Spring/Spring.Core/Util/IoUtils.cs +++ b/src/Spring/Spring.Core/Util/IoUtils.cs @@ -1,6 +1,3 @@ -using System; -using System.IO; - namespace Spring.Util { /// @@ -14,7 +11,7 @@ namespace Spring.Util } /// - /// Copies one stream into another. + /// Copies one stream into another. /// (Don't forget to call on the destination stream!) /// /// @@ -33,7 +30,7 @@ namespace Spring.Util } /// - /// Reads a stream into a byte array. + /// Reads a stream into a byte array. /// /// /// Does not close the input stream! diff --git a/src/Spring/Spring.Core/Util/NumberUtils.cs b/src/Spring/Spring.Core/Util/NumberUtils.cs index db1f5bdd..fcf4c68a 100644 --- a/src/Spring/Spring.Core/Util/NumberUtils.cs +++ b/src/Spring/Spring.Core/Util/NumberUtils.cs @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.ComponentModel; -#endregion - namespace Spring.Util { /// @@ -579,4 +574,4 @@ namespace Spring.Util #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/ObjectUtils.cs b/src/Spring/Spring.Core/Util/ObjectUtils.cs index 7d7d1c33..b6665465 100644 --- a/src/Spring/Spring.Core/Util/ObjectUtils.cs +++ b/src/Spring/Spring.Core/Util/ObjectUtils.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Collections; using System.Globalization; using System.Reflection; @@ -83,7 +82,7 @@ namespace Spring.Util /// The assembly. /// Name of the type. /// - /// + /// /// If the or is /// /// @@ -116,11 +115,11 @@ namespace Spring.Util /// The to instantiate* /// /// A new instance of the . - /// + /// /// If the is /// /// - /// If the is an abstract class, an interface, + /// If the is an abstract class, an interface, /// an open generic type or does not have a public no-argument constructor. /// public static object InstantiateType(Type type) @@ -196,11 +195,11 @@ namespace Spring.Util /// The arguments to be passed to the constructor. /// /// A new instance. - /// + /// /// If the is /// /// - /// If the 's declaring type is an abstract class, + /// If the 's declaring type is an abstract class, /// an interface, an open generic type or does not have a public no-argument constructor. /// public static object InstantiateType(ConstructorInfo constructor, object[] arguments) @@ -246,7 +245,7 @@ namespace Spring.Util /// /// Checks whether the supplied is not a transparent proxy and is - /// assignable to the supplied . + /// assignable to the supplied . /// /// ///

@@ -530,7 +529,7 @@ namespace Spring.Util } ///

- /// Gets the qualified name of the given method, consisting of + /// Gets the qualified name of the given method, consisting of /// fully qualified interface/class name + "." method name. /// /// The method. diff --git a/src/Spring/Spring.Core/Util/PathMatcher.cs b/src/Spring/Spring.Core/Util/PathMatcher.cs index a7e9b5a0..67110885 100644 --- a/src/Spring/Spring.Core/Util/PathMatcher.cs +++ b/src/Spring/Spring.Core/Util/PathMatcher.cs @@ -2,14 +2,14 @@ #region License /* -* Copyright © 2002-2011 the original author or authors. -* +* Copyright � 2002-2011 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. * You may obtain a copy of the License at -* +* * http://www.apache.org/licenses/LICENSE-2.0 -* +* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -21,7 +21,6 @@ #region Imports -using System; using System.Text; using System.Text.RegularExpressions; @@ -225,4 +224,4 @@ namespace Spring.Util #endregion } } -//// \ No newline at end of file +//// diff --git a/src/Spring/Spring.Core/Util/PatternMatchUtils.cs b/src/Spring/Spring.Core/Util/PatternMatchUtils.cs index fb5050cf..c44728d5 100644 --- a/src/Spring/Spring.Core/Util/PatternMatchUtils.cs +++ b/src/Spring/Spring.Core/Util/PatternMatchUtils.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -16,12 +16,6 @@ * limitations under the License. */ -#endregion - -#region Imports - - - #endregion namespace Spring.Util @@ -83,7 +77,7 @@ namespace Spring.Util { for (int i = 0; i < patterns.Length; i++) { - + if (SimpleMatch(patterns[i], str)) { return true; @@ -94,4 +88,4 @@ namespace Spring.Util } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/Properties.cs b/src/Spring/Spring.Core/Util/Properties.cs index 3b8772a2..3cd6d05b 100644 --- a/src/Spring/Spring.Core/Util/Properties.cs +++ b/src/Spring/Spring.Core/Util/Properties.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,13 +18,7 @@ #endregion -#region Imports - -using System; using System.Collections; -using System.IO; - -#endregion namespace Spring.Util { @@ -40,13 +34,13 @@ namespace Spring.Util /// key2: /// key3 /// - /// will result in the name/value pairs: + /// will result in the name/value pairs: /// /// key1:="value" /// key2:=string.Empty /// key3:=<null> /// - /// note, that to specify a null value, the key must not be followed by any character except newline. + /// note, that to specify a null value, the key must not be followed by any character except newline. /// ///
/// Simon White @@ -226,7 +220,7 @@ namespace Spring.Util { // this is an extension to support key-only lines and specifying null values value = null; - } + } else if (index == len) { value = string.Empty; @@ -237,7 +231,7 @@ namespace Spring.Util value = RemoveLeadingWhitespace(value); } - if (value != null && value.Length > 0 + if (value != null && value.Length > 0 && Separators.IndexOf(value[0]) != -1) { value = value.Substring(1); @@ -350,4 +344,4 @@ namespace Spring.Util #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/ReflectionException.cs b/src/Spring/Spring.Core/Util/ReflectionException.cs index ae9403ce..680207f4 100644 --- a/src/Spring/Spring.Core/Util/ReflectionException.cs +++ b/src/Spring/Spring.Core/Util/ReflectionException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Runtime.Serialization; #endregion @@ -84,4 +83,4 @@ namespace Spring.Util } #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/ReflectionUtils.cs b/src/Spring/Spring.Core/Util/ReflectionUtils.cs index 9c86cdbe..ae394642 100644 --- a/src/Spring/Spring.Core/Util/ReflectionUtils.cs +++ b/src/Spring/Spring.Core/Util/ReflectionUtils.cs @@ -18,11 +18,7 @@ #endregion -#region Imports - -using System; using System.Collections; -using System.Collections.Generic; using System.Globalization; using System.Reflection; using System.Reflection.Emit; @@ -30,8 +26,6 @@ using System.Security.Permissions; using System.Text; using System.Runtime.CompilerServices; -#endregion - namespace Spring.Util { /// @@ -103,8 +97,8 @@ namespace Spring.Util /// /// /// Searches with BindingFlags - /// When dealing with interface methods, you probable want to 'normalize' method references by calling - /// . + /// When dealing with interface methods, you probable want to 'normalize' method references by calling + /// . /// /// /// @@ -130,8 +124,8 @@ namespace Spring.Util ///
/// /// Searches with BindingFlags - /// When dealing with interface methods, you probable want to 'normalize' method references by calling - /// . + /// When dealing with interface methods, you probable want to 'normalize' method references by calling + /// . /// /// /// @@ -149,7 +143,7 @@ namespace Spring.Util Type targetType, string method, Type[] argumentTypes, int genericArgumentsCount) { AssertUtils.ArgumentNotNull(targetType, "Type must not be null"); - + MethodInfo retMethod = null; MethodInfo[] methods = targetType.GetMethods(ReflectionUtils.AllMembersCaseInsensitiveFlags); @@ -266,7 +260,7 @@ namespace Spring.Util { return EmptyTypes; } - + var types = new Type[args.Length]; for (int i = 0; i < (uint) args.Length; i++) { @@ -276,7 +270,7 @@ namespace Spring.Util } /// - /// Returns an array of s that represent + /// Returns an array of s that represent /// the names of the generic type parameter. /// /// The method. @@ -291,7 +285,7 @@ namespace Spring.Util } /// - /// Returns an array of s that represent + /// Returns an array of s that represent /// the names of the generic type parameter. /// /// The parameter info array. @@ -534,8 +528,8 @@ namespace Spring.Util } /// - /// Convenience method to convert an interface - /// to a array that contains + /// Convenience method to convert an interface + /// to a array that contains /// all the interfaces inherited and the specified interface. /// /// The interface to convert. @@ -859,7 +853,7 @@ namespace Spring.Util } /// - /// Within , counts the number of overloads for the method with the given (case-insensitive!) + /// Within , counts the number of overloads for the method with the given (case-insensitive!) /// /// The type to be searched /// the name of the method for which overloads shall be counted @@ -1079,7 +1073,7 @@ namespace Spring.Util /// Creates a . ///
/// - /// The to create + /// The to create /// the custom attribute builder from. /// /// A custom attribute builder. @@ -1104,7 +1098,7 @@ namespace Spring.Util FieldInfo[] attributeFields = attributeType.GetFields( BindingFlags.Instance | BindingFlags.Public); - // Not using generics bellow as probably Spring.NET tries to keep + // Not using generics bellow as probably Spring.NET tries to keep // it on .NET1 compatibility level right now I believe (SD) // In case of using List the above note makes // no sense (SD:) @@ -1226,7 +1220,7 @@ namespace Spring.Util ///
/// The type or method to find attributes for. /// - /// A list of custom attributes (CustomAttributeData or Attribute instances) + /// A list of custom attributes (CustomAttributeData or Attribute instances) /// that should be applied to type or method. /// public static IList GetCustomAttributes(MemberInfo member) @@ -1359,7 +1353,7 @@ namespace Spring.Util typeof(Exception).GetMethod("InternalPreserveStackTrace", BindingFlags.Instance | BindingFlags.NonPublic); /// - /// Unwraps the supplied + /// Unwraps the supplied /// and returns the inner exception preserving the stack trace. /// /// @@ -1402,13 +1396,13 @@ namespace Spring.Util } /// - /// Is the supplied can be accessed + /// Is the supplied can be accessed /// from the supplied friendly assembly ? /// /// The type to check. /// The friendly assembly name. /// - /// if the type can be accessed + /// if the type can be accessed /// from the supplied friendly assembly; Otherwise . /// public static bool IsTypeVisible(Type type, string friendlyAssemblyName) @@ -1438,7 +1432,7 @@ namespace Spring.Util } /// - /// Gets all of the interfaces implemented by + /// Gets all of the interfaces implemented by /// the specified . /// /// @@ -1469,7 +1463,7 @@ namespace Spring.Util /// Returns the explicit that is the root cause of an exception. ///
/// - /// If the InnerException property of the current exception is a null reference + /// If the InnerException property of the current exception is a null reference /// or a , returns the current exception. /// /// The last exception thrown. @@ -1489,7 +1483,7 @@ namespace Spring.Util } /// - /// Copies all fields from one object to another. + /// Copies all fields from one object to another. /// /// /// The types of both objects must be related. This means, that either of the following is true: @@ -1701,7 +1695,7 @@ namespace Spring.Util #region Constructor(s) / Destructor /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// The custom attribute type. @@ -1712,7 +1706,7 @@ namespace Spring.Util } /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// The custom attribute type. @@ -1737,7 +1731,7 @@ namespace Spring.Util #region Public Methods /// - /// Adds the specified values to the constructor argument list + /// Adds the specified values to the constructor argument list /// used to create the custom attribute. /// /// An array of argument values. @@ -1796,4 +1790,4 @@ namespace Spring.Util #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/SecurityCritical.cs b/src/Spring/Spring.Core/Util/SecurityCritical.cs index 766a07a3..14edb1be 100644 --- a/src/Spring/Spring.Core/Util/SecurityCritical.cs +++ b/src/Spring/Spring.Core/Util/SecurityCritical.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -19,14 +19,13 @@ #endregion #if !NETSTANDARD -using System; using System.Runtime.CompilerServices; using System.Security; namespace Spring.Util { /// - /// Utility class to be used from within this assembly for executing security critical code + /// Utility class to be used from within this assembly for executing security critical code /// NEVER EVER MAKE THIS PUBLIC! /// /// Erich Eichinger @@ -48,4 +47,4 @@ namespace Spring.Util } } } -#endif \ No newline at end of file +#endif diff --git a/src/Spring/Spring.Core/Util/StringUtils.cs b/src/Spring/Spring.Core/Util/StringUtils.cs index 2caffa53..d9c8031a 100644 --- a/src/Spring/Spring.Core/Util/StringUtils.cs +++ b/src/Spring/Spring.Core/Util/StringUtils.cs @@ -14,8 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; using System.Globalization; using System.Runtime.CompilerServices; using System.Text; @@ -132,7 +130,7 @@ namespace Spring.Util quoteChars = string.Empty; } AssertUtils.IsTrue( quoteChars.Length % 2 == 0, "the number of quote characters must be even" ); - + char[] delimiterChars = delimiters.ToCharArray(); // scan separator positions @@ -154,7 +152,7 @@ namespace Spring.Util } startIndex = delimiterPositions[ixSep] + 1; } - // add remainder + // add remainder if (startIndex < s.Length) { string token = s.Substring(startIndex); @@ -257,7 +255,7 @@ namespace Spring.Util /// If the supplied is a /// or zero-length string, then a single element /// array composed of the supplied - /// will be + /// will be /// eturned. If the supplied /// is , then an empty, /// zero-length array will be returned. @@ -541,7 +539,7 @@ namespace Spring.Util ///
/// ///

- /// + /// ///

///
/// The string to set the value in. @@ -674,4 +672,4 @@ namespace Spring.Util return sb.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/SystemUtils.cs b/src/Spring/Spring.Core/Util/SystemUtils.cs index 453ffcc0..01aab3ee 100644 --- a/src/Spring/Spring.Core/Util/SystemUtils.cs +++ b/src/Spring/Spring.Core/Util/SystemUtils.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using System.Threading; @@ -93,7 +92,7 @@ namespace Spring.Util /// /// Gets the thread id for the current thread. Use thread name is available, - /// otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and + /// otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and /// CurrentThread.ManagedThreadId otherwise. /// /// The thread id. @@ -113,4 +112,4 @@ namespace Spring.Util } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/TypeExtensions.cs b/src/Spring/Spring.Core/Util/TypeExtensions.cs index fb3919f3..f33f12c2 100644 --- a/src/Spring/Spring.Core/Util/TypeExtensions.cs +++ b/src/Spring/Spring.Core/Util/TypeExtensions.cs @@ -1,4 +1,3 @@ -using System; using System.Reflection; namespace Spring.Util @@ -8,4 +7,4 @@ namespace Spring.Util internal static string AssemblyQualifiedNameWithoutVersion(this Type type) => type.FullName + ", " + type.GetTypeInfo().Assembly.GetName().Name; } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/UniqueKey.cs b/src/Spring/Spring.Core/Util/UniqueKey.cs index 243d3c8c..334d67e7 100644 --- a/src/Spring/Spring.Core/Util/UniqueKey.cs +++ b/src/Spring/Spring.Core/Util/UniqueKey.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.ComponentModel; using System.Text; @@ -169,4 +168,4 @@ namespace Spring.Util return sb.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Util/XmlUtils.cs b/src/Spring/Spring.Core/Util/XmlUtils.cs index 88904c15..7bf48a93 100644 --- a/src/Spring/Spring.Core/Util/XmlUtils.cs +++ b/src/Spring/Spring.Core/Util/XmlUtils.cs @@ -21,7 +21,6 @@ #region Imports using System.Xml; -using System.IO; using System.Xml.Schema; #endregion @@ -83,7 +82,7 @@ namespace Spring.Util } /// - /// Gets an appropriate implementation + /// Gets an appropriate implementation /// for the supplied . /// /// The XML that is going to be read. @@ -95,4 +94,4 @@ namespace Spring.Util return XmlReader.Create(stream); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/Actions/ErrorMessageAction.cs b/src/Spring/Spring.Core/Validation/Actions/ErrorMessageAction.cs index d32560a5..fb0d0daf 100644 --- a/src/Spring/Spring.Core/Validation/Actions/ErrorMessageAction.cs +++ b/src/Spring/Spring.Core/Validation/Actions/ErrorMessageAction.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using Spring.Expressions; using Spring.Util; @@ -117,4 +115,4 @@ namespace Spring.Validation.Actions } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/Actions/ExceptionAction.cs b/src/Spring/Spring.Core/Validation/Actions/ExceptionAction.cs index 9864907e..03bbcb4b 100644 --- a/src/Spring/Spring.Core/Validation/Actions/ExceptionAction.cs +++ b/src/Spring/Spring.Core/Validation/Actions/ExceptionAction.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using Common.Logging; using Spring.Expressions; @@ -40,14 +38,14 @@ namespace Spring.Validation.Actions /// /// Initializes a new instance of the class. /// - /// Expression that defines the exception to throw when the validator is not valid. + /// Expression that defines the exception to throw when the validator is not valid. public ExceptionAction(string exceptionExpression) : this((exceptionExpression != null ? Expression.Parse(exceptionExpression) : null)) {} /// /// Initializes a new instance of the class with an expression - /// that defines the exception to throw. + /// that defines the exception to throw. /// public ExceptionAction(IExpression throwsExpression) { @@ -87,10 +85,10 @@ namespace Spring.Validation.Actions if (exception != null) { throw exception; - } - } + } + } throw new ValidationException(errors); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/Actions/ExpressionAction.cs b/src/Spring/Spring.Core/Validation/Actions/ExpressionAction.cs index 20a7223f..337c1209 100644 --- a/src/Spring/Spring.Core/Validation/Actions/ExpressionAction.cs +++ b/src/Spring/Spring.Core/Validation/Actions/ExpressionAction.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using Spring.Expressions; namespace Spring.Validation.Actions @@ -108,4 +107,4 @@ namespace Spring.Validation.Actions } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/AnyValidatorGroup.cs b/src/Spring/Spring.Core/Validation/AnyValidatorGroup.cs index 59745392..73b89920 100644 --- a/src/Spring/Spring.Core/Validation/AnyValidatorGroup.cs +++ b/src/Spring/Spring.Core/Validation/AnyValidatorGroup.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using Spring.Expressions; namespace Spring.Validation @@ -32,7 +31,7 @@ namespace Spring.Validation /// collection are valid. ///

///

- /// ValidationErrors property will return a union of all validation error messages + /// ValidationErrors property will return a union of all validation error messages /// for the contained validators, but only if this validator is not valid (meaning, when none /// of the contained validators are valid). ///

@@ -56,20 +55,20 @@ namespace Spring.Validation /// Initializes a new instance of the class. ///
/// The expression that determines if this validator should be evaluated. - public AnyValidatorGroup(string when) + public AnyValidatorGroup(string when) : base(when) { - this.FastValidate = true; + this.FastValidate = true; } /// /// Initializes a new instance of the class. /// /// The expression that determines if this validator should be evaluated. - public AnyValidatorGroup(IExpression when) + public AnyValidatorGroup(IExpression when) : base(when) { - this.FastValidate = true; + this.FastValidate = true; } #endregion @@ -102,4 +101,4 @@ namespace Spring.Validation return valid; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/BaseSimpleValidator.cs b/src/Spring/Spring.Core/Validation/BaseSimpleValidator.cs index bf12b1b7..90ba38c4 100644 --- a/src/Spring/Spring.Core/Validation/BaseSimpleValidator.cs +++ b/src/Spring/Spring.Core/Validation/BaseSimpleValidator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using Spring.Expressions; namespace Spring.Validation @@ -28,8 +27,8 @@ namespace Spring.Validation ///
/// ///

- /// Custom single validators should always extend this class instead of - /// simply implementing interface, in + /// Custom single validators should always extend this class instead of + /// simply implementing interface, in /// order to inherit common validator functionality. ///

///
@@ -50,7 +49,7 @@ namespace Spring.Validation } /// - /// Creates a new instance of the validator without any + /// Creates a new instance of the validator without any /// and criteria /// public BaseSimpleValidator() @@ -120,4 +119,4 @@ namespace Spring.Validation return Test.GetValue(rootContext, contextParams); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/BaseValidationAction.cs b/src/Spring/Spring.Core/Validation/BaseValidationAction.cs index 7d724dbc..2ae89e3e 100644 --- a/src/Spring/Spring.Core/Validation/BaseValidationAction.cs +++ b/src/Spring/Spring.Core/Validation/BaseValidationAction.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using Spring.Expressions; namespace Spring.Validation @@ -31,7 +29,7 @@ namespace Spring.Validation /// ///

/// This class implements template Execute method - /// and defines OnValid and OnInvalid methods that + /// and defines OnValid and OnInvalid methods that /// can be overriden /// by specific validation actions. ///

@@ -91,7 +89,7 @@ namespace Spring.Validation } } - #region Abstract methods + #region Abstract methods // CLOVER:OFF @@ -115,7 +113,7 @@ namespace Spring.Validation // CLOVER:ON - #endregion + #endregion #region Helper methods @@ -137,4 +135,4 @@ namespace Spring.Validation #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/BaseValidator.cs b/src/Spring/Spring.Core/Validation/BaseValidator.cs index b20a5ec0..297f9313 100644 --- a/src/Spring/Spring.Core/Validation/BaseValidator.cs +++ b/src/Spring/Spring.Core/Validation/BaseValidator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using Spring.Expressions; namespace Spring.Validation @@ -29,8 +27,8 @@ namespace Spring.Validation ///
/// ///

- /// Custom validators should always extend this class instead of - /// simply implementing interface, in + /// Custom validators should always extend this class instead of + /// simply implementing interface, in /// order to inherit common validator functionality. ///

///
@@ -155,4 +153,4 @@ namespace Spring.Validation #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/BaseValidatorGroup.cs b/src/Spring/Spring.Core/Validation/BaseValidatorGroup.cs index 575760fa..6cf43a20 100644 --- a/src/Spring/Spring.Core/Validation/BaseValidatorGroup.cs +++ b/src/Spring/Spring.Core/Validation/BaseValidatorGroup.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -19,7 +19,6 @@ #endregion using System.Collections; -using System.Collections.Generic; using Spring.Expressions; namespace Spring.Validation @@ -44,7 +43,7 @@ namespace Spring.Validation /// Initializes a new instance ///
/// The expression that determines if this validator should be evaluated. - public BaseValidatorGroup(string when) + public BaseValidatorGroup(string when) : base(when) {} @@ -52,7 +51,7 @@ namespace Spring.Validation /// Initializes a new instance ///
/// The expression that determines if this validator should be evaluated. - public BaseValidatorGroup(IExpression when) + public BaseValidatorGroup(IExpression when) : base(when) {} @@ -109,4 +108,4 @@ namespace Spring.Validation /// True if validation was successful, False otherwise. protected abstract bool ValidateGroup(IDictionary contextParams, IValidationErrors errors, object validationContext); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/CollectionValidator.cs b/src/Spring/Spring.Core/Validation/CollectionValidator.cs index 07e5d110..dda34e2a 100644 --- a/src/Spring/Spring.Core/Validation/CollectionValidator.cs +++ b/src/Spring/Spring.Core/Validation/CollectionValidator.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using Spring.Expressions; namespace Spring.Validation @@ -39,9 +37,9 @@ namespace Spring.Validation ///

///

Note, that defaults to true for this validator type!

///

- /// If you set the IncludeElementErrors property to true, - /// ValidationErrors collection will contain a union of all validation error messages - /// for the contained validators; + /// If you set the IncludeElementErrors property to true, + /// ValidationErrors collection will contain a union of all validation error messages + /// for the contained validators; /// Otherwise it will contain only error messages that were set for this Validator. ///

/// @@ -52,7 +50,7 @@ namespace Spring.Validation #region Fields private bool includeElementErrors = false; - private IExpression context; + private IExpression context; #endregion @@ -61,24 +59,24 @@ namespace Spring.Validation /// /// Gets or sets the value that indicates whether to validate all elements of the collection /// regardless of the errors. - /// + ///
/// This is just an alias for property public bool ValidateAll { get { return !base.FastValidate; } set { base.FastValidate = !value; } } - + /// - /// Gets or sets the value that indicates whether to capture all the errors of the specific + /// Gets or sets the value that indicates whether to capture all the errors of the specific /// elements of the collection - /// + ///
public bool IncludeElementErrors { get { return includeElementErrors; } set { includeElementErrors = value; } } - + /// /// Gets or sets the expression that should be used to narrow validation context. @@ -107,8 +105,8 @@ namespace Spring.Validation /// The bool that determines if all elements of the collection should be evaluated. /// regardless of the Errors /// - /// The bool that determines whether Validate method should collect - /// all error messages returned by the item validators + /// The bool that determines whether Validate method should collect + /// all error messages returned by the item validators public CollectionValidator(bool validateAll, bool includeElementErrors) { this.FastValidate = validateAll; @@ -122,7 +120,7 @@ namespace Spring.Validation /// The bool that determines if this all elements of the collection should be evaluated. /// regardless of the Errors /// - /// The bool that determines whether Validate method should collect + /// The bool that determines whether Validate method should collect /// all error messages returned by the item validators public CollectionValidator(string when, bool validateAll, bool includeElementErrors) : this((when != null ? Expression.Parse(when) : null), validateAll,includeElementErrors) @@ -137,7 +135,7 @@ namespace Spring.Validation /// The bool that determines if this all elements of the collection should be evaluated. /// regardless of the Errors /// - /// The bool that determines whether Validate method should collect + /// The bool that determines whether Validate method should collect /// all error messages returned by the item validators public CollectionValidator(IExpression when, bool validateAll, bool includeElementErrors) @@ -151,9 +149,9 @@ namespace Spring.Validation /// /// Validates the specified collection of objects. - /// If the IncludeElementErrors property was set to true, - /// collection will contain a union of all validation error messages - /// for the contained validators; + /// If the IncludeElementErrors property was set to true, + /// collection will contain a union of all validation error messages + /// for the contained validators; /// Otherwise it will contain only error messages that were set for this Validator. /// /// The collection to validate. @@ -189,16 +187,16 @@ namespace Spring.Validation ? ((IDictionary) validationContext).Values : (IEnumerable) validationContext); - // decide whether to pass new validation errors collection + // decide whether to pass new validation errors collection //(and discard error messages returned by the item validators) // OR to pass validation errors collection that was passed to this method //(and collect all error messages returned by the item validators) IValidationErrors err = (includeElementErrors)? errors : new ValidationErrors(); - + foreach (object objectToValidate in collectionToValidate) { foreach (IValidator validator in this.Validators) - { + { valid = validator.Validate(objectToValidate, contextParams, err) && valid; if (!valid && this.FastValidate) { @@ -210,9 +208,9 @@ namespace Spring.Validation { break; } - } + } return valid; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/Config/ValidationNamespaceParser.cs b/src/Spring/Spring.Core/Validation/Config/ValidationNamespaceParser.cs index ea017e08..7ba8584f 100644 --- a/src/Spring/Spring.Core/Validation/Config/ValidationNamespaceParser.cs +++ b/src/Spring/Spring.Core/Validation/Config/ValidationNamespaceParser.cs @@ -18,10 +18,6 @@ #endregion -#region Imports - -using System; -using System.Collections.Generic; using System.Xml; using Spring.Core.TypeResolution; @@ -33,8 +29,6 @@ using Spring.Objects.Factory.Support; using Spring.Objects.Factory.Xml; using Spring.Util; -#endregion - namespace Spring.Validation.Config { /// @@ -206,7 +200,7 @@ namespace Spring.Validation.Config /// Parses and potentially registers a validator. /// /// - /// Only validators that have id attribute specified are registered + /// Only validators that have id attribute specified are registered /// as separate object definitions within application context. /// /// Validator XML element. @@ -286,7 +280,7 @@ namespace Spring.Validation.Config string typeName = "Spring.Validation.Actions.ExceptionAction, Spring.Core"; string throwExpression = GetAttributeValue(element, ValidatorDefinitionConstants.ThrowAttribute); - + ConstructorArgumentValues ctorArgs = new ConstructorArgumentValues(); ctorArgs.AddGenericArgumentValue(throwExpression); @@ -399,4 +393,4 @@ namespace Spring.Validation.Config #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/ErrorMessage.cs b/src/Spring/Spring.Core/Validation/ErrorMessage.cs index 869f7b42..b10a049c 100644 --- a/src/Spring/Spring.Core/Validation/ErrorMessage.cs +++ b/src/Spring/Spring.Core/Validation/ErrorMessage.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; using Spring.Context; -#endregion - namespace Spring.Validation { /// @@ -83,7 +78,7 @@ namespace Spring.Validation /// /// Gets or sets the message parameters. /// - /// The message parameters. + /// The message parameters. public object[] Parameters { get { return parameters; } @@ -94,16 +89,16 @@ namespace Spring.Validation #region IXmlSerializable implementations /// - /// This property is reserved, apply the + /// This property is reserved, apply the /// - /// to the class instead. + /// to the class instead. /// /// - /// An - /// that describes the XML representation of the object that - /// is produced by the + /// An + /// that describes the XML representation of the object that + /// is produced by the /// - /// method and consumed by the + /// method and consumed by the /// /// method. /// @@ -117,8 +112,8 @@ namespace Spring.Validation /// Generates an object from its XML representation. /// /// - /// The stream - /// from which the object is deserialized. + /// The stream + /// from which the object is deserialized. /// public virtual void ReadXml(XmlReader reader) { @@ -138,8 +133,8 @@ namespace Spring.Validation /// Converts an object into its XML representation. /// /// - /// The stream - /// to which the object is serialized. + /// The stream + /// to which the object is serialized. /// public virtual void WriteXml(XmlWriter writer) { @@ -215,5 +210,5 @@ namespace Spring.Validation private object[] parameters; #endregion - } -} \ No newline at end of file + } +} diff --git a/src/Spring/Spring.Core/Validation/ExclusiveValidatorGroup.cs b/src/Spring/Spring.Core/Validation/ExclusiveValidatorGroup.cs index 51c53e3d..71397925 100644 --- a/src/Spring/Spring.Core/Validation/ExclusiveValidatorGroup.cs +++ b/src/Spring/Spring.Core/Validation/ExclusiveValidatorGroup.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using Spring.Expressions; namespace Spring.Validation @@ -31,7 +30,7 @@ namespace Spring.Validation /// This validator will be valid when one and only one of the validators in the Validators collection are valid ///

///

- /// ValidationErrors property will return a union of all validation error messages + /// ValidationErrors property will return a union of all validation error messages /// for the contained validators, but only if this validator is not valid (meaning, when none /// of the contained validators are valid). ///

@@ -57,20 +56,20 @@ namespace Spring.Validation /// Initializes a new instance of the class. ///
/// The expression that determines if this validator should be evaluated. - public ExclusiveValidatorGroup(string when) + public ExclusiveValidatorGroup(string when) : base(when) { - this.FastValidate = true; + this.FastValidate = true; } /// /// Initializes a new instance of the class. /// /// The expression that determines if this validator should be evaluated. - public ExclusiveValidatorGroup(IExpression when) + public ExclusiveValidatorGroup(IExpression when) : base(when) { - this.FastValidate = true; + this.FastValidate = true; } #endregion @@ -108,8 +107,8 @@ namespace Spring.Validation errors.MergeErrors(tmpErrors); } - return valid; + return valid; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/IValidationAction.cs b/src/Spring/Spring.Core/Validation/IValidationAction.cs index 7fdf5587..173fbf03 100644 --- a/src/Spring/Spring.Core/Validation/IValidationAction.cs +++ b/src/Spring/Spring.Core/Validation/IValidationAction.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System.Collections.Generic; using Spring.Validation.Actions; -#endregion - namespace Spring.Validation { /// @@ -52,4 +47,4 @@ namespace Spring.Validation /// Validation errors container. void Execute(bool isValid, object validationContext, IDictionary contextParams, IValidationErrors errors); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/IValidationErrors.cs b/src/Spring/Spring.Core/Validation/IValidationErrors.cs index e98e4c67..c552bb64 100644 --- a/src/Spring/Spring.Core/Validation/IValidationErrors.cs +++ b/src/Spring/Spring.Core/Validation/IValidationErrors.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using Spring.Context; namespace Spring.Validation @@ -20,7 +19,7 @@ namespace Spring.Validation /// /// if this instance is empty. bool IsEmpty { get; } - + /// /// Gets the list of all error providers. /// @@ -86,4 +85,4 @@ namespace Spring.Validation /// IList GetResolvedErrors(string provider, IMessageSource messageSource); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/IValidator.cs b/src/Spring/Spring.Core/Validation/IValidator.cs index 22e9e9f2..b2869753 100644 --- a/src/Spring/Spring.Core/Validation/IValidator.cs +++ b/src/Spring/Spring.Core/Validation/IValidator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,6 @@ #endregion -#region Imports - -using System.Collections.Generic; - -#endregion - namespace Spring.Validation { /// @@ -78,4 +72,4 @@ namespace Spring.Validation bool Validate(object validationContext, IDictionary contextParams, IValidationErrors errors); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/ValidatedAttribute.cs b/src/Spring/Spring.Core/Validation/ValidatedAttribute.cs index e72a6d25..b1950a2b 100644 --- a/src/Spring/Spring.Core/Validation/ValidatedAttribute.cs +++ b/src/Spring/Spring.Core/Validation/ValidatedAttribute.cs @@ -1,6 +1,4 @@ -using System; - -namespace Spring.Validation +namespace Spring.Validation { /// /// Allows developers to specify which validator should be used @@ -25,7 +23,7 @@ namespace Spring.Validation { this.validatorName = validatorName; } - + /// /// Gets the name of the validator to use. /// @@ -35,4 +33,4 @@ namespace Spring.Validation get { return validatorName; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/ValidationErrors.cs b/src/Spring/Spring.Core/Validation/ValidationErrors.cs index f7367951..9ffe5b19 100644 --- a/src/Spring/Spring.Core/Validation/ValidationErrors.cs +++ b/src/Spring/Spring.Core/Validation/ValidationErrors.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,18 +18,12 @@ #endregion -#region Imports - -using System; -using System.Collections.Generic; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; using Spring.Context; using Spring.Util; -#endregion - namespace Spring.Validation { /// @@ -48,7 +42,7 @@ namespace Spring.Validation public class ValidationErrors : IValidationErrors, IXmlSerializable { #region Constructors - + /// /// Default constructor. /// @@ -60,16 +54,16 @@ namespace Spring.Validation #region IXmlSerializable implementations /// - /// This property is reserved, apply the + /// This property is reserved, apply the /// - /// to the class instead. + /// to the class instead. /// /// - /// An that describes the - /// XML representation of the object that is produced by - /// the - /// method and consumed by the - /// + /// An that describes the + /// XML representation of the object that is produced by + /// the + /// method and consumed by the + /// /// method. /// public XmlSchema GetSchema() @@ -81,8 +75,8 @@ namespace Spring.Validation /// Generates an object from its XML representation. /// /// - /// The stream - /// from which the object is deserialized. + /// The stream + /// from which the object is deserialized. /// public void ReadXml(XmlReader reader) { @@ -117,8 +111,8 @@ namespace Spring.Validation /// Converts an object into its XML representation. /// /// - /// The stream - /// to which the object is serialized. + /// The stream + /// to which the object is serialized. /// public void WriteXml(XmlWriter writer) { @@ -141,7 +135,7 @@ namespace Spring.Validation } } - #endregion + #endregion #region ValidationErrors methods @@ -159,7 +153,7 @@ namespace Spring.Validation { get { return this.errorMap.Count == 0; } } - + /// /// Gets the list of all providers. /// @@ -291,11 +285,11 @@ namespace Spring.Validation } #endregion - + #region Data members private readonly IDictionary> errorMap = new Dictionary>(); #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/ValidationException.cs b/src/Spring/Spring.Core/Validation/ValidationException.cs index 66f20470..4e4bfee1 100644 --- a/src/Spring/Spring.Core/Validation/ValidationException.cs +++ b/src/Spring/Spring.Core/Validation/ValidationException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Validation { /// @@ -161,4 +156,4 @@ namespace Spring.Validation get { return errors; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/ValidatorGroup.cs b/src/Spring/Spring.Core/Validation/ValidatorGroup.cs index d91e1808..fc498c88 100644 --- a/src/Spring/Spring.Core/Validation/ValidatorGroup.cs +++ b/src/Spring/Spring.Core/Validation/ValidatorGroup.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using Spring.Expressions; namespace Spring.Validation @@ -32,7 +31,7 @@ namespace Spring.Validation /// collection are valid. ///

///

- /// ValidationErrors property will return a union of all validation error messages + /// ValidationErrors property will return a union of all validation error messages /// for the contained validators. ///

/// @@ -88,4 +87,4 @@ namespace Spring.Validation return valid; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/ValidatorReference.cs b/src/Spring/Spring.Core/Validation/ValidatorReference.cs index 8c07aef2..c9f6c85e 100644 --- a/src/Spring/Spring.Core/Validation/ValidatorReference.cs +++ b/src/Spring/Spring.Core/Validation/ValidatorReference.cs @@ -18,10 +18,8 @@ #endregion -using System.Collections.Generic; using Spring.Expressions; using Spring.Objects.Factory; -using System; namespace Spring.Validation { @@ -139,7 +137,7 @@ namespace Spring.Validation { bool valid = true; - if (When == null || + if (When == null || Convert.ToBoolean(When.GetValue(validationContext, contextParams))) { if (Context != null) @@ -180,4 +178,4 @@ namespace Spring.Validation set { objectFactory = value; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/Validators/ConditionValidator.cs b/src/Spring/Spring.Core/Validation/Validators/ConditionValidator.cs index 6cd74982..870e8421 100644 --- a/src/Spring/Spring.Core/Validation/Validators/ConditionValidator.cs +++ b/src/Spring/Spring.Core/Validation/Validators/ConditionValidator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,15 +18,9 @@ #endregion -#region Imports - -using System; - using Spring.Expressions; using Spring.Util; -#endregion - namespace Spring.Validation { /// @@ -71,7 +65,7 @@ namespace Spring.Validation /// ///

/// Test can be any logical expression that is supported by the Spring.NET logical - /// expression evaluation engine, and can use any variables that can be resolved + /// expression evaluation engine, and can use any variables that can be resolved /// by the variable resolver used by the validation engine. ///

///
@@ -84,4 +78,4 @@ namespace Spring.Validation return Convert.ToBoolean(objectToValidate); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/Validators/CreditCardValidator.cs b/src/Spring/Spring.Core/Validation/Validators/CreditCardValidator.cs index e0d6f1ec..80693018 100644 --- a/src/Spring/Spring.Core/Validation/Validators/CreditCardValidator.cs +++ b/src/Spring/Spring.Core/Validation/Validators/CreditCardValidator.cs @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using Spring.Expressions; using Spring.Util; -#endregion - namespace Spring.Validation.Validators { /// @@ -45,9 +40,9 @@ namespace Spring.Validation.Validators /// Credit card type validator to use. /// /// - /// Can be concrete implementations of + /// Can be concrete implementations of /// interface. The following are available implementations: - /// , , , + /// , , , /// . /// public ICreditCardType CardType @@ -57,9 +52,9 @@ namespace Spring.Validation.Validators } #endregion - + #region Constructors - + /// /// Creates a new instance of the UrlValidator class. /// @@ -107,7 +102,7 @@ namespace Spring.Validation.Validators /// /// The object to validate. /// - /// if the supplied is valid + /// if the supplied is valid /// credit card number. /// protected override bool Validate(object objectToValidate) @@ -117,7 +112,7 @@ namespace Spring.Validation.Validators { return true; } - + return IsValid(text); } @@ -152,13 +147,13 @@ namespace Spring.Validation.Validators if (CardType != null) { return ValidateCard(card); - } + } else { throw new ArgumentException("Property CardType cannot be null."); } } - + /// /// Validates card number with the specified validator. /// @@ -171,12 +166,12 @@ namespace Spring.Validation.Validators private bool ValidateCard(string cardNumber) { String card = cardNumber == null ? null : cardNumber.Trim(); - + if (card == null) { return false; } - + return CardType.Matches(card); } @@ -221,12 +216,12 @@ namespace Spring.Validation.Validators return (sum == 0) ? false : (sum % 10 == 0); } - #endregion + #endregion #region Data members private ICreditCardType m_cardType; - + #endregion } @@ -239,7 +234,7 @@ namespace Spring.Validation.Validators public interface ICreditCardType { /// - /// Returns true if the card number matches this type of + /// Returns true if the card number matches this type of /// credit card. /// /// diff --git a/src/Spring/Spring.Core/Validation/Validators/EmailValidator.cs b/src/Spring/Spring.Core/Validation/Validators/EmailValidator.cs index 442d110e..514770d8 100644 --- a/src/Spring/Spring.Core/Validation/Validators/EmailValidator.cs +++ b/src/Spring/Spring.Core/Validation/Validators/EmailValidator.cs @@ -18,14 +18,10 @@ #endregion -#region Imports - using System.Text.RegularExpressions; using Spring.Expressions; using Spring.Util; -#endregion - namespace Spring.Validation.Validators { /// @@ -33,15 +29,15 @@ namespace Spring.Validation.Validators /// /// ///

- /// This implementation is not guaranteed to catch all possible errors in an - /// email address. For example, an address like nobody@noplace.nowhere will + /// This implementation is not guaranteed to catch all possible errors in an + /// email address. For example, an address like nobody@noplace.nowhere will /// pass validator, even though there is no TLD "nowhere". /// - /// Goran Milosavljevic + /// Goran Milosavljevic public class EmailValidator : BaseSimpleValidator { #region Constructors - + ///

/// Creates a new instance of the EmailValidator class. /// @@ -85,7 +81,7 @@ namespace Spring.Validation.Validators ///
/// The object to validate. /// - /// if the supplied is valid + /// if the supplied is valid /// e-mail address. /// protected override bool Validate(object objectToValidate) @@ -108,7 +104,7 @@ namespace Spring.Validation.Validators /// Regular expression used for validation of object passed to this . ///
private static string emailCheck = @"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"; - + #endregion } } diff --git a/src/Spring/Spring.Core/Validation/Validators/ISBNValidator.cs b/src/Spring/Spring.Core/Validation/Validators/ISBNValidator.cs index b94fab32..8bba8800 100644 --- a/src/Spring/Spring.Core/Validation/Validators/ISBNValidator.cs +++ b/src/Spring/Spring.Core/Validation/Validators/ISBNValidator.cs @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Text.RegularExpressions; using Spring.Expressions; using Spring.Util; -#endregion - namespace Spring.Validation.Validators { /// @@ -34,9 +29,9 @@ namespace Spring.Validation.Validators /// /// Goran Milosavljevic public class ISBNValidator : BaseSimpleValidator - { + { #region Constructors - + /// /// Creates a new instance of the ISBNValidator class. /// @@ -91,14 +86,14 @@ namespace Spring.Validation.Validators } return IsValid(isbn); - } + } #endregion #region ISBNValidator methods - + /// - /// Validates against ISBN-10 or ISBN-13 validation + /// Validates against ISBN-10 or ISBN-13 validation /// rules. /// /// @@ -110,20 +105,20 @@ namespace Spring.Validation.Validators private bool IsValid(String isbn) { String code = (isbn == null ? null : isbn.Trim().Replace("-", "").Replace(" ", "")); - + // check the length if ((code == null) || (code.Length < 10 || code.Length>13)) { return false; } - + // validate/reformat using regular expression Match match; String pattern; if (code.Length == 10) { pattern = ISBN10_PATTERN; - } + } else { pattern = ISBN13_PATTERN; @@ -131,7 +126,7 @@ namespace Spring.Validation.Validators match = Regex.Match(code, pattern); return match.Success && match.Index == 0 && match.Length == code.Length; - } + } #endregion @@ -141,27 +136,27 @@ namespace Spring.Validation.Validators private static readonly String GROUP = "(\\d{1,5})"; private static readonly String PUBLISHER = "(\\d{1,7})"; private static readonly String TITLE = "(\\d{1,6})"; - + /// - /// ISBN-10 consists of 4 groups of numbers separated by either - /// dashes (-) or spaces. + /// ISBN-10 consists of 4 groups of numbers separated by either + /// dashes (-) or spaces. /// /// - /// The first group is 1-5 characters, second 1-7, third 1-6, + /// The first group is 1-5 characters, second 1-7, third 1-6, /// and fourth is 1 digit or an X. /// static readonly String ISBN10_PATTERN = "^(?:(\\d{9}[0-9X])|(?:" + GROUP + SEP + PUBLISHER + SEP + TITLE + SEP + "([0-9X])))$"; /// - /// ISBN-13 consists of 5 groups of numbers separated by either - /// dashes (-) or spaces. + /// ISBN-13 consists of 5 groups of numbers separated by either + /// dashes (-) or spaces. /// /// - /// The first group is 978 or 979, the second group is + /// The first group is 978 or 979, the second group is /// 1-5 characters, third 1-7, fourth 1-6, and fifth is 1 digit. /// static readonly String ISBN13_PATTERN = "^(978|979)(?:(\\d{10})|(?:" + SEP + GROUP + SEP + PUBLISHER + SEP + TITLE + SEP + "([0-9])))$"; - + #endregion } } diff --git a/src/Spring/Spring.Core/Validation/Validators/RegularExpressionValidator.cs b/src/Spring/Spring.Core/Validation/Validators/RegularExpressionValidator.cs index d4f7cd26..2dc1bf3f 100644 --- a/src/Spring/Spring.Core/Validation/Validators/RegularExpressionValidator.cs +++ b/src/Spring/Spring.Core/Validation/Validators/RegularExpressionValidator.cs @@ -1,7 +1,26 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 License + +/* + * Copyright � 2002-2011 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. @@ -18,16 +37,11 @@ #endregion -#region Imports - -using System; using System.Text.RegularExpressions; using Spring.Expressions; using Spring.Util; -#endregion - namespace Spring.Validation { /// @@ -100,7 +114,7 @@ namespace Spring.Validation } /// - /// Gets or sets a value indicating whether to do a partial match instead of a full match. + /// Gets or sets a value indicating whether to do a partial match instead of a full match. /// Default is false. /// public bool AllowPartialMatching @@ -113,7 +127,7 @@ namespace Spring.Validation /// The for the regular expression evaluation. /// /// The regular expression evaluation options. - /// + /// public RegexOptions Options { get { return options; } @@ -161,7 +175,7 @@ namespace Spring.Validation else { return match.Success && match.Index == 0 && match.Length == text.Length; - } + } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Core/Validation/Validators/RequiredValidator.cs b/src/Spring/Spring.Core/Validation/Validators/RequiredValidator.cs index 187b6690..ce4a3384 100644 --- a/src/Spring/Spring.Core/Validation/Validators/RequiredValidator.cs +++ b/src/Spring/Spring.Core/Validation/Validators/RequiredValidator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,15 +18,9 @@ #endregion -#region Imports - -using System; - using Spring.Expressions; using Spring.Util; -#endregion - namespace Spring.Validation { /// @@ -64,7 +58,7 @@ namespace Spring.Validation ///

///

/// You cannot use this validator to validate any value types other than the ones - /// specified in the table above. + /// specified in the table above. ///

/// /// Aleksandar Seovic @@ -139,4 +133,4 @@ namespace Spring.Validation return objectToValidate != null; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/BytecodeProvider.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/BytecodeProvider.cs index b38fa975..ed4dcbbb 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/BytecodeProvider.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/BytecodeProvider.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using NHibernate.Bytecode; using NHibernate.Properties; using NHibernate.Type; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/LazyInitializer.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/LazyInitializer.cs index d3590a7a..8c8fd225 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/LazyInitializer.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/LazyInitializer.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Reflection; using AopAlliance.Intercept; using NHibernate.Engine; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ObjectsFactory.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ObjectsFactory.cs index 353af66d..41baa903 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ObjectsFactory.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ObjectsFactory.cs @@ -14,9 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; - using NHibernate.Bytecode; using Spring.Objects.Factory; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ProxyFactory.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ProxyFactory.cs index 2d7c6e0b..7cca3a8e 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ProxyFactory.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ProxyFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using Common.Logging; using NHibernate; using NHibernate.Engine; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ProxyFactoryFactory.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ProxyFactoryFactory.cs index 69ecb3ec..baa65924 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ProxyFactoryFactory.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ProxyFactoryFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using NHibernate.Bytecode; using NHibernate.Proxy; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ReflectionOptimizer.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ReflectionOptimizer.cs index 866e6cc8..31f1263b 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ReflectionOptimizer.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Bytecode/ReflectionOptimizer.cs @@ -14,9 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; - using NHibernate.Properties; using Spring.Objects.Factory; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/DelegatingLocalSessionFactoryObject.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/DelegatingLocalSessionFactoryObject.cs index 50790d5c..a783d488 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/DelegatingLocalSessionFactoryObject.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/DelegatingLocalSessionFactoryObject.cs @@ -1,6 +1,4 @@ using System.Configuration; -using System.Collections.Generic; - using NHibernate; using Configuration = NHibernate.Cfg.Configuration; @@ -53,4 +51,4 @@ namespace Spring.Data.NHibernate } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/DelegatingSessionFactory.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/DelegatingSessionFactory.cs index e6aa4975..2d5605f0 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/DelegatingSessionFactory.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/DelegatingSessionFactory.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; using System.Data.Common; -using System.Threading; -using System.Threading.Tasks; using NHibernate; using NHibernate.Engine; using NHibernate.Metadata; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/FilterDefinitionFactoryObject.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/FilterDefinitionFactoryObject.cs index 86ca2987..41f673a5 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/FilterDefinitionFactoryObject.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/FilterDefinitionFactoryObject.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,9 +14,7 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; using NHibernate.Engine; using NHibernate.Type; @@ -167,4 +165,4 @@ namespace Spring.Data.NHibernate } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/FindHibernateDelegate.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/FindHibernateDelegate.cs index 25798072..2f2ec93f 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/FindHibernateDelegate.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/FindHibernateDelegate.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -15,7 +15,6 @@ */ using NHibernate; -using System.Collections.Generic; namespace Spring.Data.NHibernate.Generic { diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/HibernateDaoSupport.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/HibernateDaoSupport.cs index 6343ae77..d841bcf8 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/HibernateDaoSupport.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/HibernateDaoSupport.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using NHibernate; using Spring.Dao; using Spring.Dao.Support; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/HibernateTemplate.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/HibernateTemplate.cs index 823404c8..42478cbd 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/HibernateTemplate.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/HibernateTemplate.cs @@ -14,8 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; using NHibernate; using NHibernate.Type; using Spring.Aop.Framework; @@ -1657,4 +1655,4 @@ namespace Spring.Data.NHibernate.Generic return del(session); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/IFindHibernateCallback.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/IFindHibernateCallback.cs index 7c5e4664..b624535b 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/IFindHibernateCallback.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/IFindHibernateCallback.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System.Collections.Generic; using NHibernate; namespace Spring.Data.NHibernate.Generic diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/IHibernateOperations.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/IHibernateOperations.cs index a0998b80..a836b4e1 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/IHibernateOperations.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Generic/IHibernateOperations.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,8 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; using NHibernate; using NHibernate.Type; using Spring.Dao; @@ -484,4 +482,4 @@ namespace Spring.Data.NHibernate.Generic /// In case of Hibernate errors IList ExecuteFind(IFindHibernateCallback action, bool exposeNativeSession); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateAccessor.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateAccessor.cs index b8ff5ebf..20ea17cb 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateAccessor.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateAccessor.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Collections; using System.Reflection; using AopAlliance.Intercept; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateAdoException.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateAdoException.cs index a7e3cc69..d7804062 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateAdoException.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateAdoException.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Runtime.Serialization; using NHibernate; using Spring.Dao; @@ -81,4 +80,4 @@ namespace Spring.Data.NHibernate { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateObjectRetrievalFailureException.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateObjectRetrievalFailureException.cs index 81574670..0578968f 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateObjectRetrievalFailureException.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateObjectRetrievalFailureException.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Runtime.Serialization; using NHibernate; using Spring.Dao; @@ -108,4 +107,4 @@ namespace Spring.Data.NHibernate { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateOptimisticLockingFailureException.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateOptimisticLockingFailureException.cs index 180d40e1..1dd18184 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateOptimisticLockingFailureException.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateOptimisticLockingFailureException.cs @@ -1,12 +1,12 @@ /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Runtime.Serialization; using NHibernate; using Spring.Dao; @@ -29,7 +28,7 @@ namespace Spring.Data.NHibernate /// /// Mark Pollack (.NET) /// $Id: HibernateOptimisticLockingFailureException.cs,v 1.2 2008/04/23 11:41:41 lahma Exp $ - /// + /// [Serializable] public class HibernateOptimisticLockingFailureException : ObjectOptimisticLockingFailureException { @@ -89,4 +88,4 @@ namespace Spring.Data.NHibernate { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateQueryException.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateQueryException.cs index 250b0f01..8edd266f 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateQueryException.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateQueryException.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Runtime.Serialization; using NHibernate; using Spring.Dao; @@ -84,4 +83,4 @@ namespace Spring.Data.NHibernate { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateSystemException.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateSystemException.cs index 63f477d2..48ba0fb0 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateSystemException.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateSystemException.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Runtime.Serialization; using NHibernate; using Spring.Dao; @@ -72,4 +71,4 @@ namespace Spring.Data.NHibernate { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateTemplate.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateTemplate.cs index a10f53d1..44ffac47 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateTemplate.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateTemplate.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Collections; using Common.Logging; @@ -2124,4 +2123,4 @@ namespace Spring.Data.NHibernate return session.Merge(entity); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateTransactionManager.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateTransactionManager.cs index 3071260f..b7122700 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateTransactionManager.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateTransactionManager.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Data; using System.Reflection; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateTxScopeTransactionManager.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateTxScopeTransactionManager.cs index 384addb6..ab1c16ad 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateTxScopeTransactionManager.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/HibernateTxScopeTransactionManager.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Data; using System.Reflection; using System.Transactions; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/IHibernateOperations.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/IHibernateOperations.cs index a154aad5..2b21a429 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/IHibernateOperations.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/IHibernateOperations.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Collections; using NHibernate; using NHibernate.Type; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/LocalSessionFactoryObject.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/LocalSessionFactoryObject.cs index b807ef9f..74899d85 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/LocalSessionFactoryObject.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/LocalSessionFactoryObject.cs @@ -14,13 +14,9 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Data; using System.Data.Common; -using System.Threading; -using System.Threading.Tasks; using Common.Logging; using NHibernate; using NHibernate.Bytecode; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SessionFactoryUtils.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SessionFactoryUtils.cs index ec4fb4ac..b1583ba5 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SessionFactoryUtils.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SessionFactoryUtils.cs @@ -14,10 +14,7 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; - using Common.Logging; using NHibernate; using NHibernate.Connection; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SessionHolder.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SessionHolder.cs index e28756b2..1d30c585 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SessionHolder.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SessionHolder.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -15,7 +15,6 @@ */ using System.Collections; -using System.Collections.Generic; using System.Data; using Common.Logging; using NHibernate; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SimpleDelegatingSessionFactory.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SimpleDelegatingSessionFactory.cs index c1836aaf..364317d6 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SimpleDelegatingSessionFactory.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SimpleDelegatingSessionFactory.cs @@ -9,7 +9,6 @@ using Spring.Threading; using Spring.Data.Common; using Spring.Context.Support; using NHibernate.Engine; -using System; namespace Spring.Data.NHibernate { diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SpringSessionContext.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SpringSessionContext.cs index 62acf4dd..7c96ad3b 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SpringSessionContext.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/SpringSessionContext.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using NHibernate; using NHibernate.Context; using NHibernate.Engine; @@ -65,4 +64,4 @@ namespace Spring.Data.NHibernate } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/ConfigSectionSessionScopeSettings.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/ConfigSectionSessionScopeSettings.cs index f0ca4ec8..6a979ca8 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/ConfigSectionSessionScopeSettings.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/ConfigSectionSessionScopeSettings.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using NHibernate; using Spring.Context; using Spring.Context.Support; @@ -110,4 +109,4 @@ namespace Spring.Data.NHibernate.Support return null; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/HibernateDaoSupport.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/HibernateDaoSupport.cs index 33339920..75d3a56b 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/HibernateDaoSupport.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/HibernateDaoSupport.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using NHibernate; using Spring.Dao; using Spring.Dao.Support; diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/OpenSessionInViewModule.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/OpenSessionInViewModule.cs index 27b78971..92861f58 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/OpenSessionInViewModule.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/OpenSessionInViewModule.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Web; namespace Spring.Data.NHibernate.Support @@ -39,7 +38,7 @@ namespace Spring.Data.NHibernate.Support ///
public OpenSessionInViewModule() : base("appSettings", typeof(OpenSessionInViewModule), false) { - + } /// @@ -71,4 +70,4 @@ namespace Spring.Data.NHibernate.Support Close(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/SessionScope.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/SessionScope.cs index 2bb5a23a..2a64f4f2 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/SessionScope.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/SessionScope.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Reflection; using Common.Logging; @@ -459,4 +458,4 @@ namespace Spring.Data.NHibernate.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/SessionScopeSettings.cs b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/SessionScopeSettings.cs index f65bfebc..bc68e91b 100644 --- a/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/SessionScopeSettings.cs +++ b/src/Spring/Spring.Data.NHibernate5/Data/NHibernate/Support/SessionScopeSettings.cs @@ -1,12 +1,12 @@ /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using NHibernate; using Spring.Util; @@ -59,7 +58,7 @@ namespace Spring.Data.NHibernate.Support } /// - /// Initialize a new instance of with the given sessionFactory + /// Initialize a new instance of with the given sessionFactory /// and default values for all other settings. /// /// @@ -74,7 +73,7 @@ namespace Spring.Data.NHibernate.Support // noop this.entityInterceptorInitialized = false; } - + /// /// Initialize a new instance of with the given values and references. /// @@ -109,8 +108,8 @@ namespace Spring.Data.NHibernate.Support /// Gets the configured instance to be used. /// /// - /// If the entity interceptor is not set by the constructor, this property calls - /// to obtain an instance. This allows derived classes to + /// If the entity interceptor is not set by the constructor, this property calls + /// to obtain an instance. This allows derived classes to /// override the behaviour of how to obtain the concrete instance. /// public IInterceptor EntityInterceptor @@ -129,7 +128,7 @@ namespace Spring.Data.NHibernate.Support /// Gets the configured instance to be used. ///
/// - /// If this property is requested for the first time, is called. + /// If this property is requested for the first time, is called. /// This allows derived classes to override the behaviour of how to obtain the concrete instance. /// /// If the instance cannot be resolved. @@ -167,7 +166,7 @@ namespace Spring.Data.NHibernate.Support /// Gets or Sets the flushmode to be applied on each newly created session. ///
/// - /// This property defaults to to ensure that modifying objects outside the boundaries + /// This property defaults to to ensure that modifying objects outside the boundaries /// of a transaction will not be persisted. It is recommended to not change this value but wrap any modifying operation /// within a transaction. /// @@ -193,4 +192,4 @@ namespace Spring.Data.NHibernate.Support throw new NotSupportedException("you need to override this method to resolve an ISessionFactory instance"); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data.NHibernate5/Spring.Data.NHibernate5.csproj b/src/Spring/Spring.Data.NHibernate5/Spring.Data.NHibernate5.csproj index ac32975c..6ad7926d 100644 --- a/src/Spring/Spring.Data.NHibernate5/Spring.Data.NHibernate5.csproj +++ b/src/Spring/Spring.Data.NHibernate5/Spring.Data.NHibernate5.csproj @@ -1,24 +1,34 @@  + netstandard2.0;$(TargetFullFrameworkVersion) Interfaces and classes that provide NHibernate 5 support in Spring.Net Spring.Data.NHibernate 0618 + + + + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.Data/Dao/Attributes/PersistenceExceptionTranslationAdvisor.cs b/src/Spring/Spring.Data/Dao/Attributes/PersistenceExceptionTranslationAdvisor.cs index 63adcaf9..e13e145d 100644 --- a/src/Spring/Spring.Data/Dao/Attributes/PersistenceExceptionTranslationAdvisor.cs +++ b/src/Spring/Spring.Data/Dao/Attributes/PersistenceExceptionTranslationAdvisor.cs @@ -18,7 +18,6 @@ #endregion -using System; using AopAlliance.Aop; using Spring.Aop; using Spring.Aop.Support; @@ -93,4 +92,4 @@ namespace Spring.Dao.Attributes set { } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/Attributes/PersistenceExceptionTranslationPostProcessor.cs b/src/Spring/Spring.Data/Dao/Attributes/PersistenceExceptionTranslationPostProcessor.cs index 6ea82b06..11350630 100644 --- a/src/Spring/Spring.Data/Dao/Attributes/PersistenceExceptionTranslationPostProcessor.cs +++ b/src/Spring/Spring.Data/Dao/Attributes/PersistenceExceptionTranslationPostProcessor.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Aop.Framework; using Spring.Core; using Spring.Dao.Support; @@ -172,4 +171,4 @@ namespace Spring.Dao.Attributes } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/CannotAcquireLockException.cs b/src/Spring/Spring.Data/Dao/CannotAcquireLockException.cs index 4280f966..64917b29 100644 --- a/src/Spring/Spring.Data/Dao/CannotAcquireLockException.cs +++ b/src/Spring/Spring.Data/Dao/CannotAcquireLockException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Exception thrown on failure to aquire a lock during an update i.e a select for /// update statement. /// @@ -74,4 +69,4 @@ namespace Spring.Dao protected CannotAcquireLockException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/CannotSerializeTransactionException.cs b/src/Spring/Spring.Data/Dao/CannotSerializeTransactionException.cs index 84dbc356..fe0d987f 100644 --- a/src/Spring/Spring.Data/Dao/CannotSerializeTransactionException.cs +++ b/src/Spring/Spring.Data/Dao/CannotSerializeTransactionException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Exception thrown on failure to complete a transaction in serialized mode due to /// update conflicts. /// @@ -74,4 +69,4 @@ namespace Spring.Dao protected CannotSerializeTransactionException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/CleanupFailureDataAccessException.cs b/src/Spring/Spring.Data/Dao/CleanupFailureDataAccessException.cs index 44dcc552..33a4472e 100644 --- a/src/Spring/Spring.Data/Dao/CleanupFailureDataAccessException.cs +++ b/src/Spring/Spring.Data/Dao/CleanupFailureDataAccessException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Exception thrown when we couldn't cleanup after a data access operation, /// but the actual operation went OK. /// @@ -79,4 +74,4 @@ namespace Spring.Dao protected CleanupFailureDataAccessException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/ConcurrencyFailureException.cs b/src/Spring/Spring.Data/Dao/ConcurrencyFailureException.cs index 5d9643fc..d90b3d0e 100644 --- a/src/Spring/Spring.Data/Dao/ConcurrencyFailureException.cs +++ b/src/Spring/Spring.Data/Dao/ConcurrencyFailureException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Exception thrown on concurrency failure. This exception should be /// sublassed to indicate the type of failure - optimistic locking, /// failure to acquire lock, etc. @@ -75,4 +70,4 @@ namespace Spring.Dao protected ConcurrencyFailureException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/DataAccessException.cs b/src/Spring/Spring.Data/Dao/DataAccessException.cs index 528efbcc..4ab1f43f 100644 --- a/src/Spring/Spring.Data/Dao/DataAccessException.cs +++ b/src/Spring/Spring.Data/Dao/DataAccessException.cs @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao -{ +{ /// /// Root of the hierarchy of data access exceptions /// diff --git a/src/Spring/Spring.Data/Dao/DataAccessResourceFailureException.cs b/src/Spring/Spring.Data/Dao/DataAccessResourceFailureException.cs index ab7d2464..025fdb3c 100644 --- a/src/Spring/Spring.Data/Dao/DataAccessResourceFailureException.cs +++ b/src/Spring/Spring.Data/Dao/DataAccessResourceFailureException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Data access exception thrown when a resource fails completely: /// for example, if we can't connect to a database using ADO.NET. /// @@ -68,4 +63,4 @@ namespace Spring.Dao protected DataAccessResourceFailureException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/DataIntegrityViolationException.cs b/src/Spring/Spring.Data/Dao/DataIntegrityViolationException.cs index fb736998..b624f2f9 100644 --- a/src/Spring/Spring.Data/Dao/DataIntegrityViolationException.cs +++ b/src/Spring/Spring.Data/Dao/DataIntegrityViolationException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Exception thrown when an attempt to insert or update data /// results in violation of an integrity constraint. /// @@ -74,4 +69,4 @@ namespace Spring.Dao protected DataIntegrityViolationException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/DataRetrievalFailureException.cs b/src/Spring/Spring.Data/Dao/DataRetrievalFailureException.cs index 72e94b4e..9719fb4e 100644 --- a/src/Spring/Spring.Data/Dao/DataRetrievalFailureException.cs +++ b/src/Spring/Spring.Data/Dao/DataRetrievalFailureException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Exception thrown if certain expected data could not be retrieved, e.g. /// when looking up specific data via a known identifier. /// @@ -74,4 +69,4 @@ namespace Spring.Dao protected DataRetrievalFailureException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/DeadlockLoserDataAccessException.cs b/src/Spring/Spring.Data/Dao/DeadlockLoserDataAccessException.cs index b97c2e01..fce35742 100644 --- a/src/Spring/Spring.Data/Dao/DeadlockLoserDataAccessException.cs +++ b/src/Spring/Spring.Data/Dao/DeadlockLoserDataAccessException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Generic exception thrown when the current process was /// a deadlock loser, and its transaction rolled back. /// @@ -68,4 +63,4 @@ namespace Spring.Dao protected DeadlockLoserDataAccessException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/EmptyResultDataAccessException.cs b/src/Spring/Spring.Data/Dao/EmptyResultDataAccessException.cs index 3d9e8ce0..1fd4fa2a 100644 --- a/src/Spring/Spring.Data/Dao/EmptyResultDataAccessException.cs +++ b/src/Spring/Spring.Data/Dao/EmptyResultDataAccessException.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { /// @@ -41,7 +36,7 @@ namespace Spring.Dao /// Initializes a new instance of the class. /// public EmptyResultDataAccessException() : base () - { + { } /// @@ -49,7 +44,7 @@ namespace Spring.Dao /// /// The message. public EmptyResultDataAccessException(string message) : base (message) - { + { } /// @@ -58,7 +53,7 @@ namespace Spring.Dao /// The message. /// The inner exception. public EmptyResultDataAccessException(string message, Exception innerException) : base (message, innerException) - { + { } /// @@ -78,7 +73,7 @@ namespace Spring.Dao /// The expected size. public EmptyResultDataAccessException( string message, int expectedSize ) : base( message, expectedSize, 0 ) {} - + /// /// Initializes a new instance of the class. /// diff --git a/src/Spring/Spring.Data/Dao/IncorrectResultSizeDataAccessException.cs b/src/Spring/Spring.Data/Dao/IncorrectResultSizeDataAccessException.cs index 60decbc5..47a0b228 100644 --- a/src/Spring/Spring.Data/Dao/IncorrectResultSizeDataAccessException.cs +++ b/src/Spring/Spring.Data/Dao/IncorrectResultSizeDataAccessException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Data access exception thrown when a result was not of the expected size, /// for example when expecting a single row but getting 0 or more than 1 rows. /// @@ -145,4 +140,4 @@ namespace Spring.Dao base.GetObjectData( info, context ); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/IncorrectUpdateSemanticsDataAccessException.cs b/src/Spring/Spring.Data/Dao/IncorrectUpdateSemanticsDataAccessException.cs index b9b534a2..c03f64f2 100644 --- a/src/Spring/Spring.Data/Dao/IncorrectUpdateSemanticsDataAccessException.cs +++ b/src/Spring/Spring.Data/Dao/IncorrectUpdateSemanticsDataAccessException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Data access exception thrown when something unintended appears to have /// happened with an update, but the transaction hasn't already been rolled back. /// @@ -82,4 +77,4 @@ namespace Spring.Dao protected IncorrectUpdateSemanticsDataAccessException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/InvalidDataAccessApiUsageException.cs b/src/Spring/Spring.Data/Dao/InvalidDataAccessApiUsageException.cs index ac738022..64e7bdec 100644 --- a/src/Spring/Spring.Data/Dao/InvalidDataAccessApiUsageException.cs +++ b/src/Spring/Spring.Data/Dao/InvalidDataAccessApiUsageException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Exception thrown on incorrect usage of the API, such as failing to "compile" a query /// object that needed compilation before execution. /// @@ -74,4 +69,4 @@ namespace Spring.Dao protected InvalidDataAccessApiUsageException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/InvalidDataAccessResourceUsageException.cs b/src/Spring/Spring.Data/Dao/InvalidDataAccessResourceUsageException.cs index 3e95babf..fa4995e8 100644 --- a/src/Spring/Spring.Data/Dao/InvalidDataAccessResourceUsageException.cs +++ b/src/Spring/Spring.Data/Dao/InvalidDataAccessResourceUsageException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Root for exceptions thrown when we use a data access resource incorrectly. /// /// @@ -73,4 +68,4 @@ namespace Spring.Dao protected InvalidDataAccessResourceUsageException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/NonTransientDataAccessException.cs b/src/Spring/Spring.Data/Dao/NonTransientDataAccessException.cs index 4e94f44b..f79d2333 100644 --- a/src/Spring/Spring.Data/Dao/NonTransientDataAccessException.cs +++ b/src/Spring/Spring.Data/Dao/NonTransientDataAccessException.cs @@ -18,17 +18,12 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// - /// Root of the hierarchy of data access exception that are considered non-transient - + /// + /// Root of the hierarchy of data access exception that are considered non-transient - /// where a retry of the same operation would fail unless the cause of the Exception is /// corrected. /// @@ -69,4 +64,4 @@ namespace Spring.Dao protected NonTransientDataAccessException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/NonTransientDataAccessResourceException.cs b/src/Spring/Spring.Data/Dao/NonTransientDataAccessResourceException.cs index 297060a7..a4e978f0 100644 --- a/src/Spring/Spring.Data/Dao/NonTransientDataAccessResourceException.cs +++ b/src/Spring/Spring.Data/Dao/NonTransientDataAccessResourceException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Data access exception thrown when a resource fails completely and the failure is permanent. /// /// Thomas Risberg @@ -67,4 +62,4 @@ namespace Spring.Dao protected NonTransientDataAccessResourceException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/ObjectOptimisticLockingFailureException.cs b/src/Spring/Spring.Data/Dao/ObjectOptimisticLockingFailureException.cs index 366117ba..1382b370 100644 --- a/src/Spring/Spring.Data/Dao/ObjectOptimisticLockingFailureException.cs +++ b/src/Spring/Spring.Data/Dao/ObjectOptimisticLockingFailureException.cs @@ -1,14 +1,14 @@ #region Licence /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,18 +18,13 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { /// /// Exception thrown on an optimistic locking violation for a mapped object. - /// Provides information about the persistent class and the identifier. + /// Provides information about the persistent class and the identifier. /// /// Mark Pollack (.NET) [Serializable] @@ -57,7 +52,7 @@ namespace Spring.Dao /// /// A message about the exception.. public ObjectOptimisticLockingFailureException(string message) : base(message) - { + { } /// @@ -69,7 +64,7 @@ namespace Spring.Dao /// /// /// The root exception from the underlying data access API - /// + /// public ObjectOptimisticLockingFailureException(string message, Exception rootCause) : base(message, rootCause) { } @@ -78,7 +73,7 @@ namespace Spring.Dao "Object of class [" + persistentClass.Name + "] with identifier [" + identifier + "]: optimistic locking failed", null) { - + } public ObjectOptimisticLockingFailureException( @@ -92,7 +87,7 @@ namespace Spring.Dao "Object of class [" + persistentClassName + "] with identifier [" + identifier + "]: optimistic locking failed", null) { - + } public ObjectOptimisticLockingFailureException( @@ -123,17 +118,17 @@ namespace Spring.Dao { get { - if (this.persistentClass is Type) + if (this.persistentClass is Type) { return ((Type) this.persistentClass).Name; } return (this.persistentClass != null ? this.persistentClass.ToString() : null); - + } } - + #region Properties @@ -156,9 +151,9 @@ namespace Spring.Dao { info.AddValue( "persistentClass", persistentClass ); info.AddValue( "identifier", identifier ); - base.GetObjectData( info, context ); + base.GetObjectData( info, context ); } #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/ObjectRetrievalFailureException.cs b/src/Spring/Spring.Data/Dao/ObjectRetrievalFailureException.cs index 36891453..4c5dc6ba 100644 --- a/src/Spring/Spring.Data/Dao/ObjectRetrievalFailureException.cs +++ b/src/Spring/Spring.Data/Dao/ObjectRetrievalFailureException.cs @@ -1,14 +1,14 @@ #region Licence /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,18 +18,13 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { /// /// Exception thrown if a mapped object could not be retrieved via its identifier. - /// Provides information about the persistent class and the identifier. + /// Provides information about the persistent class and the identifier. /// /// Mark Pollack (.NET) [Serializable] @@ -53,7 +48,7 @@ namespace Spring.Dao /// A message about the exception. public ObjectRetrievalFailureException(string message) : base(message) { - + } /// @@ -65,7 +60,7 @@ namespace Spring.Dao /// /// /// The root exception from the underlying data access API - /// + /// public ObjectRetrievalFailureException(string message, Exception rootCause) : base(message, rootCause) { } @@ -87,12 +82,12 @@ namespace Spring.Dao "Object of class [" + persistentClassName + "] with identifier [" + identifier + "]: not found", null) { - + } public ObjectRetrievalFailureException( String persistentClassName, Object identifier, String msg, Exception ex) : base(msg, ex) - { + { this.persistentClass = persistentClassName; this.identifier = identifier; } @@ -118,12 +113,12 @@ namespace Spring.Dao { get { - if (this.persistentClass is Type) + if (this.persistentClass is Type) { return ((Type) this.persistentClass).Name; } return (this.persistentClass != null ? this.persistentClass.ToString() : null); - + } } @@ -138,8 +133,8 @@ namespace Spring.Dao { info.AddValue( "persistentClass", persistentClass ); info.AddValue( "identifier", identifier ); - base.GetObjectData( info, context ); + base.GetObjectData( info, context ); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/OptimisticLockingFailureException.cs b/src/Spring/Spring.Data/Dao/OptimisticLockingFailureException.cs index 2f4ee419..f6d93b04 100644 --- a/src/Spring/Spring.Data/Dao/OptimisticLockingFailureException.cs +++ b/src/Spring/Spring.Data/Dao/OptimisticLockingFailureException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Exception thrown on an optimistic locking violation. /// /// @@ -73,4 +68,4 @@ namespace Spring.Dao protected OptimisticLockingFailureException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/PermissionDeniedDataAccessException.cs b/src/Spring/Spring.Data/Dao/PermissionDeniedDataAccessException.cs index a8a57bf8..ee24a0c5 100644 --- a/src/Spring/Spring.Data/Dao/PermissionDeniedDataAccessException.cs +++ b/src/Spring/Spring.Data/Dao/PermissionDeniedDataAccessException.cs @@ -18,17 +18,12 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// - /// Exception thrown when the underlyingresource denied a permission to + /// + /// Exception thrown when the underlyingresource denied a permission to /// access a specific element, such as a specific database table. /// /// Juergen Hoeller @@ -68,4 +63,4 @@ namespace Spring.Dao protected PermissionDeniedDataAccessException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/PessimisticLockingFailureException.cs b/src/Spring/Spring.Data/Dao/PessimisticLockingFailureException.cs index dbc8d8df..68981fc8 100644 --- a/src/Spring/Spring.Data/Dao/PessimisticLockingFailureException.cs +++ b/src/Spring/Spring.Data/Dao/PessimisticLockingFailureException.cs @@ -18,20 +18,15 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Exception thrown on a pessimistic locking violation. /// /// - /// Serves as a superclass for more specific exceptions, like + /// Serves as a superclass for more specific exceptions, like /// CannotAcquireLockException and DeadlockLoserDataAccessException /// /// @@ -76,4 +71,4 @@ namespace Spring.Dao protected PessimisticLockingFailureException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/Support/ChainedPersistenceExceptionTranslator.cs b/src/Spring/Spring.Data/Dao/Support/ChainedPersistenceExceptionTranslator.cs index da3526eb..b8258a42 100644 --- a/src/Spring/Spring.Data/Dao/Support/ChainedPersistenceExceptionTranslator.cs +++ b/src/Spring/Spring.Data/Dao/Support/ChainedPersistenceExceptionTranslator.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using Spring.Data.Support; using Spring.Util; @@ -97,4 +96,4 @@ namespace Spring.Dao.Support } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/Support/DaoSupport.cs b/src/Spring/Spring.Data/Dao/Support/DaoSupport.cs index fd357f18..48c98299 100644 --- a/src/Spring/Spring.Data/Dao/Support/DaoSupport.cs +++ b/src/Spring/Spring.Data/Dao/Support/DaoSupport.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,18 +18,13 @@ #endregion -#region Imports - -using System; using Common.Logging; using Spring.Objects.Factory; -#endregion - namespace Spring.Dao.Support { /// - /// Generic base class for DAOs, defining template methods for DAO initialization. + /// Generic base class for DAOs, defining template methods for DAO initialization. /// /// /// Extended by Spring's specific DAO support classes, such as: @@ -45,7 +40,7 @@ namespace Spring.Dao.Support #region Constants /// - /// The shared instance for this class (and derived classes). + /// The shared instance for this class (and derived classes). /// protected static readonly ILog log = LogManager.GetLogger(typeof (DaoSupport)); @@ -79,7 +74,7 @@ namespace Spring.Dao.Support /// protected abstract void CheckDaoConfig(); - /// + /// /// Concrete subclasses can override this for custom initialization behavior. /// /// @@ -89,7 +84,7 @@ namespace Spring.Dao.Support /// protected virtual void InitDao() { - + } @@ -101,11 +96,11 @@ namespace Spring.Dao.Support CheckDaoConfig(); // Let concrete implementations initialize themselves. - try + try { InitDao(); } - catch (Exception ex) + catch (Exception ex) { throw new ObjectInitializationException("Initialization of DAO failed: " + ex.Message, ex); } diff --git a/src/Spring/Spring.Data/Dao/Support/DataAccessUtils.cs b/src/Spring/Spring.Data/Dao/Support/DataAccessUtils.cs index cb4e642a..8e08dd74 100644 --- a/src/Spring/Spring.Data/Dao/Support/DataAccessUtils.cs +++ b/src/Spring/Spring.Data/Dao/Support/DataAccessUtils.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Collections; using Spring.Util; -#endregion - namespace Spring.Dao.Support { /// @@ -33,7 +28,7 @@ namespace Spring.Dao.Support /// Useful with any data access technology. /// /// Mark Pollack (.NET) - public class DataAccessUtils + public class DataAccessUtils { #region Constructor (s) @@ -48,7 +43,7 @@ namespace Spring.Dao.Support #endregion #region Methods - + public static object RequiredUniqueResultSet(IList results) { int size = (results != null ? results.Count : 0); @@ -67,7 +62,7 @@ namespace Spring.Dao.Support /// /// Return a translated exception if this is appropriate, or null if the exception could - /// not be translated. + /// not be translated. /// /// The raw exception we may wish to translate. /// The PersistenceExceptionTranslator to use to perform the translation. @@ -78,8 +73,8 @@ namespace Spring.Dao.Support AssertUtils.ArgumentNotNull(pet, "PersistenceExceptionTranslator must not be null"); return pet.TranslateExceptionIfPossible(rawException); } - - #endregion + + #endregion } } diff --git a/src/Spring/Spring.Data/Dao/Support/Generic/DataAccessUtils.cs b/src/Spring/Spring.Data/Dao/Support/Generic/DataAccessUtils.cs index 39262862..359691df 100644 --- a/src/Spring/Spring.Data/Dao/Support/Generic/DataAccessUtils.cs +++ b/src/Spring/Spring.Data/Dao/Support/Generic/DataAccessUtils.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System.Collections.Generic; using Spring.Util.Generic; -#endregion - namespace Spring.Dao.Support.Generic { /// @@ -32,7 +27,7 @@ namespace Spring.Dao.Support.Generic /// Useful with any data access technology. /// /// Mark Pollack (.NET) - public class DataAccessUtils + public class DataAccessUtils { #region Constructor (s) @@ -63,8 +58,8 @@ namespace Spring.Dao.Support.Generic enumerator.MoveNext(); return enumerator.Current; } - - #endregion + + #endregion } } diff --git a/src/Spring/Spring.Data/Dao/Support/IPersistenceExceptionTranslator.cs b/src/Spring/Spring.Data/Dao/Support/IPersistenceExceptionTranslator.cs index 57d6b5b2..51940f33 100644 --- a/src/Spring/Spring.Data/Dao/Support/IPersistenceExceptionTranslator.cs +++ b/src/Spring/Spring.Data/Dao/Support/IPersistenceExceptionTranslator.cs @@ -1,4 +1,4 @@ - + #region License @@ -20,8 +20,6 @@ #endregion -using System; - using Spring.Data.Support; namespace Spring.Dao.Support @@ -52,7 +50,7 @@ namespace Spring.Dao.Support /// /// /// Of particular importance is the correct translation to - /// for example on constraint violation. Implementations may use Spring ADO.NET Framework's + /// for example on constraint violation. Implementations may use Spring ADO.NET Framework's /// sophisticated exception translation to provide further information in the event of SQLException as a root cause. /// /// @@ -68,4 +66,4 @@ namespace Spring.Dao.Support /// Mark Pollack (.NET) DataAccessException TranslateExceptionIfPossible(Exception ex); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/Support/PersistenceExceptionTranslationInterceptor.cs b/src/Spring/Spring.Data/Dao/Support/PersistenceExceptionTranslationInterceptor.cs index f075121f..8dc46390 100644 --- a/src/Spring/Spring.Data/Dao/Support/PersistenceExceptionTranslationInterceptor.cs +++ b/src/Spring/Spring.Data/Dao/Support/PersistenceExceptionTranslationInterceptor.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using AopAlliance.Intercept; using Spring.Objects.Factory; using Spring.Util; @@ -75,7 +73,7 @@ namespace Spring.Dao.Support /// /// Sets the persistence exception translator. The default is to autodetect all IPersistenceExceptionTranslators - /// in the containing object factory, using them in a chain. + /// in the containing object factory, using them in a chain. /// /// The persistence exception translator. public IPersistenceExceptionTranslator PersistenceExceptionTranslator @@ -114,7 +112,7 @@ namespace Spring.Dao.Support if (this.persistenceExceptionTranslator == null) { // No explicit exception translator specified - perform autodetection. - IListableObjectFactory owningFactory = value as IListableObjectFactory; + IListableObjectFactory owningFactory = value as IListableObjectFactory; if (owningFactory == null) { throw new ArgumentException("Cannot use IPersistenceExceptionTranslator autodetection without IListableObjectFactory"); @@ -191,4 +189,4 @@ namespace Spring.Dao.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/TransientDataAccessException.cs b/src/Spring/Spring.Data/Dao/TransientDataAccessException.cs index 14a77750..33daf34e 100644 --- a/src/Spring/Spring.Data/Dao/TransientDataAccessException.cs +++ b/src/Spring/Spring.Data/Dao/TransientDataAccessException.cs @@ -18,17 +18,12 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// - /// Root of the hierarchy of data access exception that are considered transient - + /// + /// Root of the hierarchy of data access exception that are considered transient - /// where a previously failed operation might be able to succeed when the operation /// is retried without any intervention by application-level functionality. /// @@ -69,4 +64,4 @@ namespace Spring.Dao protected TransientDataAccessException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/TransientDataAccessResourceException.cs b/src/Spring/Spring.Data/Dao/TransientDataAccessResourceException.cs index f73e97dd..58661a6e 100644 --- a/src/Spring/Spring.Data/Dao/TransientDataAccessResourceException.cs +++ b/src/Spring/Spring.Data/Dao/TransientDataAccessResourceException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// RDta access exception thrown when a resource fails temporarily and the operation can be /// retried. /// @@ -68,4 +63,4 @@ namespace Spring.Dao protected TransientDataAccessResourceException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/TypeMismatchDataAccessException.cs b/src/Spring/Spring.Data/Dao/TypeMismatchDataAccessException.cs index 5a882715..b891ebbb 100644 --- a/src/Spring/Spring.Data/Dao/TypeMismatchDataAccessException.cs +++ b/src/Spring/Spring.Data/Dao/TypeMismatchDataAccessException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Exception thrown on mismatch between CLS type and database type: /// for example on an attempt to set an object of the wrong type /// in an RDBMS column. @@ -69,4 +64,4 @@ namespace Spring.Dao protected TypeMismatchDataAccessException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Dao/UncategorizedDataAccessException.cs b/src/Spring/Spring.Data/Dao/UncategorizedDataAccessException.cs index 93a9ef7a..7b26ef89 100644 --- a/src/Spring/Spring.Data/Dao/UncategorizedDataAccessException.cs +++ b/src/Spring/Spring.Data/Dao/UncategorizedDataAccessException.cs @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; -#endregion - namespace Spring.Dao { - /// + /// /// Normal superclass when we can't distinguish anything more specific /// than "something went wrong with the underlying resource": for example, /// a SQLException from Sql Server that we can't pinpoint more precisely. @@ -69,4 +64,4 @@ namespace Spring.Dao protected UncategorizedDataAccessException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/BadSqlGrammarException.cs b/src/Spring/Spring.Data/Data/BadSqlGrammarException.cs index 2b79700d..5d3e9a91 100644 --- a/src/Spring/Spring.Data/Data/BadSqlGrammarException.cs +++ b/src/Spring/Spring.Data/Data/BadSqlGrammarException.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; using Spring.Dao; -#endregion - namespace Spring.Data { /// @@ -57,7 +52,7 @@ namespace Spring.Data /// /// A message about the exception. public BadSqlGrammarException(string message): base(message) - { + { } /// @@ -66,7 +61,7 @@ namespace Spring.Data /// A message about the exception. /// The inner exception. public BadSqlGrammarException(string message, Exception inner): base(message, inner) - { + { } @@ -76,21 +71,21 @@ namespace Spring.Data /// name of the current task. /// The offending SQL statment /// The root cause. - public BadSqlGrammarException(string task, String sql, Exception ex) : base(task + "; bad SQL grammar [" + sql + "]; " + ex.Message, ex) + public BadSqlGrammarException(string task, String sql, Exception ex) : base(task + "; bad SQL grammar [" + sql + "]; " + ex.Message, ex) { this.sql = sql; } /// protected BadSqlGrammarException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} - + #endregion #region Properties public string Sql { - get + get { return sql; } @@ -110,7 +105,7 @@ namespace Spring.Data public override void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue( "sql", sql ); - base.GetObjectData( info, context ); + base.GetObjectData( info, context ); } #endregion diff --git a/src/Spring/Spring.Data/Data/CannotGetAdoConnectionException.cs b/src/Spring/Spring.Data/Data/CannotGetAdoConnectionException.cs index b9f402e6..a16268dc 100644 --- a/src/Spring/Spring.Data/Data/CannotGetAdoConnectionException.cs +++ b/src/Spring/Spring.Data/Data/CannotGetAdoConnectionException.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; using Spring.Dao; -#endregion - namespace Spring.Data { /// @@ -50,10 +45,10 @@ namespace Spring.Data /// /// A message about the exception. public CannotGetAdoConnectionException(string message): base(message) - { + { } - - + + /// /// Initializes a new instance of the class. /// @@ -61,7 +56,7 @@ namespace Spring.Data /// The inner exception. public CannotGetAdoConnectionException(string message, Exception inner) : base(message, inner) - { + { } /// diff --git a/src/Spring/Spring.Data/Data/Common/DbMetadata.cs b/src/Spring/Spring.Data/Data/Common/DbMetadata.cs index 245bfcba..a8ac148a 100644 --- a/src/Spring/Spring.Data/Data/Common/DbMetadata.cs +++ b/src/Spring/Spring.Data/Data/Common/DbMetadata.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Reflection; using Spring.Util; -#endregion - namespace Spring.Data.Common { /// @@ -44,11 +39,11 @@ namespace Spring.Data.Common private Type commandType; private Type parameterType; private Type dataAdapterType; - + private Type parameterDbType; private PropertyInfo parameterDbTypeProperty; - private PropertyInfo parameterIsNullableProperty; + private PropertyInfo parameterIsNullableProperty; private string parameterNamePrefix; private Type exceptionType; @@ -125,7 +120,7 @@ namespace Spring.Data.Common AssertUtils.ArgumentHasText(parameterIsNullableProperty, "parameterIsNullableProperty", GetErrorMessage()); AssertUtils.ArgumentHasText(parameterNamePrefix, "parameterNamePrefix", GetErrorMessage()); AssertUtils.ArgumentNotNull(exceptionType, "exceptionType", GetErrorMessage()); - + this.assemblyName = assemblyName; this.connectionType = connectionType; @@ -158,9 +153,9 @@ namespace Spring.Data.Common this.parameterDbTypeProperty = this.parameterType.GetProperty(parameterDbTypeProperty, BindingFlags.Instance | BindingFlags.Public); - AssertUtils.ArgumentNotNull(this.parameterDbTypeProperty, "parameterDbTypeProperty", GetErrorMessage() + - ", could not resolve parameterDbTypeProperty " + - parameterDbTypeProperty + + AssertUtils.ArgumentNotNull(this.parameterDbTypeProperty, "parameterDbTypeProperty", GetErrorMessage() + + ", could not resolve parameterDbTypeProperty " + + parameterDbTypeProperty + " to PropertyInfo. Please check dbproviders.xml entry for correct metadata listing."); this.parameterIsNullableProperty = this.parameterType.GetProperty(parameterIsNullableProperty, @@ -170,20 +165,20 @@ namespace Spring.Data.Common ", could not resolve parameterIsNullableProperty " + parameterIsNullableProperty + " to PropertyInfo. Please check dbproviders.xml entry for correct metadata listing."); - + this.parameterNamePrefix = parameterNamePrefix; this.exceptionType = exceptionType; - + this.useParameterNamePrefixInParameterCollection = useParameterNamePrefixInParameterCollection; this.useParameterPrefixInSql = useParameterPrefixInSql; this.bindByName = bindByName; this.errorCodeExceptionExpression = errorCodeExceptionExpression; - - + + errorCodes = new ErrorCodes(); - + } private string GetErrorMessage() @@ -397,7 +392,7 @@ namespace Spring.Data.Common /// The error codes. public ErrorCodes ErrorCodes { - get { return errorCodes; } + get { return errorCodes; } set { errorCodes = value;} } @@ -412,7 +407,7 @@ namespace Spring.Data.Common } #endregion - + } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Common/DbParameter.cs b/src/Spring/Spring.Data/Data/Common/DbParameter.cs index ee66dd88..c8a88f3b 100644 --- a/src/Spring/Spring.Data/Data/Common/DbParameter.cs +++ b/src/Spring/Spring.Data/Data/Common/DbParameter.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Data; -#endregion - namespace Spring.Data.Common { /// @@ -34,7 +29,7 @@ namespace Spring.Data.Common public class DbParameter : Spring.Data.Common.IDbParameter { #region Fields - private Enum dbType; + private Enum dbType; private ParameterDirection direction; private bool isNullable; private string name; @@ -56,7 +51,7 @@ namespace Spring.Data.Common public DbParameter() { sourceVersion = DataRowVersion.Default; - direction = ParameterDirection.Input; + direction = ParameterDirection.Input; } #endregion @@ -165,7 +160,7 @@ namespace Spring.Data.Common public byte GetPrecision() { - return precision; + return precision; } public IDbParameter Scale(byte scale) diff --git a/src/Spring/Spring.Data/Data/Common/DbParameters.cs b/src/Spring/Spring.Data/Data/Common/DbParameters.cs index fae6eb96..e5b81e0b 100644 --- a/src/Spring/Spring.Data/Data/Common/DbParameters.cs +++ b/src/Spring/Spring.Data/Data/Common/DbParameters.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Data; using System.Reflection; using Spring.Dao; -#endregion - namespace Spring.Data.Common { /// @@ -41,7 +36,7 @@ namespace Spring.Data.Common private IDbProvider dbProvider; - //Just used as a container for the underlying parameter collection. + //Just used as a container for the underlying parameter collection. private IDbCommand dbCommand; private IDataParameterCollection dataParameterCollection; @@ -85,7 +80,7 @@ namespace Spring.Data.Common { get { return dataParameterCollection; } } - + public int Count { get @@ -102,16 +97,16 @@ namespace Spring.Data.Common { dataParameterCollection.Add(dbParameter); } - - public IDbDataParameter AddParameter(string name, - Enum parameterType, - int size, + + public IDbDataParameter AddParameter(string name, + Enum parameterType, + int size, ParameterDirection direction, bool isNullable, - byte precision, - byte scale, - string sourceColumn, + byte precision, + byte scale, + string sourceColumn, DataRowVersion sourceVersion, object parameterValue) { @@ -149,18 +144,18 @@ namespace Spring.Data.Common parameter.Value = (parameterValue == null) ? DBNull.Value : parameterValue; dataParameterCollection.Add(parameter); - + return parameter; } - public IDbDataParameter AddParameter(string name, - Enum parameterType, - ParameterDirection direction, + public IDbDataParameter AddParameter(string name, + Enum parameterType, + ParameterDirection direction, bool isNullable, byte precision, - byte scale, - string sourceColumn, - DataRowVersion sourceVersion, + byte scale, + string sourceColumn, + DataRowVersion sourceVersion, object parameterValue) { return AddParameter(name, parameterType, 0, direction, isNullable, precision, scale, sourceColumn, sourceVersion, @@ -186,31 +181,31 @@ namespace Spring.Data.Common public IDbDataParameter AddWithValue(string name, object parameterValue) { - return AddParameter(name, null, -1, ParameterDirection.Input, false, + return AddParameter(name, null, -1, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Default, parameterValue); } public IDbDataParameter Add(string name, Enum parameterType) { - return AddParameter(name, parameterType, -1, ParameterDirection.Input, + return AddParameter(name, parameterType, -1, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Default, null); } - + public IDbDataParameter Add(string name, Enum parameterType, int size) { - return AddParameter(name, parameterType, size, ParameterDirection.Input, + return AddParameter(name, parameterType, size, ParameterDirection.Input, false, 0, 0, null, DataRowVersion.Default, null); } - + public IDbDataParameter Add(string name, Enum parameterType, int size, string sourceColumn) { - return AddParameter(name, parameterType, size, ParameterDirection.Input, + return AddParameter(name, parameterType, size, ParameterDirection.Input, false, 0, 0, sourceColumn, DataRowVersion.Default, null); } public IDbDataParameter AddOut(string name, Enum parameterType) { - return AddParameter(name, parameterType, -1, ParameterDirection.Output, + return AddParameter(name, parameterType, -1, ParameterDirection.Output, false, 0, 0, null, DataRowVersion.Default, null); } @@ -219,25 +214,25 @@ namespace Spring.Data.Common return AddParameter(name, parameterType, size, ParameterDirection.Output, false, 0, 0, null, DataRowVersion.Default, null); } - + public IDbDataParameter AddInOut(string name, Enum parameterType) { return AddParameter(name, parameterType, -1, ParameterDirection.InputOutput, false, 0, 0, null, DataRowVersion.Default, null); } - + public IDbDataParameter AddInOut(string name, Enum parameterType, int size) { return AddParameter(name, parameterType, size, ParameterDirection.InputOutput, false, 0, 0, null, DataRowVersion.Default, null); } - + public IDbDataParameter AddReturn(string name, Enum parameterType) { return AddParameter(name, parameterType, -1, ParameterDirection.ReturnValue, false, 0, 0, null, DataRowVersion.Default, null); } - + public IDbDataParameter AddReturn(string name, Enum parameterType, int size) { return AddParameter(name, parameterType, size, ParameterDirection.ReturnValue, @@ -266,7 +261,7 @@ namespace Spring.Data.Common } } - + protected void AssignParameterType(IDbDataParameter parameter, Enum parameterType) { if (parameterType != null) @@ -280,15 +275,15 @@ namespace Spring.Data.Common if (parameterType.GetType() != dbProvider.DbMetadata.ParameterDbType) { throw new TypeMismatchDataAccessException("Invalid parameter type specified for parameter name [" - + parameter.ParameterName + "]. [" - + parameterType.GetType().AssemblyQualifiedName + "] is not of expected type [" + + parameter.ParameterName + "]. [" + + parameterType.GetType().AssemblyQualifiedName + "] is not of expected type [" + dbProvider.DbMetadata.ParameterDbType.AssemblyQualifiedName + "]"); } dbProvider.DbMetadata.ParameterDbTypeProperty.SetValue(parameter, parameterType, null); } } } - + protected void AssignIsNullable(bool isNullable, IDbDataParameter parameter) { PropertyInfo propertyInfo = dbProvider.DbMetadata.ParameterIsNullableProperty; @@ -303,4 +298,4 @@ namespace Spring.Data.Common } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Common/DbParametersBuilder.cs b/src/Spring/Spring.Data/Data/Common/DbParametersBuilder.cs index a869815c..540d5696 100644 --- a/src/Spring/Spring.Data/Data/Common/DbParametersBuilder.cs +++ b/src/Spring/Spring.Data/Data/Common/DbParametersBuilder.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,13 +18,9 @@ #endregion -#region Imports - using System.Collections; using Common.Logging; -#endregion - namespace Spring.Data.Common { /// @@ -47,7 +43,7 @@ namespace Spring.Data.Common #region Constants /// - /// The shared log instance for this class (and derived classes). + /// The shared log instance for this class (and derived classes). /// protected static readonly ILog log = LogManager.GetLogger(typeof (DbParametersBuilder)); @@ -85,7 +81,7 @@ namespace Spring.Data.Common IDbParameters dbParameters = CreateDbParameters(); foreach (IDbParameter parameter in parameterList) { - dbParameters.AddParameter(parameter.GetName(), + dbParameters.AddParameter(parameter.GetName(), parameter.GetDbType(), parameter.GetSize(), parameter.GetDirection(), @@ -107,4 +103,4 @@ namespace Spring.Data.Common #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Common/DbProvider.cs b/src/Spring/Spring.Data/Data/Common/DbProvider.cs index 299a3860..b91f6114 100644 --- a/src/Spring/Spring.Data/Data/Common/DbProvider.cs +++ b/src/Spring/Spring.Data/Data/Common/DbProvider.cs @@ -1,7 +1,7 @@ #region Licence /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Data; using Spring.Expressions; @@ -236,4 +235,4 @@ namespace Spring.Data.Common } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Common/DbProviderConfigurer.cs b/src/Spring/Spring.Data/Data/Common/DbProviderConfigurer.cs index c6595468..6c413811 100644 --- a/src/Spring/Spring.Data/Data/Common/DbProviderConfigurer.cs +++ b/src/Spring/Spring.Data/Data/Common/DbProviderConfigurer.cs @@ -18,7 +18,6 @@ #endregion -using System; using Common.Logging; using Spring.Core; using Spring.Core.IO; @@ -27,7 +26,7 @@ using Spring.Objects.Factory.Config; namespace Spring.Data.Common { /// - /// + /// /// /// Mark Pollack public class DbProviderConfigurer : IObjectFactoryPostProcessor, IOrdered @@ -99,4 +98,4 @@ namespace Spring.Data.Common #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Common/DbProviderFactory.cs b/src/Spring/Spring.Data/Data/Common/DbProviderFactory.cs index 44c230c3..b3d53af2 100644 --- a/src/Spring/Spring.Data/Data/Common/DbProviderFactory.cs +++ b/src/Spring/Spring.Data/Data/Common/DbProviderFactory.cs @@ -14,9 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections.Generic; - using Common.Logging; using Spring.Context; using Spring.Context.Support; @@ -140,7 +137,7 @@ namespace Spring.Data.Common log.Error("Error processing " + DBPROVIDER_DEFAULT_RESOURCE_NAME, e); throw; } - } + } } } } diff --git a/src/Spring/Spring.Data/Data/Common/DbProviderFactoryObject.cs b/src/Spring/Spring.Data/Data/Common/DbProviderFactoryObject.cs index 2bd20d37..0e3b4477 100644 --- a/src/Spring/Spring.Data/Data/Common/DbProviderFactoryObject.cs +++ b/src/Spring/Spring.Data/Data/Common/DbProviderFactoryObject.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - using Spring.Objects.Factory; using Spring.Util; @@ -29,7 +27,7 @@ namespace Spring.Data.Common /// A implementation that /// creates instances of the class. /// - /// Typically used as a convenience for retrieving shared + /// Typically used as a convenience for retrieving shared /// in a Spring XML configuration file as compared to /// using explict factory method support. /// @@ -185,4 +183,4 @@ namespace Spring.Data.Common #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Common/DelegatingDbProvider.cs b/src/Spring/Spring.Data/Data/Common/DelegatingDbProvider.cs index b01b51f5..69494d7e 100644 --- a/src/Spring/Spring.Data/Data/Common/DelegatingDbProvider.cs +++ b/src/Spring/Spring.Data/Data/Common/DelegatingDbProvider.cs @@ -1,14 +1,14 @@ #region Licence /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,6 @@ #endregion -using System; using System.Data; using Spring.Objects.Factory; using Spring.Util; @@ -112,7 +111,7 @@ namespace Spring.Data.Common /// /// Returns a new parameter object for binding values to parameter /// placeholders in SQL statements or Stored Procedure variables. - /// + /// /// A new public virtual IDbDataParameter CreateParameter() { @@ -173,10 +172,10 @@ namespace Spring.Data.Common /// to database access. This can be provider dependent in .NET 1.1 since /// there isn't a common base class for ADO.NET exceptions. /// - /// The exception thrown when performing data access + /// The exception thrown when performing data access /// operations. /// - /// true if is a valid data access exception for the specified + /// true if is a valid data access exception for the specified /// exception; otherwise, false. /// public virtual bool IsDataAccessException(Exception e) @@ -224,4 +223,4 @@ namespace Spring.Data.Common #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Common/ErrorCodes.cs b/src/Spring/Spring.Data/Data/Common/ErrorCodes.cs index b8937d81..b1135b52 100644 --- a/src/Spring/Spring.Data/Data/Common/ErrorCodes.cs +++ b/src/Spring/Spring.Data/Data/Common/ErrorCodes.cs @@ -1,14 +1,14 @@ #region Licence /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,17 +18,12 @@ #endregion -#region Imports - -using System; using Common.Logging; -#endregion - namespace Spring.Data.Common { /// - /// Holds ADO.NET error codes for a particular provider. + /// Holds ADO.NET error codes for a particular provider. /// /// /// Used by ErrorCodeExceptionTranslator. The embedded resource @@ -36,7 +31,7 @@ namespace Spring.Data.Common /// ErrorCodes instances for various providers. /// /// Mark Pollack (.NET) - public class ErrorCodes + public class ErrorCodes { #region Fields private string[] databaseProductNames; @@ -67,7 +62,7 @@ namespace Spring.Data.Common #region Constants /// - /// The shared log instance for this class (and derived classes). + /// The shared log instance for this class (and derived classes). /// protected static readonly ILog log = LogManager.GetLogger(typeof (ErrorCodes)); @@ -164,4 +159,4 @@ namespace Spring.Data.Common #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Common/IDbMetadata.cs b/src/Spring/Spring.Data/Data/Common/IDbMetadata.cs index db19ac66..9966799a 100644 --- a/src/Spring/Spring.Data/Data/Common/IDbMetadata.cs +++ b/src/Spring/Spring.Data/Data/Common/IDbMetadata.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,20 +18,15 @@ #endregion -#region Imports - -using System; using System.Reflection; -#endregion - namespace Spring.Data.Common { /// /// Provides minimal database metadata information to support the /// functionality in Spring.NET ADO.NET Framework. /// - /// + /// /// Mark Pollack (.NET) public interface IDbMetadata { @@ -109,7 +104,7 @@ namespace Spring.Data.Common /// /// Does the driver require the use of the parameter prefix when /// specifying the name of the parameter in the Command's - /// Parameter collection. + /// Parameter collection. /// /// If true, then commamd.Parameters["@parameterName"] is /// used, otherwise, command.Parameters["parameterName"]. @@ -119,10 +114,10 @@ namespace Spring.Data.Common /// /// Gets a value indicating whether the Provider requires - /// the use of a named prefix in the SQL string. + /// the use of a named prefix in the SQL string. /// /// - /// The OLE DB/ODBC .NET Provider does not support named parameters for + /// The OLE DB/ODBC .NET Provider does not support named parameters for /// passing parameters to an SQL Statement or a stored procedure called /// by an IDbCommand when CommandType is set to Text. /// @@ -135,10 +130,10 @@ namespace Spring.Data.Common /// For providers that allow you to choose between binding parameters /// to a command by name (true) or by position (false). /// - bool BindByName { + bool BindByName { get; //TODO will go away when make all of this fully configuration driven. - set; + set; } /// @@ -169,4 +164,4 @@ namespace Spring.Data.Common /// The error codes. ErrorCodes ErrorCodes { get; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Common/IDbParameter.cs b/src/Spring/Spring.Data/Data/Common/IDbParameter.cs index 895853d8..fe36b191 100644 --- a/src/Spring/Spring.Data/Data/Common/IDbParameter.cs +++ b/src/Spring/Spring.Data/Data/Common/IDbParameter.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,65 +18,60 @@ #endregion -#region Imports - -using System; using System.Data; -#endregion - namespace Spring.Data.Common { /// /// A parameter interface used by /// /// Mark Pollack (.NET) - public interface IDbParameter + public interface IDbParameter { - + IDbParameter Type(Enum dbType); - + IDbParameter Type(Enum dbType, int size); - + Enum GetDbType(); - + IDbParameter Direction(ParameterDirection direction); ParameterDirection GetDirection(); - + IDbParameter IsNullable(bool isNullable); - + bool GetIsNullable(); IDbParameter Name(string name); - + string GetName(); - + IDbParameter SourceColumn(string sourceColumn); string GetSourceColumn(); - + IDbParameter SourceVersion(DataRowVersion sourceVersion); - + DataRowVersion GetSourceVersion(); - + IDbParameter Value(object val); - + object GetValue(); IDbParameter Precision(byte precision); - + byte GetPrecision(); - + IDbParameter Scale(byte scale); - + byte GetScale(); - + IDbParameter Size(int size); - + int GetSize(); } diff --git a/src/Spring/Spring.Data/Data/Common/IDbParameters.cs b/src/Spring/Spring.Data/Data/Common/IDbParameters.cs index 76511dae..52db4053 100644 --- a/src/Spring/Spring.Data/Data/Common/IDbParameters.cs +++ b/src/Spring/Spring.Data/Data/Common/IDbParameters.cs @@ -1,9 +1,8 @@ -using System; using System.Data; namespace Spring.Data.Common { - public interface IDbParameters + public interface IDbParameters { //TODO implement IDataParameterCollection....? @@ -127,4 +126,4 @@ namespace Spring.Data.Common void SetValue(string name, object parameterValue); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Common/IDbParametersBuilder.cs b/src/Spring/Spring.Data/Data/Common/IDbParametersBuilder.cs index 0f0295d9..5f8fcfc2 100644 --- a/src/Spring/Spring.Data/Data/Common/IDbParametersBuilder.cs +++ b/src/Spring/Spring.Data/Data/Common/IDbParametersBuilder.cs @@ -1,21 +1,14 @@ - -#region Imports - - - -#endregion - namespace Spring.Data.Common { /// /// A builder to create a collection of ADO.NET parameters. /// - /// The chaining of IDbParameter methods does the + /// The chaining of IDbParameter methods does the /// building of the parameter details while the builder class /// itself keeps track of the collection. - /// + /// /// Mark Pollack (.NET) - public interface IDbParametersBuilder + public interface IDbParametersBuilder { /// /// Creates a IDbParameter object and adds it to an internal collection for diff --git a/src/Spring/Spring.Data/Data/Common/IDbProvider.cs b/src/Spring/Spring.Data/Data/Common/IDbProvider.cs index f77c9e3e..fb5b537e 100644 --- a/src/Spring/Spring.Data/Data/Common/IDbProvider.cs +++ b/src/Spring/Spring.Data/Data/Common/IDbProvider.cs @@ -2,13 +2,13 @@ /* * Copyright © 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,6 @@ #endregion -using System; using System.Data; namespace Spring.Data.Common @@ -28,7 +27,7 @@ namespace Spring.Data.Common /// public interface IDbProvider { - + /// /// Returns a new command object for executing SQL statments/Stored Procedures /// against the database. @@ -43,8 +42,8 @@ namespace Spring.Data.Common /// for command builders, hence the return signature is object to /// be portable (but more loosely typed) across .NET 1.1/2.0 /// A new Command Builder - object CreateCommandBuilder(); - + object CreateCommandBuilder(); + /// /// Returns a new connection object to communicate with the database. /// @@ -57,11 +56,11 @@ namespace Spring.Data.Common /// /// A new IDbDataAdapter CreateDataAdapter(); - + /// /// Returns a new parameter object for binding values to parameter /// placeholders in SQL statements or Stored Procedure variables. - /// + /// /// A new IDbDataParameter CreateParameter(); @@ -88,10 +87,10 @@ namespace Spring.Data.Common IDbMetadata DbMetadata { get; - } - - - + } + + + /// /// Connection string used to create connections. /// @@ -114,13 +113,13 @@ namespace Spring.Data.Common /// to database access. This can be provider dependent in .NET 1.1 since /// there isn't a common base class for ADO.NET exceptions. /// - /// The exception thrown when performing data access + /// The exception thrown when performing data access /// operations. /// - /// true if is a valid data access exception for the specified + /// true if is a valid data access exception for the specified /// exception; otherwise, false. /// bool IsDataAccessException(Exception e); - + } } diff --git a/src/Spring/Spring.Data/Data/Common/MultiDelegatingDbProvider.cs b/src/Spring/Spring.Data/Data/Common/MultiDelegatingDbProvider.cs index 7b796cb7..c5e6f35e 100644 --- a/src/Spring/Spring.Data/Data/Common/MultiDelegatingDbProvider.cs +++ b/src/Spring/Spring.Data/Data/Common/MultiDelegatingDbProvider.cs @@ -1,14 +1,14 @@ #region Licence /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Data; using Common.Logging; @@ -115,9 +114,9 @@ namespace Spring.Data.Common { throw new ArgumentException("Value in TargetDbProviders dictionary is not of type IDbProvider. Type = [" + entry.Value.GetType() + "]"); } - } + } } - + #region IDbProvider methods @@ -302,7 +301,7 @@ namespace Spring.Data.Common set { LogicalThreadContext.SetData(CURRENT_DBPROVIDER_SLOTNAME, value); - } + } } } } diff --git a/src/Spring/Spring.Data/Data/Config/DatabaseNamespaceParser.cs b/src/Spring/Spring.Data/Data/Config/DatabaseNamespaceParser.cs index 80510018..15244a65 100644 --- a/src/Spring/Spring.Data/Data/Config/DatabaseNamespaceParser.cs +++ b/src/Spring/Spring.Data/Data/Config/DatabaseNamespaceParser.cs @@ -1,69 +1,65 @@ -#region License - -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.Xml; - -using Spring.Data.Common; -using Spring.Core.TypeResolution; -using Spring.Objects; -using Spring.Objects.Factory.Config; -using Spring.Objects.Factory.Support; -using Spring.Objects.Factory.Xml; -using Spring.Util; - -#endregion - -namespace Spring.Data.Config -{ - /// - /// Implementation of the custom configuration parser for database definitions. - /// - /// Mark Pollack - [ - NamespaceParser( - Namespace = "http://www.springframework.net/database", - SchemaLocationAssemblyHint = typeof(DatabaseNamespaceParser), - SchemaLocation = "/Spring.Data.Config/spring-database-1.3.xsd") +#region License + +/* + * Copyright 2002-2010 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 + +using System.Xml; + +using Spring.Data.Common; +using Spring.Core.TypeResolution; +using Spring.Objects; +using Spring.Objects.Factory.Config; +using Spring.Objects.Factory.Support; +using Spring.Objects.Factory.Xml; +using Spring.Util; + +namespace Spring.Data.Config +{ + /// + /// Implementation of the custom configuration parser for database definitions. + /// + /// Mark Pollack + [ + NamespaceParser( + Namespace = "http://www.springframework.net/database", + SchemaLocationAssemblyHint = typeof(DatabaseNamespaceParser), + SchemaLocation = "/Spring.Data.Config/spring-database-1.3.xsd") ] - public class DatabaseNamespaceParser : ObjectsNamespaceParser - { - - private const string DatabaseTypePrefix = "database: "; - - static DatabaseNamespaceParser() + public class DatabaseNamespaceParser : ObjectsNamespaceParser + { + + private const string DatabaseTypePrefix = "database: "; + + static DatabaseNamespaceParser() { TypeRegistry.RegisterType( DatabaseTypePrefix + DbProviderConfigurerConstants.DbProviderConfigurerElement, - typeof(DbProviderConfigurer)); - TypeRegistry.RegisterType( - DatabaseTypePrefix + DbProviderFactoryObjectConstants.DbProviderFactoryObjectElement, - typeof (DbProviderFactoryObject)); - } - - /// - /// Initializes a new instance of the class. - /// - public DatabaseNamespaceParser() - { + typeof(DbProviderConfigurer)); + TypeRegistry.RegisterType( + DatabaseTypePrefix + DbProviderFactoryObjectConstants.DbProviderFactoryObjectElement, + typeof (DbProviderFactoryObject)); + } + + /// + /// Initializes a new instance of the class. + /// + public DatabaseNamespaceParser() + { } /// @@ -111,10 +107,10 @@ namespace Spring.Data.Config { switch (element.LocalName) { - case DbProviderConfigurerConstants.DbProviderConfigurerElement: + case DbProviderConfigurerConstants.DbProviderConfigurerElement: return ParseDbProviderConfigurer(element, name, parserContext); case DbProviderFactoryObjectConstants.DbProviderFactoryObjectElement: - return ParseDbProviderFactoryObject(element, name, parserContext); + return ParseDbProviderFactoryObject(element, name, parserContext); } return null; @@ -151,7 +147,7 @@ namespace Spring.Data.Config if (StringUtils.HasText(connectionString)) { propertyValues.Add("ConnectionString", connectionString); - } + } IConfigurableObjectDefinition cod = parserContext.ReaderContext.ObjectDefinitionFactory.CreateObjectDefinition( typeName, null, parserContext.ReaderContext.Reader.Domain); cod.PropertyValues = propertyValues; @@ -167,27 +163,27 @@ namespace Spring.Data.Config { case DbProviderFactoryObjectConstants.DbProviderFactoryObjectElement: { - ParseDatabaseConfigurer(element, parserContext, builder); + ParseDatabaseConfigurer(element, parserContext, builder); return; } } - } - */ - - /* - private void ParseDatabaseConfigurer(XmlElement element, ParserContext parserContext, ObjectDefinitionBuilder builder) + } + */ + + /* + private void ParseDatabaseConfigurer(XmlElement element, ParserContext parserContext, ObjectDefinitionBuilder builder) { string providerNameAttribute = GetAttributeValue(element, DbProviderFactoryObjectConstants.ProviderNameAttribute); - string connectionString = GetAttributeValue(element, DbProviderFactoryObjectConstants.ConnectionStringAttribute); - - if (StringUtils.HasText(providerNameAttribute)) + string connectionString = GetAttributeValue(element, DbProviderFactoryObjectConstants.ConnectionStringAttribute); + + if (StringUtils.HasText(providerNameAttribute)) { - builder.AddPropertyValue("Provider", providerNameAttribute); - } - if (StringUtils.HasText(connectionString)) + builder.AddPropertyValue("Provider", providerNameAttribute); + } + if (StringUtils.HasText(connectionString)) { - builder.AddPropertyValue("ConnectionString", connectionString); - } + builder.AddPropertyValue("ConnectionString", connectionString); + } } */ @@ -215,20 +211,20 @@ namespace Spring.Data.Config return DatabaseTypePrefix + element.LocalName; } return typeName; - }*/ - - private class DbProviderFactoryObjectConstants - { - public const string DbProviderFactoryObjectElement = "provider"; - public const string ProviderNameAttribute = "provider"; + }*/ + + private class DbProviderFactoryObjectConstants + { + public const string DbProviderFactoryObjectElement = "provider"; + public const string ProviderNameAttribute = "provider"; public const string ConnectionStringAttribute = "connectionString"; - - } - + + } + private class DbProviderConfigurerConstants { public const string DbProviderConfigurerElement = "additionalProviders"; public const string ResourceAttribute = "resource"; - } - } -} + } + } +} diff --git a/src/Spring/Spring.Data/Data/Core/AdoAccessor.cs b/src/Spring/Spring.Data/Data/Core/AdoAccessor.cs index d1b23a5b..43dc4efc 100644 --- a/src/Spring/Spring.Data/Data/Core/AdoAccessor.cs +++ b/src/Spring/Spring.Data/Data/Core/AdoAccessor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Data; using Spring.Data.Common; using Spring.Data.Support; diff --git a/src/Spring/Spring.Data/Data/Core/AdoDaoSupport.cs b/src/Spring/Spring.Data/Data/Core/AdoDaoSupport.cs index fd1b9182..c5025911 100644 --- a/src/Spring/Spring.Data/Data/Core/AdoDaoSupport.cs +++ b/src/Spring/Spring.Data/Data/Core/AdoDaoSupport.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Data; using Spring.Dao.Support; using Spring.Data.Common; @@ -106,7 +105,7 @@ namespace Spring.Data.Core { ConnectionUtils.DisposeConnection(conn, dbProvider); } - + /// /// Create a AdoTemplate for a given DbProvider @@ -114,9 +113,9 @@ namespace Spring.Data.Core /// /// /// Can be overriden in subclasses to provide AdoTemplate instances - /// with a different configuration, or a cusotm AdoTemplate subclass. + /// with a different configuration, or a cusotm AdoTemplate subclass. /// - /// The DbProvider to create a AdoTemplate for + /// The DbProvider to create a AdoTemplate for protected virtual AdoTemplate CreateAdoTemplate(IDbProvider dbProvider) { return new AdoTemplate(dbProvider); @@ -137,6 +136,6 @@ namespace Spring.Data.Core { return AdoTemplate.CreateDbParameters(); } - + } } diff --git a/src/Spring/Spring.Data/Data/Core/AdoPlatformTransactionManager.cs b/src/Spring/Spring.Data/Data/Core/AdoPlatformTransactionManager.cs index fd35285e..36d02fc6 100644 --- a/src/Spring/Spring.Data/Data/Core/AdoPlatformTransactionManager.cs +++ b/src/Spring/Spring.Data/Data/Core/AdoPlatformTransactionManager.cs @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Data; using Common.Logging; using Spring.Data.Common; @@ -29,7 +26,6 @@ using Spring.Objects.Factory; using Spring.Transaction; using Spring.Transaction.Support; -#endregion namespace Spring.Data.Core { /// @@ -46,7 +42,7 @@ namespace Spring.Data.Core private static readonly ILog LOG = LogManager.GetLogger(typeof (AdoPlatformTransactionManager)); - #endregion + #endregion public AdoPlatformTransactionManager() { @@ -84,7 +80,7 @@ namespace Spring.Data.Core DbProviderTransactionObject txMgrStateObject = new DbProviderTransactionObject(); txMgrStateObject.SavepointAllowed = NestedTransactionsAllowed; - ConnectionHolder conHolder = + ConnectionHolder conHolder = (ConnectionHolder) TransactionSynchronizationManager.GetResource(DbProvider); txMgrStateObject.SetConnectionHolder(conHolder, false); return txMgrStateObject; @@ -135,12 +131,12 @@ namespace Spring.Data.Core DbProviderTransactionObject txMgrStateObject = (DbProviderTransactionObject)transaction; IDbConnection con = null; - + if (dbProvider == null) { throw new ArgumentException("DbProvider is required to be set on AdoPlatformTransactionManager"); } - + try { if (txMgrStateObject.ConnectionHolder == null || txMgrStateObject.ConnectionHolder.SynchronizedWithTransaction) @@ -150,14 +146,14 @@ namespace Spring.Data.Core { log.Debug("Acquired Connection [" + newCon + ", " + newCon.ConnectionString + "] for ADO.NET transaction"); } - newCon.Open(); + newCon.Open(); //TODO isolation level mgmt - will need to abstract out SQL used to specify this in DbMetaData //MSDN docs... //With one exception, you can switch from one isolation level to another at any time during a transaction. The exception occurs when changing from any isolation level to SNAPSHOT isolation - - - //IsolationLevel previousIsolationLevel = + + + //IsolationLevel previousIsolationLevel = IDbTransaction newTrans = newCon.BeginTransaction(definition.TransactionIsolationLevel); @@ -175,12 +171,12 @@ namespace Spring.Data.Core { txMgrStateObject.ConnectionHolder.TimeoutInSeconds = timeout; } - + //Bind transactional resources to thread if (txMgrStateObject.NewConnectionHolder) { - TransactionSynchronizationManager.BindResource(DbProvider, + TransactionSynchronizationManager.BindResource(DbProvider, txMgrStateObject.ConnectionHolder); } @@ -191,7 +187,7 @@ namespace Spring.Data.Core ConnectionUtils.DisposeConnection(con, DbProvider); throw new CannotCreateTransactionException("Could not create ADO.NET connection for transaction", e); } - + } @@ -241,9 +237,9 @@ namespace Spring.Data.Core protected override void DoResume(object transaction, object suspendedResources) { ConnectionHolder conHolder = (ConnectionHolder)suspendedResources; - TransactionSynchronizationManager.BindResource(DbProvider, conHolder); + TransactionSynchronizationManager.BindResource(DbProvider, conHolder); } - + /// /// Perform an actual commit on the given transaction. @@ -385,7 +381,7 @@ namespace Spring.Data.Core { get { - return (ConnectionHolder != null && ConnectionHolder.TransactionActive); + return (ConnectionHolder != null && ConnectionHolder.TransactionActive); } } @@ -393,7 +389,7 @@ namespace Spring.Data.Core /// Sets the rollback only. /// public void SetRollbackOnly() - { + { ConnectionHolder.RollbackOnly = true; } @@ -425,19 +421,19 @@ namespace Spring.Data.Core { throw new ArgumentException("DbProvider is required"); } - } - - /// - /// Gets the resource factory that this transaction manager operates on, - /// For the AdoPlatformTransactionManager this is the DbProvider - /// - /// The DbProvider. + } + + /// + /// Gets the resource factory that this transaction manager operates on, + /// For the AdoPlatformTransactionManager this is the DbProvider + /// + /// The DbProvider. public object ResourceFactory - { - get - { - return dbProvider; - } + { + get + { + return dbProvider; + } } } } diff --git a/src/Spring/Spring.Data/Data/Core/AdoTemplate.cs b/src/Spring/Spring.Data/Data/Core/AdoTemplate.cs index a82d04e4..80154394 100644 --- a/src/Spring/Spring.Data/Data/Core/AdoTemplate.cs +++ b/src/Spring/Spring.Data/Data/Core/AdoTemplate.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Data; using System.Data.Common; @@ -33,8 +30,6 @@ using Spring.Data.Support; using Spring.Reflection.Dynamic; using Spring.Util; -#endregion - namespace Spring.Data.Core { /// @@ -112,12 +107,12 @@ namespace Spring.Data.Core } /// - /// Gets or sets a value indicating whether to lazily initialize the - /// IAdoExceptionTranslator for this accessor, on first encounter of a + /// Gets or sets a value indicating whether to lazily initialize the + /// IAdoExceptionTranslator for this accessor, on first encounter of a /// exception from the data provider. Default is "true"; can be switched to /// "false" for initialization on startup. /// - /// true if to lazy initialize the IAdoExceptionTranslator; + /// true if to lazy initialize the IAdoExceptionTranslator; /// otherwise, false. public override bool LazyInit { @@ -144,8 +139,8 @@ namespace Spring.Data.Core } /// - /// Gets or set the System.Type to use to create an instance of IDataReaderWrapper - /// for the purpose of having defaults values to use in case of DBNull values read + /// Gets or set the System.Type to use to create an instance of IDataReaderWrapper + /// for the purpose of having defaults values to use in case of DBNull values read /// from IDataReader. /// /// The type of the data reader wrapper. @@ -168,7 +163,7 @@ namespace Spring.Data.Core throw new ArgumentException("DataReaderWrapper type must implement IDataReaderWrapper. Implemented interfaces on " + value.GetType().Name + "are [" + StringUtils.CollectionToCommaDelimitedString(ReflectionUtils.ToInterfaceArray(value)) + "]"); - + } } else @@ -3015,7 +3010,7 @@ namespace Spring.Data.Core else { returnValue = resultSetExtractorDelegate(reader); - } + } return returnValue; } finally @@ -3048,4 +3043,4 @@ namespace Spring.Data.Core } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Core/RowMapperResultSetExtractor.cs b/src/Spring/Spring.Data/Data/Core/RowMapperResultSetExtractor.cs index 360ef8b1..ef25b1f1 100644 --- a/src/Spring/Spring.Data/Data/Core/RowMapperResultSetExtractor.cs +++ b/src/Spring/Spring.Data/Data/Core/RowMapperResultSetExtractor.cs @@ -14,11 +14,6 @@ * limitations under the License. */ -using System; -using System.Collections; -using System.Collections.Generic; -using Spring.Collections; - namespace Spring.Data.Core { /// diff --git a/src/Spring/Spring.Data/Data/Core/ServiceDomainPlatformTransactionManager.cs b/src/Spring/Spring.Data/Data/Core/ServiceDomainPlatformTransactionManager.cs index 683c22be..6dc04d42 100644 --- a/src/Spring/Spring.Data/Data/Core/ServiceDomainPlatformTransactionManager.cs +++ b/src/Spring/Spring.Data/Data/Core/ServiceDomainPlatformTransactionManager.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,18 +18,12 @@ #endregion -#region Imports - -using System; using System.EnterpriseServices; -using System.Threading; using Spring.Data.Support; using Spring.Objects.Factory; using Spring.Transaction; using Spring.Transaction.Support; -#endregion - namespace Spring.Data.Core { /// @@ -91,7 +85,7 @@ namespace Spring.Data.Core } /// - /// Gets or sets a text string that corresponds to the context name under which tracker information is reported. + /// Gets or sets a text string that corresponds to the context name under which tracker information is reported. /// /// The name of the tracking component. public string TrackingComponentName @@ -162,7 +156,7 @@ namespace Spring.Data.Core protected override object DoSuspend(object transaction) { - // Passing the current transaction object, literally an 'object' as the 'suspended resource', + // Passing the current transaction object, literally an 'object' as the 'suspended resource', // even though it is not used just to avoid passing null // ServiceDomainPlatformTransactionManager is not binding any resources to the local thread, instead delegating to // System.EnterpriseServices to handle thread local resources. @@ -187,7 +181,7 @@ namespace Spring.Data.Core ApplyPropagationBehavior(serviceConfig, definition); ApplyIsolationLevel(serviceConfig, definition); - + // infinite==-1 would cause transactions to be aborted immediately! if(definition.TransactionTimeout != Timeout.Infinite) { @@ -200,12 +194,12 @@ namespace Spring.Data.Core { switch (definition.TransactionIsolationLevel) { - + case System.Data.IsolationLevel.Chaos: if (log.IsInfoEnabled) { log.Info("IsolationLevel Chaos does not have a direct counterpart in EnterpriseServices, using Any"); - } + } serviceConfig.IsolationLevel = TransactionIsolationLevel.Any; break; case System.Data.IsolationLevel.ReadCommitted: @@ -223,8 +217,8 @@ namespace Spring.Data.Core case System.Data.IsolationLevel.Snapshot: if (log.IsInfoEnabled) { - log.Info("IsolationLevel Snapshot does not have a direct counterpart in EnterpriseServices, using ReadCommitted. Introduced in SqlServer 2005. Consider using System.Transactions for transaction management instead."); - } + log.Info("IsolationLevel Snapshot does not have a direct counterpart in EnterpriseServices, using ReadCommitted. Introduced in SqlServer 2005. Consider using System.Transactions for transaction management instead."); + } serviceConfig.IsolationLevel = TransactionIsolationLevel.ReadCommitted; //err on the side of consistency break; case System.Data.IsolationLevel.Unspecified: @@ -284,7 +278,7 @@ namespace Spring.Data.Core else { txObject.ServiceDomainAdapter.SetAbort(); - } + } } TransactionStatus serviceDomainTxstatus = txObject.ServiceDomainAdapter.Leave(); if (log.IsDebugEnabled) @@ -299,7 +293,7 @@ namespace Spring.Data.Core } catch (PlatformNotSupportedException ex) { - throw new TransactionSystemException("Failure on Commit. Platform does not support EnterpriseServices 'Services without Components'", ex); + throw new TransactionSystemException("Failure on Commit. Platform does not support EnterpriseServices 'Services without Components'", ex); } catch (Exception e) { @@ -344,7 +338,7 @@ namespace Spring.Data.Core { throw new TransactionSystemException("Failure on System.Transactions.Transaction.Current.Rollback", ex); } - + } protected override bool ShouldCommitOnGlobalRollbackOnly diff --git a/src/Spring/Spring.Data/Data/Core/TxScopeTransactionManager.cs b/src/Spring/Spring.Data/Data/Core/TxScopeTransactionManager.cs index 3c8d3e41..9553cdab 100644 --- a/src/Spring/Spring.Data/Data/Core/TxScopeTransactionManager.cs +++ b/src/Spring/Spring.Data/Data/Core/TxScopeTransactionManager.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Transactions; using Spring.Data.Support; using Spring.Objects.Factory; @@ -169,7 +168,7 @@ namespace Spring.Data.Core TransactionScopeOption txScopeOption = CreateTransactionScopeOptions(definition); TransactionOptions txOptions = CreateTransactionOptions(definition); txObject.TxScopeAdapter.CreateTransactionScope( - txScopeOption, + txScopeOption, txOptions, definition.AsyncFlowOption); } @@ -237,7 +236,7 @@ namespace Spring.Data.Core /// /// The transaction resource object that encapsulates the state and functionality - /// contained in TransactionScope and Transaction.Current via the ITransactionScopeAdapter + /// contained in TransactionScope and Transaction.Current via the ITransactionScopeAdapter /// property. /// public class PromotableTxScopeTransactionObject : ISmartTransactionObject @@ -271,4 +270,4 @@ namespace Spring.Data.Core public bool RollbackOnly => txScopeAdapter.RollbackOnly; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/DuplicateKeyException.cs b/src/Spring/Spring.Data/Data/DuplicateKeyException.cs index 22906b4d..236d23a5 100644 --- a/src/Spring/Spring.Data/Data/DuplicateKeyException.cs +++ b/src/Spring/Spring.Data/Data/DuplicateKeyException.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; using Spring.Dao; -#endregion - namespace Spring.Data { /// @@ -61,7 +56,7 @@ namespace Spring.Data /// /// A message about the exception. public DuplicateKeyException(string message): base(message) - { + { } /// @@ -70,7 +65,7 @@ namespace Spring.Data /// A message about the exception. /// The inner exception. public DuplicateKeyException(string message, Exception inner): base(message, inner) - { + { } @@ -80,7 +75,7 @@ namespace Spring.Data /// name of the current task. /// The offending SQL statment /// The root cause. - public DuplicateKeyException(string task, String sql, Exception ex) : base(task + "; Duplicate key for SQL [" + sql + "]; " + ex.Message, ex) + public DuplicateKeyException(string task, String sql, Exception ex) : base(task + "; Duplicate key for SQL [" + sql + "]; " + ex.Message, ex) { this.sql = sql; } @@ -97,7 +92,7 @@ namespace Spring.Data /// The SQL that caused the exception. public string Sql { - get + get { return sql; } @@ -120,7 +115,7 @@ namespace Spring.Data public override void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue( "sql", sql ); - base.GetObjectData( info, context ); + base.GetObjectData( info, context ); } #endregion diff --git a/src/Spring/Spring.Data/Data/Generic/AdoDaoSupport.cs b/src/Spring/Spring.Data/Data/Generic/AdoDaoSupport.cs index 36ec31ab..0f564a5d 100644 --- a/src/Spring/Spring.Data/Data/Generic/AdoDaoSupport.cs +++ b/src/Spring/Spring.Data/Data/Generic/AdoDaoSupport.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Data; using Spring.Dao.Support; using Spring.Data.Common; using Spring.Data.Support; -#endregion - namespace Spring.Data.Generic { /// @@ -118,9 +113,9 @@ namespace Spring.Data.Generic /// /// /// Can be overriden in subclasses to provide AdoTemplate instances - /// with a different configuration, or a cusotm AdoTemplate subclass. + /// with a different configuration, or a cusotm AdoTemplate subclass. /// - /// The DbProvider to create a AdoTemplate for + /// The DbProvider to create a AdoTemplate for protected virtual AdoTemplate CreateAdoTemplate(IDbProvider dbProvider) { return new AdoTemplate(dbProvider); @@ -136,14 +131,14 @@ namespace Spring.Data.Generic { return new DbParametersBuilder(DbProvider); } - + protected virtual IDbParameters CreateDbParameters() { return AdoTemplate.CreateDbParameters(); } - - - - + + + + } } diff --git a/src/Spring/Spring.Data/Data/Generic/AdoTemplate.cs b/src/Spring/Spring.Data/Data/Generic/AdoTemplate.cs index 009804fb..a24a2ad1 100644 --- a/src/Spring/Spring.Data/Data/Generic/AdoTemplate.cs +++ b/src/Spring/Spring.Data/Data/Generic/AdoTemplate.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Data; using System.Data.Common; using Common.Logging; @@ -50,7 +48,7 @@ namespace Spring.Data.Generic #region Fields private Core.AdoTemplate classicAdoTemplate; - + #endregion #region Constructors @@ -110,12 +108,12 @@ namespace Spring.Data.Generic } /// - /// Gets or sets a value indicating whether to lazily initialize the - /// IAdoExceptionTranslator for this accessor, on first encounter of a + /// Gets or sets a value indicating whether to lazily initialize the + /// IAdoExceptionTranslator for this accessor, on first encounter of a /// exception from the data provider. Default is "true"; can be switched to /// "false" for initialization on startup. /// - /// true if to lazy initialize the IAdoExceptionTranslator; + /// true if to lazy initialize the IAdoExceptionTranslator; /// otherwise, false. public override bool LazyInit { @@ -136,8 +134,8 @@ namespace Spring.Data.Generic /// - /// Gets or set the System.Type to use to create an instance of IDataReaderWrapper - /// for the purpose of having defaults values to use in case of DBNull values read + /// Gets or set the System.Type to use to create an instance of IDataReaderWrapper + /// for the purpose of having defaults values to use in case of DBNull values read /// from IDataReader. /// /// The type of the data reader wrapper. @@ -273,7 +271,7 @@ namespace Spring.Data.Generic { throw new InvalidDataAccessApiUsageException( "Providers implementation of IDbCommand does not inherit from System.Data.Common.DbCommand. Use the alternative overloaded Execute method that specifies IDbCommandDelegate as a parameter."); - } + } } catch (Exception e) { @@ -504,7 +502,7 @@ namespace Spring.Data.Generic /// /// This allows for implementing abritrary data access operations /// on a single DataAdapter within Spring's managed ADO.NET environment. - /// + /// /// The type of object returned from the callback. /// The delegate called with a IDbDataAdapter object. /// A result object returned by the callback or null @@ -628,7 +626,7 @@ namespace Spring.Data.Generic /// /// Execute the query with the specified command text. /// - /// No parameters are used. As with + /// No parameters are used. As with /// IDbCommand.ExecuteScalar, it returns the first column of the first row in the result set /// returned by the query. Extra columns or row are ignored. /// The command type @@ -685,7 +683,7 @@ namespace Spring.Data.Generic } /// - /// Execute the query with a command created via IDbCommandCreator and + /// Execute the query with a command created via IDbCommandCreator and /// parameters /// /// Output parameters can be retrieved via the returned @@ -706,9 +704,9 @@ namespace Spring.Data.Generic #region Queries with RowCallback /// - /// Execute a query given IDbCommand's type and text by - /// passing the created IDbCommand to a ICommandSetter implementation - /// that knows how to bind values to the IDbCommand, reading a + /// Execute a query given IDbCommand's type and text by + /// passing the created IDbCommand to a ICommandSetter implementation + /// that knows how to bind values to the IDbCommand, reading a /// single result set on a per-row basis with a . /// /// The type of command @@ -723,7 +721,7 @@ namespace Spring.Data.Generic classicAdoTemplate.QueryWithRowCallback(cmdType, cmdText, rowCallback, commandSetter); } /// - /// Execute a query given IDbCommand's type and text, reading a + /// Execute a query given IDbCommand's type and text, reading a /// single result set on a per-row basis with a . /// /// The type of command @@ -738,7 +736,7 @@ namespace Spring.Data.Generic /// /// Execute a query given IDbCommand's type and text and provided parameter - /// information, reading a + /// information, reading a /// single result set on a per-row basis with a . /// /// The type of command @@ -1081,7 +1079,7 @@ namespace Spring.Data.Generic { return classicAdoTemplate.Execute(cc, new AdoResultProcessorsQueryCommandCallback(this, namedResultSetProcessors)) as IDictionary; } - + public IDictionary QueryWithCommandCreator(IDbCommandCreator cc, IList namedResultSetProcessors) { @@ -1483,7 +1481,7 @@ namespace Spring.Data.Generic //TODO On >= .NET 2.0 platforms make use of DbDataReader.HasRows property to // see if there is a result set. now currently assuming matching // NamedResultSetProcessor/ResultSet pairs. - + do { if (namedResultSetProcessors.Count == 0) @@ -1607,7 +1605,7 @@ namespace Spring.Data.Generic ", is not of expected type NamedResultSetProcessor Type = " + namedResultSetProcessors[resultSetIndex].GetType() + "; Skipping processing for this result set."); - continue; + continue; } } else if (resultSetIndex == 1) { diff --git a/src/Spring/Spring.Data/Data/Generic/IAdoOperations.cs b/src/Spring/Spring.Data/Data/Generic/IAdoOperations.cs index cfb4c570..7a137d7b 100644 --- a/src/Spring/Spring.Data/Data/Generic/IAdoOperations.cs +++ b/src/Spring/Spring.Data/Data/Generic/IAdoOperations.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Data; using Spring.Data.Common; @@ -55,7 +53,7 @@ namespace Spring.Data.Generic /// /// Execute a ADO.NET operation on a command object using a generic delegate callback. /// - /// The type of object returned from the callback. + /// The type of object returned from the callback. /// This allows for implementing arbitrary data access operations /// on a single command within Spring's managed ADO.NET environment. /// The delegate called with a DbCommand object. @@ -65,7 +63,7 @@ namespace Spring.Data.Generic /// /// Execute a ADO.NET operation on a command object using a generic delegate callback. /// - /// The type of object returned from the callback. + /// The type of object returned from the callback. /// This allows for implementing arbitrary data access operations /// on a single command within Spring's managed ADO.NET environment. /// The delegate called with a IDbCommand object. @@ -87,7 +85,7 @@ namespace Spring.Data.Generic /// /// This allows for implementing abritrary data access operations /// on a single DataAdapter within Spring's managed ADO.NET environment. - /// + /// /// The type of object returned from the callback. /// The data adapter callback. /// A result object returned by the callback or null @@ -98,7 +96,7 @@ namespace Spring.Data.Generic /// /// This allows for implementing abritrary data access operations /// on a single DataAdapter within Spring's managed ADO.NET environment. - /// + /// /// The type of object returned from the callback. /// The delegate called with a IDbDataAdapter object. /// A result object returned by the callback or null @@ -252,8 +250,8 @@ namespace Spring.Data.Generic IDbProvider DbProvider { get; set; } /// - /// Gets or set the System.Type to use to create an instance of IDataReaderWrapper - /// for the purpose of having defaults values to use in case of DBNull values read + /// Gets or set the System.Type to use to create an instance of IDataReaderWrapper + /// for the purpose of having defaults values to use in case of DBNull values read /// from IDataReader. /// /// The type of the data reader wrapper. @@ -263,13 +261,13 @@ namespace Spring.Data.Generic /// Gets or sets the command timeout for IDbCommands that this AdoTemplate executes. /// /// Default is 0, indicating to use the database provider's default. - /// Any timeout specified here will be overridden by the remaining + /// Any timeout specified here will be overridden by the remaining /// transaction timeout when executing within a transaction that has a - /// timeout specified at the transaction level. + /// timeout specified at the transaction level. /// /// The command timeout. int CommandTimeout { get; set; } - + #endregion diff --git a/src/Spring/Spring.Data/Data/Generic/RowMapperResultSetExtractor.cs b/src/Spring/Spring.Data/Data/Generic/RowMapperResultSetExtractor.cs index 8113acec..b5008fc4 100644 --- a/src/Spring/Spring.Data/Data/Generic/RowMapperResultSetExtractor.cs +++ b/src/Spring/Spring.Data/Data/Generic/RowMapperResultSetExtractor.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,18 +18,13 @@ #endregion -#region Imports - -using System.Collections.Generic; using System.Data; using Spring.Util; -#endregion - namespace Spring.Data.Generic { /// - /// Adapter implementation of the ResultSetExtractor interface that delegates + /// Adapter implementation of the ResultSetExtractor interface that delegates /// to a RowMapper which is supposed to create an object for each row. /// Each object is added to the results List of this ResultSetExtractor. /// @@ -41,23 +36,23 @@ namespace Spring.Data.Generic /// just the RowMapperResultSetExtractor adapter is stateful. ///

///

- /// As an alternative consider subclassing MappingAdoQuery from the - /// Spring.Data.Objects namespace: Instead of working with separate + /// As an alternative consider subclassing MappingAdoQuery from the + /// Spring.Data.Objects namespace: Instead of working with separate /// AdoTemplate and IRowMapper objects you can have executable /// query objects (containing row-mapping logic) there. ///

/// /// Mark Pollack (.NET) - public class RowMapperResultSetExtractor : IResultSetExtractor> + public class RowMapperResultSetExtractor : IResultSetExtractor> { #region Fields - + private IRowMapper rowMapper; private RowMapperDelegate rowMapperDelegate; - + private int rowsExpected; - + #endregion #region Constructor (s) @@ -97,7 +92,7 @@ namespace Spring.Data.Generic public RowMapperResultSetExtractor(RowMapperDelegate rowMapperDelegate, int rowsExpected, IDataReaderWrapper dataReaderWrapper) { //TODO use datareaderwrapper - + AssertUtils.ArgumentNotNull(rowMapperDelegate, "rowMapperDelegate"); this.rowMapperDelegate = rowMapperDelegate; @@ -108,7 +103,7 @@ namespace Spring.Data.Generic #region IResultSetExtractor Members - public IList ExtractData(IDataReader reader) + public IList ExtractData(IDataReader reader) { // Use the more efficient collection if we know how many rows to expect: // ArrayList in case of a known row count, LinkedList if unknown @@ -117,8 +112,8 @@ namespace Spring.Data.Generic //how come LinkedList doesn't implement IList ?!?!?! //some web entries claim slow indexer... need to write our own again? return ICollection instead? //http://blogs.msdn.com/kcwalina/archive/2005/09/23/Collections.aspx - //We did not implement IList on LinkedList because the indexer would be - //very slow. If you really need the interface, you probably can inherit from + //We did not implement IList on LinkedList because the indexer would be + //very slow. If you really need the interface, you probably can inherit from //LinkedList and implement the interface on the subtype. IList results = new List(); int rowNum = 0; @@ -127,7 +122,7 @@ namespace Spring.Data.Generic while (reader.Read()) { results.Add(rowMapper.MapRow(reader, rowNum++)); - } + } } else { diff --git a/src/Spring/Spring.Data/Data/IAdoOperations.cs b/src/Spring/Spring.Data/Data/IAdoOperations.cs index 8eb7c0ef..82700e5c 100644 --- a/src/Spring/Spring.Data/Data/IAdoOperations.cs +++ b/src/Spring/Spring.Data/Data/IAdoOperations.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Data; using Spring.Data.Common; -#endregion - namespace Spring.Data { /// @@ -34,7 +29,7 @@ namespace Spring.Data /// /// Mark Pollack (.NET) public interface IAdoOperations : ICommonAdoOperations - { + { #region General Execute Methods with Callbacks /// @@ -52,7 +47,7 @@ namespace Spring.Data /// the callback to execute /// object returned from callback object Execute(ICommandCallback action); - + /// /// Executes ADO.NET operations on a command object, created by the provided IDbCommandCreator, /// using the interface based callback IDbCommandCallback. @@ -71,19 +66,15 @@ namespace Spring.Data /// The data adapter callback. /// A result object returned by the callback or null object Execute(IDataAdapterCallback dataAdapterCallback); - - #endregion - - + #endregion - #region Queries With ResultSetExtractor // Static Queries /// - /// Execute a query given IDbCommand's type and text, processing a + /// Execute a query given IDbCommand's type and text, processing a /// single result set with an instance of IResultSetExtractor /// /// The type of command @@ -96,13 +87,13 @@ namespace Spring.Data object QueryWithResultSetExtractor(CommandType cmdType, string cmdText, IResultSetExtractor resultSetExtractor); - // Parameterized Queries + // Parameterized Queries // Only input parameters can be used... /// /// Execute a query given the CommandType and text with parameters set - /// via the command setter, processing a + /// via the command setter, processing a /// single result set with an instance of IResultSetExtractor /// /// The command type. @@ -113,12 +104,12 @@ namespace Spring.Data /// /// If there is any problem executing the query. /// - object QueryWithResultSetExtractor(CommandType cmdType, string cmdText, IResultSetExtractor resultSetExtractor, + object QueryWithResultSetExtractor(CommandType cmdType, string cmdText, IResultSetExtractor resultSetExtractor, ICommandSetter commandSetter); /// /// Execute a query given the CommandType and text specifying a single parameter and process a single result set with an - /// instance of IResultSetExtractor. + /// instance of IResultSetExtractor. /// /// Convention is to use 0 For the size if it does not make sense for the given data type /// @@ -138,7 +129,7 @@ namespace Spring.Data /// /// Execute a query given the CommandType and text specifying a collection of parameters and process a single result set with an - /// instance of IResultSetExtractor. + /// instance of IResultSetExtractor. /// /// The command type. /// The command text to execute. @@ -151,7 +142,7 @@ namespace Spring.Data object QueryWithResultSetExtractor(CommandType cmdType, string cmdText, IResultSetExtractor resultSetExtractor, IDbParameters parameters); - + #endregion #region Queries With ResultSetExtractorDelegate @@ -159,7 +150,7 @@ namespace Spring.Data // Static Queries /// - /// Execute a query given static SQL/Stored Procedure name + /// Execute a query given static SQL/Stored Procedure name /// and process a single result set with an instance of ResultSetExtractorDelegate /// /// The type of command. @@ -168,7 +159,7 @@ namespace Spring.Data /// An arbitrary result object, as returned by the IResultSetExtractor /// /// If there is any problem executing the query. - /// + /// object QueryWithResultSetExtractorDelegate(CommandType cmdType, string cmdText, ResultSetExtractorDelegate resultSetExtractorDelegate); @@ -177,7 +168,7 @@ namespace Spring.Data /// /// Execute a query given the CommandType and text with parameters set - /// via the command setter, processing a + /// via the command setter, processing a /// single result set with an instance of IResultSetExtractor /// /// The command type. @@ -188,13 +179,13 @@ namespace Spring.Data /// /// If there is any problem executing the query. /// - object QueryWithResultSetExtractorDelegate(CommandType cmdType, string cmdText, ResultSetExtractorDelegate resultSetExtractorDelegate, + object QueryWithResultSetExtractorDelegate(CommandType cmdType, string cmdText, ResultSetExtractorDelegate resultSetExtractorDelegate, ICommandSetter commandSetter); /// /// Execute a query given the CommandType and text specifying a single parameter and process a single result set with an - /// instance of IResultSetExtractor. + /// instance of IResultSetExtractor. /// /// Convention is to use 0 For the size if it does not make sense for the given data type /// @@ -214,7 +205,7 @@ namespace Spring.Data /// /// Execute a query given the CommandType and text specifying a collection of parameters and process a single result set with an - /// instance of IResultSetExtractor. + /// instance of IResultSetExtractor. /// /// The command type. /// The command text to execute. @@ -224,12 +215,12 @@ namespace Spring.Data /// /// If there is any problem executing the query. /// - object QueryWithResultSetExtractorDelegate(CommandType cmdType, string cmdText, ResultSetExtractorDelegate resultSetExtractorDelegate, + object QueryWithResultSetExtractorDelegate(CommandType cmdType, string cmdText, ResultSetExtractorDelegate resultSetExtractorDelegate, IDbParameters parameters); #endregion - + #region Queries with RowMapperDelegate /// @@ -251,7 +242,7 @@ namespace Spring.Data #endregion - + #region Queries with RowMapper // Static Queries @@ -278,17 +269,17 @@ namespace Spring.Data IList QueryWithRowMapper(CommandType cmdType, string cmdText, IRowMapper rowMapper, IDbParameters parameter); - + #endregion - #region Query for Object + #region Query for Object + + - - /// - /// Execute a query with the specified command text, mapping a single result + /// Execute a query with the specified command text, mapping a single result /// row to an object via a RowMapper. /// /// The command type. @@ -306,7 +297,7 @@ namespace Spring.Data /// /// Execute a query with the specified command text and parameters set via the - /// command setter, mapping a single result row to an object via a RowMapper. + /// command setter, mapping a single result row to an object via a RowMapper. /// /// The command type. /// The command text to execute. @@ -357,15 +348,15 @@ namespace Spring.Data /// If there is any problem executing the query. /// object QueryForObject(CommandType cmdType, string cmdText, IRowMapper rowMapper, - string parameterName, Enum dbType, int size, object parameterValue); + string parameterName, Enum dbType, int size, object parameterValue); + - #endregion #region Query for ObjectDelegate /// - /// Execute a query with the specified command text, mapping a single result + /// Execute a query with the specified command text, mapping a single result /// row to an object via a RowMapper. /// /// The command type. @@ -384,7 +375,7 @@ namespace Spring.Data /// /// Execute a query with the specified command text and parameters set via the - /// command setter, mapping a single result row to an object via a RowMapper. + /// command setter, mapping a single result row to an object via a RowMapper. /// /// The command type. /// The command text to execute. @@ -431,9 +422,9 @@ namespace Spring.Data /// The parameter value. /// object QueryForObjectDelegate(CommandType cmdType, string cmdText, RowMapperDelegate rowMapperDelegate, - string parameterName, Enum dbType, int size, object parameterValue); + string parameterName, Enum dbType, int size, object parameterValue); + - #endregion #region Query With CommandCreator @@ -448,53 +439,53 @@ namespace Spring.Data // Using IRowMapper to return one result set, multiple output parameters. IList QueryWithCommandCreator(IDbCommandCreator commandCreator, IRowMapper rowMapper, IDictionary returnedParameters); - - - // Multiple return result sets, (A list of lists) + + + // Multiple return result sets, (A list of lists) // each with either a IRowMapper, IResultSetExtractor, IRowCallback // and multiple output parameters. IDictionary QueryWithCommandCreator(IDbCommandCreator commandCreator, IList resultProcessors); - + #endregion - + #region DataTable Create operations without parameters - + DataTable DataTableCreate(CommandType commandType, string sql); - + + DataTable DataTableCreate(CommandType commandType, string sql, + string tableMappingName); + DataTable DataTableCreate(CommandType commandType, string sql, - string tableMappingName); - - DataTable DataTableCreate(CommandType commandType, string sql, ITableMapping tableMapping); - - DataTable DataTableCreate(CommandType commandType, string sql, + + DataTable DataTableCreate(CommandType commandType, string sql, ITableMapping tableMapping, - IDataAdapterSetter setter); - + IDataAdapterSetter setter); + #endregion - + #region DataTable Create operations with parameters - + DataTable DataTableCreateWithParams(CommandType commandType, string sql, IDbParameters parameters); - + DataTable DataTableCreateWithParams(CommandType commandType, string sql, IDbParameters parameters, - string tableMappingName); + string tableMappingName); DataTable DataTableCreateWithParams(CommandType commandType, string sql, IDbParameters parameters, ITableMapping tableMapping); - - DataTable DataTableCreateWithParams(CommandType commandType, string sql, + + DataTable DataTableCreateWithParams(CommandType commandType, string sql, IDbParameters parameters, ITableMapping tableMapping, - IDataAdapterSetter dataAdapterSetter); - - - + IDataAdapterSetter dataAdapterSetter); + + + #endregion - + #region DataTable Fill operations without parameters /// /// Fill a based on a select command that requires no parameters. @@ -504,134 +495,134 @@ namespace Spring.Data /// SQL query to execute /// The number of rows successfully added to or refreshed in the int DataTableFill(DataTable dataTable, CommandType commandType, string sql); - + + int DataTableFill(DataTable dataTable, CommandType commandType, string sql, + string tableMappingName); + int DataTableFill(DataTable dataTable, CommandType commandType, string sql, - string tableMappingName); - - int DataTableFill(DataTable dataTable, CommandType commandType, string sql, ITableMapping tableMapping); - - int DataTableFill(DataTable dataTable, CommandType commandType, string sql, + + int DataTableFill(DataTable dataTable, CommandType commandType, string sql, ITableMapping tableMapping, IDataAdapterSetter setter); - - + + #endregion - + #region DataTable Fill operations with parameters - + int DataTableFillWithParams(DataTable dataTable, CommandType commandType, string sql, IDbParameters parameters); - + int DataTableFillWithParams(DataTable dataTable, CommandType commandType, string sql, IDbParameters parameters, - string tableName); + string tableName); int DataTableFillWithParams(DataTable dataTable, CommandType commandType, string sql, IDbParameters parameters, ITableMapping tableMapping); - - int DataTableFillWithParams(DataTable dataTable, CommandType commandType, string sql, + + int DataTableFillWithParams(DataTable dataTable, CommandType commandType, string sql, IDbParameters parameters, ITableMapping tableMapping, - IDataAdapterSetter dataAdapterSetter); + IDataAdapterSetter dataAdapterSetter); #endregion - + #region DataTable Update operations - + int DataTableUpdateWithCommandBuilder(DataTable dataTable, CommandType commandType, string selectSql, IDbParameters parameters, string tableName); - + int DataTableUpdateWithCommandBuilder(DataTable dataTable, CommandType commandType, string selectSql, - IDbParameters parameters, + IDbParameters parameters, string tableName, IDataAdapterSetter dataAdapterSetter); int DataTableUpdateWithCommandBuilder(DataTable dataTable, CommandType commandType, string selectSql, - IDbParameters parameters, + IDbParameters parameters, ITableMapping tableMapping, - IDataAdapterSetter dataAdapterSetter); - - int DataTableUpdate(DataTable dataTable, + IDataAdapterSetter dataAdapterSetter); + + int DataTableUpdate(DataTable dataTable, string tableName, CommandType insertCommandtype, string insertSql, IDbParameters insertParameters, CommandType updateCommandtype, string updateSql, IDbParameters updateParameters, - CommandType deleteCommandtype, string deleteSql, IDbParameters deleteParameters); - - int DataTableUpdate(DataTable dataTable, + CommandType deleteCommandtype, string deleteSql, IDbParameters deleteParameters); + + int DataTableUpdate(DataTable dataTable, string tableName, CommandType insertCommandtype, string insertSql, IDbParameters insertParameters, CommandType updateCommandtype, string updateSql, IDbParameters updateParameters, CommandType deleteCommandtype, string deleteSql, IDbParameters deleteParameters, - IDataAdapterSetter dataAdapterSetter); - - int DataTableUpdate(DataTable dataTable, + IDataAdapterSetter dataAdapterSetter); + + int DataTableUpdate(DataTable dataTable, ITableMapping tableMapping, CommandType insertCommandtype, string insertSql, IDbParameters insertParameters, CommandType updateCommandtype, string updateSql, IDbParameters updateParameters, CommandType deleteCommandtype, string deleteSql, IDbParameters deleteParameters, - IDataAdapterSetter dataAdapterSetter); - - - - #endregion - + IDataAdapterSetter dataAdapterSetter); + + + + #endregion + #region DataSet Create operations without parameters - + DataSet DataSetCreate(CommandType commandType, string sql); - + DataSet DataSetCreate(CommandType commandType, string sql, string[] tableNames); - - DataSet DataSetCreate(CommandType commandType, string sql, + + DataSet DataSetCreate(CommandType commandType, string sql, ITableMappingCollection tableMapping); - - DataSet DataSetCreate(CommandType commandType, string sql, + + DataSet DataSetCreate(CommandType commandType, string sql, ITableMappingCollection tableMapping, IDataAdapterSetter setter); - - DataSet DataSetCreate(CommandType commandType, string sql, + + DataSet DataSetCreate(CommandType commandType, string sql, ITableMappingCollection tableMapping, IDataAdapterSetter setter, - IDataSetFillLifecycleProcessor fillLifecycleProcessor); + IDataSetFillLifecycleProcessor fillLifecycleProcessor); #endregion - + #region DataSet Create operations with parameters - + DataSet DataSetCreateWithParams(CommandType commandType, string sql, IDbParameters parameters); - + DataSet DataSetCreateWithParams(CommandType commandType, string sql, IDbParameters parameters, - string[] tableNames); + string[] tableNames); DataSet DataSetCreateWithParams(CommandType commandType, string sql, IDbParameters parameters, ITableMappingCollection tableMapping); - - DataSet DataSetCreateWithParams(CommandType commandType, string sql, + + DataSet DataSetCreateWithParams(CommandType commandType, string sql, IDbParameters parameters, ITableMappingCollection tableMapping, - IDataAdapterSetter dataAdapterSetter); - - DataSet DataSetCreateWithParams(CommandType commandType, string sql, + IDataAdapterSetter dataAdapterSetter); + + DataSet DataSetCreateWithParams(CommandType commandType, string sql, IDbParameters parameters, ITableMappingCollection tableMapping, IDataAdapterSetter dataAdapterSetter, - IDataSetFillLifecycleProcessor fillLifecycleProcessor); - + IDataSetFillLifecycleProcessor fillLifecycleProcessor); + #endregion - + #region DataSet Fill operations without parameters - + /// /// Fill a based on a select command that requires no parameters. /// @@ -640,10 +631,10 @@ namespace Spring.Data /// SQL query to execute /// The number of rows successfully added to or refreshed in the int DataSetFill(DataSet dataSet, CommandType commandType, string sql); - + /// /// Fill a based on a select command that requires no parameters - /// that returns one or more result sets that are added as + /// that returns one or more result sets that are added as /// s to the /// /// The to populate @@ -654,47 +645,47 @@ namespace Spring.Data /// int DataSetFill(DataSet dataSet, CommandType commandType, string sql, string[] tableNames); - - int DataSetFill(DataSet dataSet, CommandType commandType, string sql, + + int DataSetFill(DataSet dataSet, CommandType commandType, string sql, ITableMappingCollection tableMapping); - - int DataSetFill(DataSet dataSet, CommandType commandType, string sql, + + int DataSetFill(DataSet dataSet, CommandType commandType, string sql, ITableMappingCollection tableMapping, IDataAdapterSetter setter); - - int DataSetFill(DataSet dataSet, CommandType commandType, string sql, + + int DataSetFill(DataSet dataSet, CommandType commandType, string sql, ITableMappingCollection tableMapping, IDataAdapterSetter setter, - IDataSetFillLifecycleProcessor fillLifecycleProcessor); - + IDataSetFillLifecycleProcessor fillLifecycleProcessor); + #endregion - + #region DataSet Fill operations with parameters - + int DataSetFillWithParameters(DataSet dataSet, CommandType commandType, string sql, IDbParameters parameters); - + int DataSetFillWithParameters(DataSet dataSet, CommandType commandType, string sql, IDbParameters parameters, - string[] tableNames); + string[] tableNames); int DataSetFillWithParameters(DataSet dataSet, CommandType commandType, string sql, IDbParameters parameters, ITableMappingCollection tableMapping); - - int DataSetFillWithParameters(DataSet dataSet, CommandType commandType, string sql, + + int DataSetFillWithParameters(DataSet dataSet, CommandType commandType, string sql, IDbParameters parameters, ITableMappingCollection tableMapping, - IDataAdapterSetter dataAdapterSetter); - - int DataSetFillWithParameters(DataSet dataSet, CommandType commandType, string sql, + IDataAdapterSetter dataAdapterSetter); + + int DataSetFillWithParameters(DataSet dataSet, CommandType commandType, string sql, IDbParameters parameters, ITableMappingCollection tableMapping, IDataAdapterSetter dataAdapterSetter, - IDataSetFillLifecycleProcessor fillLifecycleProcessor); - - #endregion - + IDataSetFillLifecycleProcessor fillLifecycleProcessor); + + #endregion + #region DataSet Update operations int DataSetUpdateWithCommandBuilder(DataSet dataSet, @@ -702,62 +693,62 @@ namespace Spring.Data string selectSql, IDbParameters selectParameters, string tableName); - + int DataSetUpdateWithCommandBuilder(DataSet dataSet, CommandType commandType, string selectSql, - IDbParameters selectParameters, + IDbParameters selectParameters, string tableName, IDataAdapterSetter dataAdapterSetter); int DataSetUpdateWithCommandBuilder(DataSet dataSet, CommandType commandType, string selectSql, - IDbParameters selectParameters, + IDbParameters selectParameters, ITableMappingCollection tableMapping, - IDataAdapterSetter dataAdapterSetter); - - - int DataSetUpdate(DataSet dataSet, + IDataAdapterSetter dataAdapterSetter); + + + int DataSetUpdate(DataSet dataSet, string tableName, IDbCommand insertCommand, IDbCommand updateCommand, IDbCommand deleteCommand); - - - int DataSetUpdate(DataSet dataSet, + + + int DataSetUpdate(DataSet dataSet, string tableName, CommandType insertCommandtype, string insertSql, IDbParameters insertParameters, CommandType updateCommandtype, string updateSql, IDbParameters updateParameters, - CommandType deleteCommandtype, string deleteSql, IDbParameters deleteParameters); - - - int DataSetUpdate(DataSet dataSet, + CommandType deleteCommandtype, string deleteSql, IDbParameters deleteParameters); + + + int DataSetUpdate(DataSet dataSet, string tableName, IDbCommand insertCommand, IDbCommand updateCommand, IDbCommand deleteCommand, IDataAdapterSetter dataAdapterSetter); - int DataSetUpdate(DataSet dataSet, + int DataSetUpdate(DataSet dataSet, ITableMappingCollection tableMapping, IDbCommand insertCommand, IDbCommand updateCommand, - IDbCommand deleteCommand); - - int DataSetUpdate(DataSet dataSet, + IDbCommand deleteCommand); + + int DataSetUpdate(DataSet dataSet, ITableMappingCollection tableMapping, IDbCommand insertCommand, IDbCommand updateCommand, IDbCommand deleteCommand, - IDataAdapterSetter dataAdapterSetter); - + IDataAdapterSetter dataAdapterSetter); + #endregion - + #region Parameter Creation Helper Methods - + IDbParameters CreateDbParameters(); - + /// /// Note that output parameters are marked input/output after derivation.... /// (TODO - double check....) @@ -765,7 +756,7 @@ namespace Spring.Data /// /// IDataParameter[] DeriveParameters(string procedureName); - + IDataParameter[] DeriveParameters(string procedureName, bool includeReturnParameter); #endregion @@ -778,8 +769,8 @@ namespace Spring.Data IDbProvider DbProvider { get; set; } /// - /// Gets or set the System.Type to use to create an instance of IDataReaderWrapper - /// for the purpose of having defaults values to use in case of DBNull values read + /// Gets or set the System.Type to use to create an instance of IDataReaderWrapper + /// for the purpose of having defaults values to use in case of DBNull values read /// from IDataReader. /// /// The type of the data reader wrapper. @@ -789,9 +780,9 @@ namespace Spring.Data /// Gets or sets the command timeout for IDbCommands that this AdoTemplate executes. /// /// Default is 0, indicating to use the database provider's default. - /// Any timeout specified here will be overridden by the remaining + /// Any timeout specified here will be overridden by the remaining /// transaction timeout when executing within a transaction that has a - /// timeout specified at the transaction level. + /// timeout specified at the transaction level. /// /// The command timeout. int CommandTimeout { get; set; } diff --git a/src/Spring/Spring.Data/Data/ICommandSetter.cs b/src/Spring/Spring.Data/Data/ICommandSetter.cs index d0868ca3..c8a16c76 100644 --- a/src/Spring/Spring.Data/Data/ICommandSetter.cs +++ b/src/Spring/Spring.Data/Data/ICommandSetter.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,25 +18,21 @@ #endregion -#region Imports - using System.Data; -#endregion - namespace Spring.Data { - + /// /// Called by the AdoTemplate class to allow implementations /// to set any necessary parameters on the command object. /// The CommandType and CommandText will have already been supplied. /// /// Mark Pollack (.NET) - public interface ICommandSetter + public interface ICommandSetter { - - + + void SetValues(IDbCommand dbCommand); } } diff --git a/src/Spring/Spring.Data/Data/ICommonAdoOperations.cs b/src/Spring/Spring.Data/Data/ICommonAdoOperations.cs index 7afe0ecd..ef67c0c2 100644 --- a/src/Spring/Spring.Data/Data/ICommonAdoOperations.cs +++ b/src/Spring/Spring.Data/Data/ICommonAdoOperations.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Data; using Spring.Data.Common; -#endregion - namespace Spring.Data { public interface ICommonAdoOperations @@ -36,7 +31,7 @@ namespace Spring.Data /// /// Execute the query with the specified command text returning a scalar result /// - /// No parameters are used. As with + /// No parameters are used. As with /// IDbCommand.ExecuteScalar, it returns the first column of the first row in the resultset /// returned by the query. Extra columns or row are ignored. /// The command type @@ -81,7 +76,7 @@ namespace Spring.Data ICommandSetter commandSetter); /// - /// Execute the query with a command created via IDbCommandCreator and + /// Execute the query with a command created via IDbCommandCreator and /// parameters /// /// Output parameters can be retrieved via the returned @@ -95,8 +90,8 @@ namespace Spring.Data /// A dictionary containing output parameters, if any IDictionary ExecuteScalar(IDbCommandCreator commandCreator); - #endregion - + #endregion + #region ExecuteNonQuery /// @@ -140,8 +135,8 @@ namespace Spring.Data /// The number of rows affected. int ExecuteNonQuery(CommandType cmdType, string cmdText, ICommandSetter commandSetter); - - + + /// /// Executes a non query with a command created via IDbCommandCreator and /// parameters. @@ -159,11 +154,11 @@ namespace Spring.Data #endregion - + #region Query with RowCallback /// - /// Execute a query given IDbCommand's type and text, reading a + /// Execute a query given IDbCommand's type and text, reading a /// single result set on a per-row basis with a . /// /// The type of command. @@ -172,11 +167,11 @@ namespace Spring.Data /// one row at a time. /// void QueryWithRowCallback(CommandType cmdType, string cmdText, IRowCallback rowCallback); - + /// /// Execute a query given IDbCommand's type and text and provided parameter - /// information, reading a + /// information, reading a /// single result set on a per-row basis with a . /// /// The type of command @@ -204,9 +199,9 @@ namespace Spring.Data IDbParameters parameters); /// - /// Execute a query given IDbCommand's type and text by - /// passing the created IDbCommand to a ICommandSetter implementation - /// that knows how to bind values to the IDbCommand, reading a + /// Execute a query given IDbCommand's type and text by + /// passing the created IDbCommand to a ICommandSetter implementation + /// that knows how to bind values to the IDbCommand, reading a /// single result set on a per-row basis with a . /// /// The type of command @@ -242,7 +237,7 @@ namespace Spring.Data void QueryWithCommandCreator(IDbCommandCreator cc, IRowCallback rowCallback, IDictionary returnedParameters); - #endregion + #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/IDataAdapterCallback.cs b/src/Spring/Spring.Data/Data/IDataAdapterCallback.cs index bc9b3eb2..93d24f27 100644 --- a/src/Spring/Spring.Data/Data/IDataAdapterCallback.cs +++ b/src/Spring/Spring.Data/Data/IDataAdapterCallback.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,17 +18,13 @@ #endregion -#region Imports - using System.Data; -#endregion - namespace Spring.Data { /// - /// Generic callback interface for code that operates on a - /// IDbDataAdapter. + /// Generic callback interface for code that operates on a + /// IDbDataAdapter. /// /// ///

Allows you to execute any number of operations @@ -44,9 +40,9 @@ namespace Spring.Data ///

/// Execute(IDataAdapterCallback dataAdapterCallback) /// method. - ///
+ /// /// Mark Pollack (.NET) - public interface IDataAdapterCallback + public interface IDataAdapterCallback { /// /// Called by AdoTemplate.Execute with an preconfigured diff --git a/src/Spring/Spring.Data/Data/IDataAdapterSetter.cs b/src/Spring/Spring.Data/Data/IDataAdapterSetter.cs index 9de4fccf..4a03d3da 100644 --- a/src/Spring/Spring.Data/Data/IDataAdapterSetter.cs +++ b/src/Spring/Spring.Data/Data/IDataAdapterSetter.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,12 +18,8 @@ #endregion -#region Imports - using System.Data; -#endregion - namespace Spring.Data { /// @@ -31,9 +27,9 @@ namespace Spring.Data /// to set any necessary properties on the DbDataAdapter object. /// /// - ///

For example, this callback can be used to set the - /// AcceptChangesDuringFill property, register an event handler - /// for the FillErrors event, set update batch sizes if your provider + ///

For example, this callback can be used to set the + /// AcceptChangesDuringFill property, register an event handler + /// for the FillErrors event, set update batch sizes if your provider /// supports such functionality, set the ContinueUpdateOnError property, /// or in .NET 2.0 to set the property AcceptChangesDuringUpdate. ///

@@ -41,15 +37,15 @@ namespace Spring.Data /// Downcast to the appropriate subtype to access vendor specific /// functionality.

///

- /// The DataAdapter SelectCommand will be already be + /// The DataAdapter SelectCommand will be already be /// populated with values for CommandType and Text properties /// along with Connection/Transaction properties based on the /// calling transaction context. ///

///
/// Mark Pollack (.NET) - public interface IDataAdapterSetter - { + public interface IDataAdapterSetter + { void SetValues(IDbDataAdapter dataAdapter); } } diff --git a/src/Spring/Spring.Data/Data/IDataReaderWrapper.cs b/src/Spring/Spring.Data/Data/IDataReaderWrapper.cs index 62137d8f..4a0a5554 100644 --- a/src/Spring/Spring.Data/Data/IDataReaderWrapper.cs +++ b/src/Spring/Spring.Data/Data/IDataReaderWrapper.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,12 +18,8 @@ #endregion -#region Imports - using System.Data; -#endregion - namespace Spring.Data { /// @@ -32,14 +28,14 @@ namespace Spring.Data /// the framework. /// /// Implementations will typically add behavior to standard IDataReader methods, - /// for example, by providing default values for DbNull values. + /// for example, by providing default values for DbNull values. /// See as an example. /// /// Mark Pollack (.NET) public interface IDataReaderWrapper : IDataReader { /// - /// The underlying reader implementation to delegate to for accessing data + /// The underlying reader implementation to delegate to for accessing data /// from a returned result sets. /// /// The wrapped reader. @@ -48,6 +44,6 @@ namespace Spring.Data get; set; } - + } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/IDataSetFillLifecycleProcessor.cs b/src/Spring/Spring.Data/Data/IDataSetFillLifecycleProcessor.cs index 7a6351a1..eb503d91 100644 --- a/src/Spring/Spring.Data/Data/IDataSetFillLifecycleProcessor.cs +++ b/src/Spring/Spring.Data/Data/IDataSetFillLifecycleProcessor.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,12 +18,8 @@ #endregion -#region Imports - using System.Data; -#endregion - namespace Spring.Data { /// @@ -33,7 +29,7 @@ namespace Spring.Data /// ///

/// The methods let you set various properties and invoke - /// methods on the DataSet before and after it gets filled by a DataAdapter. + /// methods on the DataSet before and after it gets filled by a DataAdapter. /// For example, EnforceConstraints, BeginLoadData, and EndLoadData /// can be called to optimize the loading of large DataSets with /// many related tables. @@ -43,18 +39,18 @@ namespace Spring.Data ///

///
/// Mark Pollack (.NET) - public interface IDataSetFillLifecycleProcessor + public interface IDataSetFillLifecycleProcessor { /// - /// Called before a DataAdapter is used to fill a DataSet + /// Called before a DataAdapter is used to fill a DataSet /// the the provided tablename. /// /// The DataSet to be filled with a DataTable /// The table collection to be filled void BeforeFill(DataSet ds, ITableMappingCollection tableMappingCollection); - + /// - /// Called after a DataAdapter is used to fill a DataSet + /// Called after a DataAdapter is used to fill a DataSet /// the the provided tablename. /// /// The DataSet to be filled with a DataTable diff --git a/src/Spring/Spring.Data/Data/IDbCommandCreator.cs b/src/Spring/Spring.Data/Data/IDbCommandCreator.cs index 643148f3..54db8a2c 100644 --- a/src/Spring/Spring.Data/Data/IDbCommandCreator.cs +++ b/src/Spring/Spring.Data/Data/IDbCommandCreator.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,28 +18,24 @@ #endregion -#region Imports - using System.Data; using Spring.Data.Common; -#endregion - namespace Spring.Data { /// /// One of the central callback interfaces used by the AdoTemplate class /// This interface creates a IDbCommand. Implementations are responsible /// for configuring the created command with command type, command text and - /// any necessary parameters. + /// any necessary parameters. /// /// Mark Pollack (.NET) - public interface IDbCommandCreator + public interface IDbCommandCreator { /// /// Creates a IDbCommand. /// - /// The IDbProvider reference that can be used to create the command in a + /// The IDbProvider reference that can be used to create the command in a /// provider independent manner. The provider supplied is the same as used in configuration of AdoTemplate. /// IDbCommand CreateDbCommand(IDbProvider dbProvider); diff --git a/src/Spring/Spring.Data/Data/IDbCommandCreatorFactory.cs b/src/Spring/Spring.Data/Data/IDbCommandCreatorFactory.cs index f612d676..00ef3f8e 100644 --- a/src/Spring/Spring.Data/Data/IDbCommandCreatorFactory.cs +++ b/src/Spring/Spring.Data/Data/IDbCommandCreatorFactory.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,16 +18,11 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Data; using Spring.Dao; using Spring.Data.Common; -#endregion - namespace Spring.Data { /// @@ -36,18 +31,18 @@ namespace Spring.Data /// set of parameter declarations. /// /// Mark Pollack (.NET) - public class IDbCommandCreatorFactory + public class IDbCommandCreatorFactory { #region Fields private String sql; - + private IDbParameters declaredParameters; - + private IDbProvider dbProvider; - + private CommandType commandType; - + #endregion @@ -58,7 +53,7 @@ namespace Spring.Data public IDbCommandCreatorFactory(IDbProvider dbProvider, CommandType commandType, string sql, IDbParameters declaredParameters) { this.dbProvider = dbProvider; - this.sql = sql; + this.sql = sql; this.commandType = commandType; this.declaredParameters = declaredParameters; } @@ -66,7 +61,7 @@ namespace Spring.Data #endregion #region Properties - + public IDbParameters DeclaredParameters { get @@ -74,7 +69,7 @@ namespace Spring.Data return declaredParameters; } } - + public string Sql { get { return sql; } @@ -90,32 +85,32 @@ namespace Spring.Data get { return commandType; } } #endregion - + #region Methods public IDbCommandCreator NewDbCommandCreatorWithParamValues(params object[] inParamValues) { - + return new CommandCreatorWithParamValues(this, inParamValues != null ? ArrayList.Adapter(inParamValues) : new ArrayList()); } public IDbCommandCreator NewDbCommandCreator(IDictionary inParameters) { - + return new CommandCreatorImpl(this, inParameters != null ? inParameters : new Hashtable()); } - + #endregion private class CommandCreatorWithParamValues : IDbCommandCreator { private IDbCommandCreatorFactory factory; private IList inParamValues; - + public CommandCreatorWithParamValues(IDbCommandCreatorFactory factory, IList inParamValues) { - this.factory = factory; + this.factory = factory; this.inParamValues = inParamValues; } @@ -162,22 +157,22 @@ namespace Spring.Data } command.Parameters.Add(clonedParameter); - + } } return command; } - + } private class CommandCreatorImpl : IDbCommandCreator{ private IDbCommandCreatorFactory factory; private IDictionary inParams; - + public CommandCreatorImpl(IDbCommandCreatorFactory factory, IDictionary inParameters) { - this.factory = factory; + this.factory = factory; this.inParams = inParameters; } @@ -191,7 +186,7 @@ namespace Spring.Data foreach ( IDbDataParameter declaredParameter in factory.declaredParameters.DataParameterCollection) { IDbDataParameter clonedParameter = (IDbDataParameter)((ICloneable)declaredParameter).Clone(); - + if (IsInputParamter(clonedParameter) && !inParams.Contains(clonedParameter.ParameterName)) { throw new InvalidDataAccessApiUsageException("Required input parameter '" + @@ -205,14 +200,14 @@ namespace Spring.Data // to obtain parameter values. The whole parameter handling mechanism should be refactored // not to require parameter prefix to be specified when populating named parameters collection // within AdoOperations. Code below is just a temporary workaround until this issue is resolved. - + Object inValue = inParams[clonedParameter.ParameterName]; if (!(clonedParameter.Direction == ParameterDirection.Output) && !(clonedParameter.Direction == ParameterDirection.ReturnValue)) { clonedParameter.Value = (inValue == null) ? DBNull.Value : inValue; } - + command.Parameters.Add(clonedParameter); } } diff --git a/src/Spring/Spring.Data/Data/IDbDataAdapterCreator.cs b/src/Spring/Spring.Data/Data/IDbDataAdapterCreator.cs index 5b176fa5..89261aef 100644 --- a/src/Spring/Spring.Data/Data/IDbDataAdapterCreator.cs +++ b/src/Spring/Spring.Data/Data/IDbDataAdapterCreator.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,16 +18,12 @@ #endregion -#region Imports - using System.Data; -#endregion - namespace Spring.Data { /// - /// This interface creates a IDbDataAdapterCommand. + /// This interface creates a IDbDataAdapterCommand. /// Implementations are responsible /// for configuring the created command with appropriate /// select and actions commands along with their parameters. @@ -37,7 +33,7 @@ namespace Spring.Data /// the Spring.Data.Objects namespace. /// /// Mark Pollack (.NET) - public interface IDbDataAdapterCreator + public interface IDbDataAdapterCreator { /// /// Creates the data adapter. diff --git a/src/Spring/Spring.Data/Data/IRowMapper.cs b/src/Spring/Spring.Data/Data/IRowMapper.cs index 6bfcd4f9..6c3f62d1 100644 --- a/src/Spring/Spring.Data/Data/IRowMapper.cs +++ b/src/Spring/Spring.Data/Data/IRowMapper.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,12 +18,8 @@ #endregion -#region Imports - using System.Data; -#endregion - namespace Spring.Data { /// @@ -39,16 +35,16 @@ namespace Spring.Data /// place. ///

///

Alternatively, consider subclassing MappingSqlQuery from the Spring.Data.Object - /// namespace: Instead of working with separate AdoTemplate and RowMapper objects, + /// namespace: Instead of working with separate AdoTemplate and RowMapper objects, /// you can have executable query objects (containing row-mapping logic) there. ///

/// /// Mark Pollack (.NET) - public interface IRowMapper + public interface IRowMapper { /// /// Implementations must implement this method to map each row of data in the - /// result set (DataReader). This method should not call Next() on the + /// result set (DataReader). This method should not call Next() on the /// DataReader; it should only extract the values of the current row. /// /// The IDataReader to map (pre-initialized for the current row) diff --git a/src/Spring/Spring.Data/Data/InvalidResultSetAccessException.cs b/src/Spring/Spring.Data/Data/InvalidResultSetAccessException.cs index db779bcc..d964488f 100644 --- a/src/Spring/Spring.Data/Data/InvalidResultSetAccessException.cs +++ b/src/Spring/Spring.Data/Data/InvalidResultSetAccessException.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,14 +18,9 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; using Spring.Dao; -#endregion - namespace Spring.Data { /// @@ -57,7 +52,7 @@ namespace Spring.Data /// /// A message about the exception. public InvalidResultSetAccessException(string message): base(message) - { + { } /// @@ -66,7 +61,7 @@ namespace Spring.Data /// A message about the exception. /// The inner exception. public InvalidResultSetAccessException(string message, Exception inner): base(message, inner) - { + { } @@ -76,14 +71,14 @@ namespace Spring.Data /// name of the current task. /// The offending SQL statment /// The root cause. - public InvalidResultSetAccessException(string task, String sql, Exception ex) : base(task + "; invalid ResultSet access for SQL [" + sql + "]; " + ex.Message, ex) + public InvalidResultSetAccessException(string task, String sql, Exception ex) : base(task + "; invalid ResultSet access for SQL [" + sql + "]; " + ex.Message, ex) { this.sql = sql; } /// protected InvalidResultSetAccessException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} - + #endregion #region Properties @@ -94,7 +89,7 @@ namespace Spring.Data /// The SQL that caused the exception. public string Sql { - get + get { return sql; } @@ -117,7 +112,7 @@ namespace Spring.Data public override void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue( "sql", sql ); - base.GetObjectData( info, context ); + base.GetObjectData( info, context ); } #endregion diff --git a/src/Spring/Spring.Data/Data/Objects/AdoNonQuery.cs b/src/Spring/Spring.Data/Data/Objects/AdoNonQuery.cs index b3047a87..1e45aab4 100644 --- a/src/Spring/Spring.Data/Data/Objects/AdoNonQuery.cs +++ b/src/Spring/Spring.Data/Data/Objects/AdoNonQuery.cs @@ -1,14 +1,14 @@ #region Licence /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,18 +18,14 @@ #endregion -#region Imports - using System.Collections; using Spring.Data.Common; -#endregion - namespace Spring.Data.Objects { /// - /// Encapsulate Command.ExecuteNonQuery operations within a reusable class. + /// Encapsulate Command.ExecuteNonQuery operations within a reusable class. /// /// Mark Pollack (.NET) /// The default CommandType is CommandType.Text @@ -68,16 +64,16 @@ namespace Spring.Data.Objects public IDictionary ExecuteNonQuery(params object[] inParameterValues) { ValidateParameters(inParameterValues); - return AdoTemplate.ExecuteNonQuery(NewCommandCreatorWithParamValues(inParameterValues)); + return AdoTemplate.ExecuteNonQuery(NewCommandCreatorWithParamValues(inParameterValues)); } public IDictionary ExecuteNonQueryByNamedParam(IDictionary inParams) { - ValidateNamedParameters(inParams); + ValidateNamedParameters(inParams); return AdoTemplate.ExecuteNonQuery(NewCommandCreator(inParams)); - } - + } + #endregion } } diff --git a/src/Spring/Spring.Data/Data/Objects/AdoOperation.cs b/src/Spring/Spring.Data/Data/Objects/AdoOperation.cs index 09e7a289..1898b0d4 100644 --- a/src/Spring/Spring.Data/Data/Objects/AdoOperation.cs +++ b/src/Spring/Spring.Data/Data/Objects/AdoOperation.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,20 +18,14 @@ #endregion -#region Imports - -using System; - using Spring.Dao; using Spring.Data.Common; using Spring.Data.Core; -#endregion - namespace Spring.Data.Objects { /// - /// A "AdoOperation" is a thread-safe, reusable object representing + /// A "AdoOperation" is a thread-safe, reusable object representing /// an ADO Query, "NonQuery" (Create, Update, Delete), stored procedure /// or DataSet manipualtions. /// @@ -40,7 +34,7 @@ namespace Spring.Data.Objects /// Compile(). The order in which parameters are added is generally /// significant when using providers or functionality that do not use /// named parameters. - /// + /// /// /// Mark Pollack (.NET) public abstract class AdoOperation : AbstractAdoOperation @@ -57,7 +51,7 @@ namespace Spring.Data.Objects /// Initializes a new instance of the class. /// /// A DbProvider, SQL and any parameters must be supplied - /// before invoking the compile method and using this object. + /// before invoking the compile method and using this object. /// public AdoOperation() { @@ -67,7 +61,7 @@ namespace Spring.Data.Objects /// Initializes a new instance of the class. ///
/// A DbProvider, SQL and any parameters must be supplied - /// before invoking the compile method and using this object. + /// before invoking the compile method and using this object. /// /// Database provider to use. public AdoOperation(IDbProvider provider) @@ -79,7 +73,7 @@ namespace Spring.Data.Objects /// Initializes a new instance of the class. ///
/// A DbProvider, SQL and any parameters must be supplied - /// before invoking the compile method and using this object. + /// before invoking the compile method and using this object. /// /// Database provider to use. /// SQL query or stored procedure name. @@ -132,9 +126,9 @@ namespace Spring.Data.Objects /// Sets the command timeout for IDbCommands that this AdoTemplate executes. ///
/// Default is 0, indicating to use the database provider's default. - /// Any timeout specified here will be overridden by the remaining + /// Any timeout specified here will be overridden by the remaining /// transaction timeout when executing within a transaction that has a - /// timeout specified at the transaction level. + /// timeout specified at the transaction level. /// /// The command timeout. public override int CommandTimeout @@ -178,4 +172,4 @@ namespace Spring.Data.Objects #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Objects/AdoQuery.cs b/src/Spring/Spring.Data/Data/Objects/AdoQuery.cs index 14814c7f..6223a666 100644 --- a/src/Spring/Spring.Data/Data/Objects/AdoQuery.cs +++ b/src/Spring/Spring.Data/Data/Objects/AdoQuery.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,14 +18,10 @@ #endregion -#region Imports - using System.Collections; using Spring.Dao.Support; using Spring.Data.Common; -#endregion - namespace Spring.Data.Objects { /// @@ -47,7 +43,7 @@ namespace Spring.Data.Objects { } - + public AdoQuery(IDbProvider provider, string sql) { DbProvider = provider; @@ -61,22 +57,22 @@ namespace Spring.Data.Objects #endregion #region Methods - + public IList Query() { return QueryByNamedParam(null); } - + public IList QueryByNamedParam(IDictionary inParams) { return QueryByNamedParam(inParams, null); } - + public IList QueryByNamedParam(IDictionary inParams, IDictionary returnedParameters) { return QueryByNamedParam(inParams, returnedParameters, null); } - + public IList QueryByNamedParam(IDictionary inParams, IDictionary returnedParameters, IDictionary callingContext) { ValidateNamedParameters(inParams); @@ -104,7 +100,7 @@ namespace Spring.Data.Objects protected abstract IRowMapper NewRowMapper(IDictionary inParams, IDictionary callingContext); - + #endregion } diff --git a/src/Spring/Spring.Data/Data/Objects/AdoScalar.cs b/src/Spring/Spring.Data/Data/Objects/AdoScalar.cs index 312c8f69..15069ab2 100644 --- a/src/Spring/Spring.Data/Data/Objects/AdoScalar.cs +++ b/src/Spring/Spring.Data/Data/Objects/AdoScalar.cs @@ -1,14 +1,14 @@ #region Licence /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,18 +18,14 @@ #endregion -#region Imports - using System.Collections; using Spring.Data.Common; -#endregion - namespace Spring.Data.Objects { /// - /// Encapsulate Command ExecuteScalar operations within a reusable class. + /// Encapsulate Command ExecuteScalar operations within a reusable class. /// /// The default CommandType is CommandType.Text /// Mark Pollack (.NET) @@ -75,4 +71,4 @@ namespace Spring.Data.Objects #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Objects/Generic/AdoOperation.cs b/src/Spring/Spring.Data/Data/Objects/Generic/AdoOperation.cs index cac93c70..b11f16a5 100644 --- a/src/Spring/Spring.Data/Data/Objects/Generic/AdoOperation.cs +++ b/src/Spring/Spring.Data/Data/Objects/Generic/AdoOperation.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,19 +18,13 @@ #endregion -#region Imports - -using System; - using Spring.Dao; using Spring.Data.Common; -#endregion - namespace Spring.Data.Objects.Generic { /// - /// A "AdoOperation" is a thread-safe, reusable object representing + /// A "AdoOperation" is a thread-safe, reusable object representing /// an ADO Query, "NonQuery" (Create, Update, Delete), stored procedure /// or DataSet manipualtions. /// @@ -39,7 +33,7 @@ namespace Spring.Data.Objects.Generic /// Compile(). The order in which parameters are added is generally /// significant when using providers or functionality that do not use /// named parameters. - /// + /// /// /// Mark Pollack (.NET) public abstract class AdoOperation : AbstractAdoOperation @@ -56,7 +50,7 @@ namespace Spring.Data.Objects.Generic /// Initializes a new instance of the class. /// /// A DbProvider, SQL and any parameters must be supplied - /// before invoking the compile method and using this object. + /// before invoking the compile method and using this object. /// public AdoOperation() { @@ -66,7 +60,7 @@ namespace Spring.Data.Objects.Generic /// Initializes a new instance of the class. ///
/// A DbProvider, SQL and any parameters must be supplied - /// before invoking the compile method and using this object. + /// before invoking the compile method and using this object. /// /// Database provider to use. public AdoOperation(IDbProvider provider) @@ -78,7 +72,7 @@ namespace Spring.Data.Objects.Generic /// Initializes a new instance of the class. ///
/// A DbProvider, SQL and any parameters must be supplied - /// before invoking the compile method and using this object. + /// before invoking the compile method and using this object. /// /// Database provider to use. /// SQL query or stored procedure name. @@ -131,9 +125,9 @@ namespace Spring.Data.Objects.Generic /// Sets the command timeout for IDbCommands that this AdoTemplate executes. ///
/// Default is 0, indicating to use the database provider's default. - /// Any timeout specified here will be overridden by the remaining + /// Any timeout specified here will be overridden by the remaining /// transaction timeout when executing within a transaction that has a - /// timeout specified at the transaction level. + /// timeout specified at the transaction level. /// /// The command timeout. public override int CommandTimeout @@ -177,4 +171,4 @@ namespace Spring.Data.Objects.Generic #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Objects/Generic/AdoQuery.cs b/src/Spring/Spring.Data/Data/Objects/Generic/AdoQuery.cs index f5ae5208..32628423 100644 --- a/src/Spring/Spring.Data/Data/Objects/Generic/AdoQuery.cs +++ b/src/Spring/Spring.Data/Data/Objects/Generic/AdoQuery.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System.Collections.Generic; using Spring.Dao.Support.Generic; using Spring.Data.Common; using Spring.Data.Generic; -#endregion - namespace Spring.Data.Objects.Generic { /// @@ -97,7 +92,7 @@ namespace Spring.Data.Objects.Generic /// The parameters for the query. /// The returned output parameters. /// - public IList QueryByNamedParam(System.Collections.IDictionary inParams, + public IList QueryByNamedParam(System.Collections.IDictionary inParams, System.Collections.IDictionary outParams) { return QueryByNamedParam(inParams, outParams, null); @@ -111,8 +106,8 @@ namespace Spring.Data.Objects.Generic /// The out params. /// The calling context. /// - public IList QueryByNamedParam(System.Collections.IDictionary inParams, - System.Collections.IDictionary outParams, + public IList QueryByNamedParam(System.Collections.IDictionary inParams, + System.Collections.IDictionary outParams, System.Collections.IDictionary callingContext) { ValidateNamedParameters(inParams); @@ -138,9 +133,9 @@ namespace Spring.Data.Objects.Generic return DataAccessUtils.RequiredUniqueResultSet(results); } - + protected abstract IRowMapper NewRowMapper(System.Collections.IDictionary inParams, System.Collections.IDictionary callingContext); - + #endregion } diff --git a/src/Spring/Spring.Data/Data/Objects/Generic/MappingAdoQuery.cs b/src/Spring/Spring.Data/Data/Objects/Generic/MappingAdoQuery.cs index ab2c4685..550d9724 100644 --- a/src/Spring/Spring.Data/Data/Objects/Generic/MappingAdoQuery.cs +++ b/src/Spring/Spring.Data/Data/Objects/Generic/MappingAdoQuery.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,19 +18,15 @@ #endregion -#region Imports - using System.Collections; using System.Data; using Spring.Data.Common; -#endregion - namespace Spring.Data.Objects.Generic { /// /// Reusable query in which concrete subclasses must implement the - /// MapRow method to map each row of a single result set into an + /// MapRow method to map each row of a single result set into an /// object. /// /// diff --git a/src/Spring/Spring.Data/Data/Objects/Generic/MappingAdoQueryWithContext.cs b/src/Spring/Spring.Data/Data/Objects/Generic/MappingAdoQueryWithContext.cs index 043e8aae..f299da13 100644 --- a/src/Spring/Spring.Data/Data/Objects/Generic/MappingAdoQueryWithContext.cs +++ b/src/Spring/Spring.Data/Data/Objects/Generic/MappingAdoQueryWithContext.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,20 +18,16 @@ #endregion -#region Imports - using System.Collections; using System.Data; using Spring.Data.Common; using Spring.Data.Generic; -#endregion - namespace Spring.Data.Objects.Generic { /// /// Reusable query in which concrete subclasses must implement the - /// abstract MapRow method to map each row of a single result set into an + /// abstract MapRow method to map each row of a single result set into an /// object. /// /// The MapRow method is also passed the input parameters and @@ -53,7 +49,7 @@ namespace Spring.Data.Objects.Generic public MappingAdoQueryWithContext(IDbProvider dbProvider, string sql) : base(dbProvider, sql) { - + } #endregion @@ -62,24 +58,24 @@ namespace Spring.Data.Objects.Generic #endregion #region Methods - - protected override IRowMapper NewRowMapper(System.Collections.IDictionary inParams, - System.Collections.IDictionary callingContext) + + protected override IRowMapper NewRowMapper(System.Collections.IDictionary inParams, + System.Collections.IDictionary callingContext) { return new RowMapperImpl(this, inParams, callingContext); } - + protected abstract T MapRow(IDataReader reader, int rowNum, IDictionary inParams, IDictionary callingContext); - + #endregion - + private class RowMapperImpl : IRowMapper { private MappingAdoQueryWithContext outer; private IDictionary inParams; private IDictionary callingContext; - + public RowMapperImpl(MappingAdoQueryWithContext mappingAdoQueryWithContext, IDictionary inParams, IDictionary callingContext) { outer = mappingAdoQueryWithContext; diff --git a/src/Spring/Spring.Data/Data/Objects/Generic/StoredProcedure.cs b/src/Spring/Spring.Data/Data/Objects/Generic/StoredProcedure.cs index c194c7ca..41499294 100644 --- a/src/Spring/Spring.Data/Data/Objects/Generic/StoredProcedure.cs +++ b/src/Spring/Spring.Data/Data/Objects/Generic/StoredProcedure.cs @@ -1,12 +1,12 @@ /* * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,7 +15,6 @@ */ using System.Collections; -using System.Collections.Generic; using System.Data; using Spring.Dao; using Spring.Data.Common; @@ -25,13 +24,13 @@ using Spring.Data.Support; namespace Spring.Data.Objects.Generic { /// - /// A superclass for object based abstractions of RDBMS stored procedures. + /// A superclass for object based abstractions of RDBMS stored procedures. /// /// Mark Pollack (.NET) public abstract class StoredProcedure : AdoOperation { //A collection of NamedResultSetProcessor - + private List resultProcessors = new List(); private bool usingDerivedParameters = false; @@ -42,7 +41,7 @@ namespace Spring.Data.Objects.Generic { CommandType = CommandType.StoredProcedure; } - + public StoredProcedure(IDbProvider dbProvider, string procedureName) : base(dbProvider, procedureName) { CommandType = CommandType.StoredProcedure; @@ -52,8 +51,8 @@ namespace Spring.Data.Objects.Generic { DeriveParameters(false); } - - + + public void DeriveParameters(bool includeReturnParameter) { //TODO does this account for offsets? @@ -62,7 +61,7 @@ namespace Spring.Data.Objects.Generic { IDataParameter parameter = derivedParameters[i]; DeclaredParameters.AddParameter(parameter); - } + } usingDerivedParameters = true; } @@ -101,7 +100,7 @@ namespace Spring.Data.Objects.Generic } resultProcessors.Add(new NamedResultSetProcessor(name, resultSetExtractor)); } - + public void AddRowMapper(string name, IRowMapper rowMapper) { @@ -115,9 +114,9 @@ namespace Spring.Data.Objects.Generic protected virtual IDictionary ExecuteScalar(params object[] inParameterValues) { ValidateParameters(inParameterValues); - return AdoTemplate.ExecuteScalar(NewCommandCreatorWithParamValues(inParameterValues)); + return AdoTemplate.ExecuteScalar(NewCommandCreatorWithParamValues(inParameterValues)); } - + protected virtual IDictionary ExecuteNonQuery(params object[] inParameterValues) { ValidateParameters(inParameterValues); @@ -132,7 +131,7 @@ namespace Spring.Data.Objects.Generic { throw new InvalidDataAccessApiUsageException("No row mapper is specified."); } - + NamedResultSetProcessor resultSetProcessor = resultProcessors[0] as NamedResultSetProcessor; if (resultSetProcessor == null) { @@ -145,7 +144,7 @@ namespace Spring.Data.Objects.Generic } IDictionary outParams = Query(inParameterValues); return outParams[resultSetProcessor.Name] as IList; - + } protected virtual IDictionary Query(params object[] inParameterValues) @@ -170,20 +169,20 @@ namespace Spring.Data.Objects.Generic /// scalar under the key "scalar". protected virtual IDictionary ExecuteScalarByNamedParam(IDictionary inParams) { - ValidateNamedParameters(inParams); - return AdoTemplate.ExecuteScalar(NewCommandCreator(inParams)); + ValidateNamedParameters(inParams); + return AdoTemplate.ExecuteScalar(NewCommandCreator(inParams)); } - + protected virtual IDictionary ExecuteNonQueryByNamedParam(IDictionary inParams) { - ValidateNamedParameters(inParams); + ValidateNamedParameters(inParams); return AdoTemplate.ExecuteNonQuery(NewCommandCreator(inParams)); - } - - + } + + protected virtual IDictionary QueryByNamedParam(IDictionary inParams) { - ValidateNamedParameters(inParams); + ValidateNamedParameters(inParams); return AdoTemplate.QueryWithCommandCreator(NewCommandCreator(inParams), resultProcessors); } @@ -199,7 +198,7 @@ namespace Spring.Data.Objects.Generic { //Can only count Input, derived output parameters are incorrectly classified as input-output return (parameter.Direction == ParameterDirection.Input); - } + } else { return base.IsInputParameter(parameter); diff --git a/src/Spring/Spring.Data/Data/Objects/MappingAdoQuery.cs b/src/Spring/Spring.Data/Data/Objects/MappingAdoQuery.cs index 71b663c7..c736f55f 100644 --- a/src/Spring/Spring.Data/Data/Objects/MappingAdoQuery.cs +++ b/src/Spring/Spring.Data/Data/Objects/MappingAdoQuery.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,19 +18,15 @@ #endregion -#region Imports - using System.Collections; using System.Data; using Spring.Data.Common; -#endregion - namespace Spring.Data.Objects { /// /// Reusable query in which concrete subclasses must implement the - /// MapRow method to map each row of a single result set into an + /// MapRow method to map each row of a single result set into an /// object. /// /// @@ -49,10 +45,10 @@ namespace Spring.Data.Objects { } - + public MappingAdoQuery(IDbProvider dbProvider, string sql) : base(dbProvider, sql) { - + } #endregion @@ -66,7 +62,7 @@ namespace Spring.Data.Objects } protected abstract object MapRow(IDataReader reader, int num); - + #endregion diff --git a/src/Spring/Spring.Data/Data/Objects/MappingAdoQueryWithContext.cs b/src/Spring/Spring.Data/Data/Objects/MappingAdoQueryWithContext.cs index 1637c276..61f50264 100644 --- a/src/Spring/Spring.Data/Data/Objects/MappingAdoQueryWithContext.cs +++ b/src/Spring/Spring.Data/Data/Objects/MappingAdoQueryWithContext.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,20 +18,15 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Data; using Spring.Data.Common; -#endregion - namespace Spring.Data.Objects { /// /// Reusable query in which concrete subclasses must implement the - /// MapRow method to map each row of a single result set into an + /// MapRow method to map each row of a single result set into an /// object. /// /// The MapRow method is also passed the input parameters and @@ -53,7 +48,7 @@ namespace Spring.Data.Objects public MappingAdoQueryWithContext(IDbProvider dbProvider, string sql) : base(dbProvider, sql) { - + } #endregion @@ -62,23 +57,23 @@ namespace Spring.Data.Objects #endregion #region Methods - - protected override IRowMapper NewRowMapper(IDictionary inParams, IDictionary callingContext) + + protected override IRowMapper NewRowMapper(IDictionary inParams, IDictionary callingContext) { return new RowMapperImpl(this, inParams, callingContext); } - + protected abstract Object MapRow(IDataReader reader, int rowNum, IDictionary inParams, IDictionary callingContext); - + #endregion - + private class RowMapperImpl : IRowMapper { private MappingAdoQueryWithContext outer; private IDictionary inParams; private IDictionary callingContext; - + public RowMapperImpl(MappingAdoQueryWithContext mappingAdoQueryWithContext, IDictionary inParams, IDictionary callingContext) { outer = mappingAdoQueryWithContext; diff --git a/src/Spring/Spring.Data/Data/Objects/StoredProcedure.cs b/src/Spring/Spring.Data/Data/Objects/StoredProcedure.cs index 792cce7d..267249f8 100644 --- a/src/Spring/Spring.Data/Data/Objects/StoredProcedure.cs +++ b/src/Spring/Spring.Data/Data/Objects/StoredProcedure.cs @@ -1,12 +1,12 @@ /* * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -15,7 +15,6 @@ */ using System.Collections; -using System.Collections.Generic; using System.Data; using Spring.Dao; using Spring.Data.Common; @@ -24,7 +23,7 @@ using Spring.Data.Support; namespace Spring.Data.Objects { /// - /// A superclass for object based abstractions of RDBMS stored procedures. + /// A superclass for object based abstractions of RDBMS stored procedures. /// /// Mark Pollack (.NET) public abstract class StoredProcedure : AdoOperation @@ -55,8 +54,8 @@ namespace Spring.Data.Objects { DeriveParameters(false); } - - + + public void DeriveParameters(bool includeReturnParameter) { //TODO does this account for offsets? @@ -65,11 +64,11 @@ namespace Spring.Data.Objects { IDataParameter parameter = derivedParameters[i]; DeclaredParameters.AddParameter(parameter); - } + } usingDerivedParameters = true; } - - + + public void AddResultSetExtractor(string name, IResultSetExtractor resultSetExtractor) { if (Compiled) @@ -78,7 +77,7 @@ namespace Spring.Data.Objects } resultProcessors.Add(new NamedResultSetProcessor(name, resultSetExtractor)); } - + public void AddRowCallback(string name, IRowCallback rowCallback) { if (Compiled) @@ -87,7 +86,7 @@ namespace Spring.Data.Objects } resultProcessors.Add(new NamedResultSetProcessor(name,rowCallback)); } - + public void AddRowMapper(string name, IRowMapper rowMapper) { if (Compiled) @@ -96,26 +95,26 @@ namespace Spring.Data.Objects } resultProcessors.Add(new NamedResultSetProcessor(name,rowMapper)); } - - + + protected virtual IDictionary ExecuteScalar(params object[] inParameterValues) { ValidateParameters(inParameterValues); - return AdoTemplate.ExecuteScalar(NewCommandCreatorWithParamValues(inParameterValues)); + return AdoTemplate.ExecuteScalar(NewCommandCreatorWithParamValues(inParameterValues)); } - + protected virtual IDictionary ExecuteNonQuery(params object[] inParameterValues) { ValidateParameters(inParameterValues); - return AdoTemplate.ExecuteNonQuery(NewCommandCreatorWithParamValues(inParameterValues)); + return AdoTemplate.ExecuteNonQuery(NewCommandCreatorWithParamValues(inParameterValues)); } protected virtual IDictionary Query(params object[] inParameterValues) { ValidateParameters(inParameterValues); - return AdoTemplate.QueryWithCommandCreator(NewCommandCreatorWithParamValues(inParameterValues), resultProcessors); + return AdoTemplate.QueryWithCommandCreator(NewCommandCreatorWithParamValues(inParameterValues), resultProcessors); } - + /// /// Execute the stored procedure using 'ExecuteScalar' /// @@ -124,20 +123,20 @@ namespace Spring.Data.Objects /// scalar under the key "scalar". protected virtual IDictionary ExecuteScalarByNamedParam(IDictionary inParams) { - ValidateNamedParameters(inParams); - return AdoTemplate.ExecuteScalar(NewCommandCreator(inParams)); + ValidateNamedParameters(inParams); + return AdoTemplate.ExecuteScalar(NewCommandCreator(inParams)); } - + protected virtual IDictionary ExecuteNonQueryByNamedParam(IDictionary inParams) { - ValidateNamedParameters(inParams); + ValidateNamedParameters(inParams); return AdoTemplate.ExecuteNonQuery(NewCommandCreator(inParams)); - } - - + } + + protected virtual IDictionary QueryByNamedParam(IDictionary inParams) { - ValidateNamedParameters(inParams); + ValidateNamedParameters(inParams); return AdoTemplate.QueryWithCommandCreator(NewCommandCreator(inParams), resultProcessors); } @@ -147,7 +146,7 @@ namespace Spring.Data.Objects { //Can only count Input, derived output parameters are incorrectly classified as input-output return (parameter.Direction == ParameterDirection.Input); - } + } else { return base.IsInputParameter(parameter); diff --git a/src/Spring/Spring.Data/Data/Support/AdoTransactionObjectSupport.cs b/src/Spring/Spring.Data/Data/Support/AdoTransactionObjectSupport.cs index 5df2bace..999be598 100644 --- a/src/Spring/Spring.Data/Data/Support/AdoTransactionObjectSupport.cs +++ b/src/Spring/Spring.Data/Data/Support/AdoTransactionObjectSupport.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,15 +18,11 @@ #endregion -#region Imports - using System.Data; using Common.Logging; using Spring.Transaction; using Spring.Transaction.Support; -#endregion - namespace Spring.Data.Support { /// @@ -51,7 +47,7 @@ namespace Spring.Data.Support #region Constants /// - /// The shared log instance for this class (and derived classes). + /// The shared log instance for this class (and derived classes). /// protected static readonly ILog log = LogManager.GetLogger(typeof (AdoTransactionObjectSupport)); @@ -138,7 +134,7 @@ namespace Spring.Data.Support { throw new NestedTransactionNotSupportedException( "Cannot rollback to a savepoint in a nested transaction because savepoints have not been implemented in the metadata for the DbProvider."); - + } /// @@ -162,7 +158,7 @@ namespace Spring.Data.Support { throw new NestedTransactionNotSupportedException( "Cannot release a savepoint in a nested transaction because savepoints have not been implemented in the metadata for the DbProvider."); - + } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Data/Support/AdoUtils.cs b/src/Spring/Spring.Data/Data/Support/AdoUtils.cs index 920fce62..c8c98c23 100644 --- a/src/Spring/Spring.Data/Data/Support/AdoUtils.cs +++ b/src/Spring/Spring.Data/Data/Support/AdoUtils.cs @@ -1,4 +1,3 @@ -using System; using System.Data; using Common.Logging; @@ -71,7 +70,7 @@ namespace Spring.Data.Support } } } - + private static void DoDisposeCommand(IDbCommand command) { try diff --git a/src/Spring/Spring.Data/Data/Support/ConnectionUtils.cs b/src/Spring/Spring.Data/Data/Support/ConnectionUtils.cs index 55f54a8a..30ff7e61 100644 --- a/src/Spring/Spring.Data/Data/Support/ConnectionUtils.cs +++ b/src/Spring/Spring.Data/Data/Support/ConnectionUtils.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,7 +18,6 @@ #endregion -using System; using System.Data; using Common.Logging; using Spring.Data.Common; @@ -85,8 +84,8 @@ namespace Spring.Data.Support /// /// Get a ADO.NET Connection/Transaction Pair for the given IDbProvider. - /// Changes any exception into the Spring hierarchy of generic data access - /// exceptions, simplifying calling code and making any exception that is + /// Changes any exception into the Spring hierarchy of generic data access + /// exceptions, simplifying calling code and making any exception that is /// thrown more meaningful. /// /// diff --git a/src/Spring/Spring.Data/Data/Support/ErrorCodeExceptionTranslator.cs b/src/Spring/Spring.Data/Data/Support/ErrorCodeExceptionTranslator.cs index 8f8e3454..5e28afd6 100644 --- a/src/Spring/Spring.Data/Data/Support/ErrorCodeExceptionTranslator.cs +++ b/src/Spring/Spring.Data/Data/Support/ErrorCodeExceptionTranslator.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,15 +18,10 @@ #endregion -#region Imports - -using System; using Common.Logging; using Spring.Dao; using Spring.Data.Common; -#endregion - namespace Spring.Data.Support { /// @@ -34,7 +29,7 @@ namespace Spring.Data.Support /// error codes and translates into the DAO exception hierarchy. /// /// This class loads the obtains error codes from - /// the IDbProvider metadata property ErrorCodes + /// the IDbProvider metadata property ErrorCodes /// which defines error code mappings for various providers. /// /// Mark Pollack (.NET) @@ -45,15 +40,15 @@ namespace Spring.Data.Support private ErrorCodes errorCodes; private IAdoExceptionTranslator fallbackTranslator; - + private IDbProvider dbProvider; - + #endregion #region Constants /// - /// The shared log instance for this class (and derived classes). + /// The shared log instance for this class (and derived classes). /// protected static readonly ILog log = LogManager.GetLogger(typeof (ErrorCodeExceptionTranslator)); @@ -83,8 +78,8 @@ namespace Spring.Data.Support DbProvider = provider; errorCodes = ec; } - - + + #endregion @@ -100,10 +95,10 @@ namespace Spring.Data.Support { dbProvider = value; errorCodes = dbProvider.DbMetadata.ErrorCodes; - + } } - + /// /// Gets the error codes for the provider /// @@ -115,7 +110,7 @@ namespace Spring.Data.Support return errorCodes; } } - + #endregion /// @@ -134,7 +129,7 @@ namespace Spring.Data.Support fallbackTranslator = value; } } - + #region Methods @@ -164,7 +159,7 @@ namespace Spring.Data.Support sql = ""; } string errorCode = ExtractErrorCode(exception); - + DataAccessException dex = DoTranslate(task, sql, errorCode, exception); if (dex != null) { @@ -183,8 +178,8 @@ namespace Spring.Data.Support } // We couldn't identify it more precisely. return new UncategorizedAdoException(task, sql, errorCode, exception); - - + + } /// @@ -224,7 +219,7 @@ namespace Spring.Data.Support LogTranslation(task, sql, errorCode, exception, false); return new BadSqlGrammarException(task, sql, exception); } - else if (Array.IndexOf(errorCodes.InvalidResultSetAccessCodes, errorCode) >= 0) + else if (Array.IndexOf(errorCodes.InvalidResultSetAccessCodes, errorCode) >= 0) { LogTranslation(task, sql, errorCode, exception, false); return new InvalidResultSetAccessException(task, sql, exception); @@ -234,7 +229,7 @@ namespace Spring.Data.Support LogTranslation(task, sql, errorCode, exception, false); return new DuplicateKeyException(task, sql, exception); } - else if (Array.IndexOf(errorCodes.DataAccessResourceFailureCodes, errorCode) >= 0) + else if (Array.IndexOf(errorCodes.DataAccessResourceFailureCodes, errorCode) >= 0) { LogTranslation(task, sql, errorCode, exception, false); return new DataAccessResourceFailureException(BuildMessage(task, sql, exception), exception); @@ -244,27 +239,27 @@ namespace Spring.Data.Support LogTranslation(task, sql, errorCode, exception, false); return new TransientDataAccessResourceException(BuildMessage(task, sql, exception), exception); } - else if (Array.IndexOf(errorCodes.PermissionDeniedCodes, errorCode) >= 0) + else if (Array.IndexOf(errorCodes.PermissionDeniedCodes, errorCode) >= 0) { LogTranslation(task, sql, errorCode, exception, false); return new PermissionDeniedDataAccessException(BuildMessage(task, sql, exception), exception); } - else if (Array.IndexOf(errorCodes.DataIntegrityViolationCodes, errorCode) >= 0) + else if (Array.IndexOf(errorCodes.DataIntegrityViolationCodes, errorCode) >= 0) { LogTranslation(task, sql, errorCode, exception, false); return new DataIntegrityViolationException(BuildMessage(task, sql, exception), exception); } - else if (Array.IndexOf(errorCodes.CannotAcquireLockCodes, errorCode) >= 0) + else if (Array.IndexOf(errorCodes.CannotAcquireLockCodes, errorCode) >= 0) { LogTranslation(task, sql, errorCode, exception, false); return new CannotAcquireLockException(BuildMessage(task, sql, exception), exception); } - else if (Array.IndexOf(errorCodes.DeadlockLoserCodes, errorCode) >= 0) + else if (Array.IndexOf(errorCodes.DeadlockLoserCodes, errorCode) >= 0) { LogTranslation(task, sql, errorCode, exception, false); return new DeadlockLoserDataAccessException(BuildMessage(task, sql, exception), exception); } - else if (Array.IndexOf(errorCodes.CannotSerializeTransactionCodes, errorCode) >= 0) + else if (Array.IndexOf(errorCodes.CannotSerializeTransactionCodes, errorCode) >= 0) { LogTranslation(task, sql, errorCode, exception, false); return new CannotSerializeTransactionException(BuildMessage(task, sql, exception), exception); @@ -329,7 +324,7 @@ namespace Spring.Data.Support /// if set to true [b]. private void LogTranslation(string task, string sql, string errorCode, Exception exception, bool b) { - if (log.IsDebugEnabled) + if (log.IsDebugEnabled) { String intro = "Translating"; log.Debug(intro + " ADO exception with error code '" + errorCode diff --git a/src/Spring/Spring.Data/Data/Support/FallbackExceptionTranslator.cs b/src/Spring/Spring.Data/Data/Support/FallbackExceptionTranslator.cs index 797fcbf3..458bc844 100644 --- a/src/Spring/Spring.Data/Data/Support/FallbackExceptionTranslator.cs +++ b/src/Spring/Spring.Data/Data/Support/FallbackExceptionTranslator.cs @@ -1,14 +1,14 @@ #region Licence /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using Spring.Dao; -#endregion - namespace Spring.Data.Support { /// @@ -38,7 +33,7 @@ namespace Spring.Data.Support public class FallbackExceptionTranslator : IAdoExceptionTranslator { - + #region Constructor (s) /// /// Initializes a new instance of the class. diff --git a/src/Spring/Spring.Data/Data/Support/IAdoExceptionTranslator.cs b/src/Spring/Spring.Data/Data/Support/IAdoExceptionTranslator.cs index 317aaa89..a7aeadd3 100644 --- a/src/Spring/Spring.Data/Data/Support/IAdoExceptionTranslator.cs +++ b/src/Spring/Spring.Data/Data/Support/IAdoExceptionTranslator.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Dao; namespace Spring.Data.Support @@ -35,7 +34,7 @@ namespace Spring.Data.Support /// /// Rod Johnson /// Griffin Caprio (.NET) - /// Mark Pollack + /// Mark Pollack public interface IAdoExceptionTranslator { /// diff --git a/src/Spring/Spring.Data/Data/Support/NullMappingDataReader.cs b/src/Spring/Spring.Data/Data/Support/NullMappingDataReader.cs index f5289000..2f4f74d5 100644 --- a/src/Spring/Spring.Data/Data/Support/NullMappingDataReader.cs +++ b/src/Spring/Spring.Data/Data/Support/NullMappingDataReader.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Data; -#endregion - namespace Spring.Data.Support { /// @@ -36,9 +31,9 @@ namespace Spring.Data.Support { #region Fields - protected IDataReader dataReader; + protected IDataReader dataReader; private bool alreadyDisposed = false; - + #endregion #region Constructor (s) @@ -49,7 +44,7 @@ namespace Spring.Data.Support { } - + /// /// Initializes a new instance of the class. /// @@ -152,7 +147,7 @@ namespace Spring.Data.Support { Dispose(true); GC.SuppressFinalize(true); - } + } #endregion @@ -178,9 +173,9 @@ namespace Spring.Data.Support } } - + /// - /// Gets the with the specified name. + /// Gets the with the specified name. /// Returns null if value equals DBNull.Value /// /// @@ -193,7 +188,7 @@ namespace Spring.Data.Support } } - + /// /// Gets the with the specified i. /// Returns null if value equals DBNull.Value @@ -203,7 +198,7 @@ namespace Spring.Data.Support { get { - + return dataReader.IsDBNull(i) ? null : dataReader[i]; } } @@ -323,7 +318,7 @@ namespace Spring.Data.Support public virtual long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length) { - return dataReader.IsDBNull(i) ? 0 : dataReader.GetChars(i, fieldoffset, buffer, bufferoffset, length); + return dataReader.IsDBNull(i) ? 0 : dataReader.GetChars(i, fieldoffset, buffer, bufferoffset, length); } public virtual string GetString(int i) diff --git a/src/Spring/Spring.Data/Data/Support/ParameterUtils.cs b/src/Spring/Spring.Data/Data/Support/ParameterUtils.cs index e7eff406..303b5647 100644 --- a/src/Spring/Spring.Data/Data/Support/ParameterUtils.cs +++ b/src/Spring/Spring.Data/Data/Support/ParameterUtils.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,23 +18,18 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Data; using Common.Logging; using Spring.Data.Common; -#endregion - namespace Spring.Data.Support { /// - /// Miscellaneous utility methods for manipulating parameter objects. + /// Miscellaneous utility methods for manipulating parameter objects. /// /// Mark Pollack (.NET) - public class ParameterUtils + public class ParameterUtils { #region Fields @@ -43,7 +38,7 @@ namespace Spring.Data.Support #region Constants /// - /// The shared log instance for this class (and derived classes). + /// The shared log instance for this class (and derived classes). /// protected static readonly ILog log = LogManager.GetLogger(typeof (ParameterUtils)); @@ -78,7 +73,7 @@ namespace Spring.Data.Support if (springParamCollection != null) { IDataParameterCollection collection = springParamCollection.DataParameterCollection; - + foreach (IDbDataParameter parameter in collection) { IDbDataParameter pClone = (IDbDataParameter)((ICloneable)parameter).Clone(); @@ -86,7 +81,7 @@ namespace Spring.Data.Support } } } - + public static IDataParameter[] CloneParameters(IDbCommand command) { IDataParameter[] returnParameters = new IDataParameter[command.Parameters.Count]; @@ -104,7 +99,7 @@ namespace Spring.Data.Support /// /// The spring param collection. /// The command. - public static void CopyParameters(IDbParameters springParamCollection, + public static void CopyParameters(IDbParameters springParamCollection, IDbCommand command) { if (springParamCollection != null) @@ -119,7 +114,7 @@ namespace Spring.Data.Support } } } - + #endregion public static void ExtractOutputParameters(IDictionary returnedParameters, IDbCommand command) diff --git a/src/Spring/Spring.Data/Data/UncategorizedAdoException.cs b/src/Spring/Spring.Data/Data/UncategorizedAdoException.cs index 57b50af6..270cfa49 100644 --- a/src/Spring/Spring.Data/Data/UncategorizedAdoException.cs +++ b/src/Spring/Spring.Data/Data/UncategorizedAdoException.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,19 +18,14 @@ #endregion -#region Imports - -using System; using System.Runtime.Serialization; using Spring.Dao; -#endregion - namespace Spring.Data { /// - /// Exception thrown when we can't classify a SQLException into - /// one of our generic data access exceptions. + /// Exception thrown when we can't classify a SQLException into + /// one of our generic data access exceptions. /// /// Mark Pollack (.NET) [Serializable] @@ -63,7 +58,7 @@ namespace Spring.Data /// /// A message about the exception. public UncategorizedAdoException(string message): base(message) - { + { } /// @@ -72,7 +67,7 @@ namespace Spring.Data /// A message about the exception. /// The inner exception. public UncategorizedAdoException(string message, Exception inner): base(message, inner) - { + { } @@ -83,15 +78,15 @@ namespace Spring.Data /// the underlying error code that could not be translated /// The offending SQL statment /// The root cause. - public UncategorizedAdoException(string task, string sql, string errorCode, Exception ex) : base(task + "; uncategorized DataException for SQL [" + sql + "]; " + "ErrorCode [" + errorCode + "]; " + ex.Message, ex) - { + public UncategorizedAdoException(string task, string sql, string errorCode, Exception ex) : base(task + "; uncategorized DataException for SQL [" + sql + "]; " + "ErrorCode [" + errorCode + "]; " + ex.Message, ex) + { this.sql = sql; this.errorCode = errorCode; } /// protected UncategorizedAdoException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} - + #endregion #region Properties @@ -131,7 +126,7 @@ namespace Spring.Data { info.AddValue( "sql", sql ); info.AddValue( "errorCode", errorCode); - base.GetObjectData( info, context ); + base.GetObjectData( info, context ); } #endregion diff --git a/src/Spring/Spring.Data/Spring.Data.csproj b/src/Spring/Spring.Data/Spring.Data.csproj index af5c95a3..087f58f0 100644 --- a/src/Spring/Spring.Data/Spring.Data.csproj +++ b/src/Spring/Spring.Data/Spring.Data.csproj @@ -4,34 +4,37 @@ Interfaces and classes that provide Data access support in Spring.Net 1591 + + + - - spring-database-1.3.xsd - - - Spring.Data.Common.dbproviders.xml - - - Spring.Data.Common.dbproviders.xml - + + + + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.Data/Transaction/CannotCreateTransactionException.cs b/src/Spring/Spring.Data/Transaction/CannotCreateTransactionException.cs index e5ba29ec..eace762e 100644 --- a/src/Spring/Spring.Data/Transaction/CannotCreateTransactionException.cs +++ b/src/Spring/Spring.Data/Transaction/CannotCreateTransactionException.cs @@ -18,12 +18,11 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Transaction { - /// + /// /// Exception thrown when a transaction can't be created using an /// underlying transaction API such as COM+. /// @@ -64,4 +63,4 @@ namespace Spring.Transaction protected CannotCreateTransactionException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/Config/AttributeDrivenObjectDefinitionParser.cs b/src/Spring/Spring.Data/Transaction/Config/AttributeDrivenObjectDefinitionParser.cs index 921e5c9f..f4ae057c 100644 --- a/src/Spring/Spring.Data/Transaction/Config/AttributeDrivenObjectDefinitionParser.cs +++ b/src/Spring/Spring.Data/Transaction/Config/AttributeDrivenObjectDefinitionParser.cs @@ -1,24 +1,23 @@ #region License -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. +/* + * Copyright 2002-2010 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 -using System; using System.Xml; using Spring.Aop.Config; using Spring.Objects.Factory.Config; @@ -60,7 +59,7 @@ namespace Spring.Transaction.Config protected override AbstractObjectDefinition ParseInternal(XmlElement element, ParserContext parserContext) { ConfigureAutoProxyCreator(parserContext, element); - + //Create the TransactionAttributeSource RootObjectDefinition sourceDef = new RootObjectDefinition(typeof(AttributesTransactionAttributeSource)); sourceDef.Role = ObjectRole.ROLE_INFRASTRUCTURE; @@ -78,7 +77,7 @@ namespace Spring.Transaction.Config advisorDef.Role = ObjectRole.ROLE_INFRASTRUCTURE; advisorDef.PropertyValues.Add("transactionAttributeSource", new RuntimeObjectReference(sourceName)); advisorDef.PropertyValues.Add("adviceObjectName", interceptorName); - + if (element.HasAttribute(ORDER)) { advisorDef.PropertyValues.Add(ORDER, GetAttributeValue(element, ORDER)); @@ -92,8 +91,8 @@ namespace Spring.Transaction.Config string transactionManagerName = GetAttributeValue(element, TxNamespaceUtils.TRANSACTION_MANAGER_ATTRIBUTE); interceptorDefinition.PropertyValues.Add(TxNamespaceUtils.TRANSACTION_MANAGER_PROPERTY, new RuntimeObjectReference(transactionManagerName)); - - + + } /// @@ -125,4 +124,4 @@ namespace Spring.Transaction.Config get { return true; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/Config/TxAdviceObjectDefinitionParser.cs b/src/Spring/Spring.Data/Transaction/Config/TxAdviceObjectDefinitionParser.cs index d699fbb1..196f1e86 100644 --- a/src/Spring/Spring.Data/Transaction/Config/TxAdviceObjectDefinitionParser.cs +++ b/src/Spring/Spring.Data/Transaction/Config/TxAdviceObjectDefinitionParser.cs @@ -18,12 +18,8 @@ #endregion -using System; -using System.Collections; -using System.Collections.Generic; using System.Data; using System.Xml; -using Spring.Collections; using Spring.Objects.Factory.Config; using Spring.Objects.Factory.Support; using Spring.Objects.Factory.Xml; @@ -81,7 +77,7 @@ namespace Spring.Transaction.Config else { //Assume attibutes source - ObjectDefinitionBuilder txAttributeSourceBuilder = + ObjectDefinitionBuilder txAttributeSourceBuilder = parserContext.ParserHelper.CreateRootObjectDefinitionBuilder(typeof (AttributesTransactionAttributeSource)); builder.AddPropertyValue(TxNamespaceUtils.TRANSACTION_ATTRIBUTE_SOURCE, @@ -98,7 +94,7 @@ namespace Spring.Transaction.Config { string name = GetAttributeValue(methodElement, "name"); TypedStringValue nameHolder = new TypedStringValue(name); - + RuleBasedTransactionAttribute attribute = new RuleBasedTransactionAttribute(); string propagation = GetAttributeValue(methodElement, PROPAGATION); string isolation = GetAttributeValue(methodElement, ISOLATION); @@ -171,4 +167,4 @@ namespace Spring.Transaction.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/HeuristicCompletionException.cs b/src/Spring/Spring.Data/Transaction/HeuristicCompletionException.cs index 7a45ab77..a3108186 100644 --- a/src/Spring/Spring.Data/Transaction/HeuristicCompletionException.cs +++ b/src/Spring/Spring.Data/Transaction/HeuristicCompletionException.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Transaction @@ -121,4 +120,4 @@ namespace Spring.Transaction base.GetObjectData (info, context); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/IllegalTransactionStateException.cs b/src/Spring/Spring.Data/Transaction/IllegalTransactionStateException.cs index 3a16cedb..ae3fcffe 100644 --- a/src/Spring/Spring.Data/Transaction/IllegalTransactionStateException.cs +++ b/src/Spring/Spring.Data/Transaction/IllegalTransactionStateException.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Transaction @@ -65,4 +64,4 @@ namespace Spring.Transaction protected IllegalTransactionStateException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/AbstractFallbackTransactionAttributeSource.cs b/src/Spring/Spring.Data/Transaction/Interceptor/AbstractFallbackTransactionAttributeSource.cs index 3bbdcc8d..08ae4eec 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/AbstractFallbackTransactionAttributeSource.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/AbstractFallbackTransactionAttributeSource.cs @@ -14,12 +14,8 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; - -using Spring.Collections; using Spring.Util; using Spring.Core; @@ -159,7 +155,7 @@ namespace Spring.Transaction.Interceptor /// /// Return the transaction attribute, given this set of attributes - /// attached to a method or class. Return null if it's not transactional. + /// attached to a method or class. Return null if it's not transactional. /// /// /// Protected rather than private as subclasses may want to customize @@ -276,4 +272,4 @@ namespace Spring.Transaction.Interceptor return null; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/AbstractTransactionAttributeSourcePointcut.cs b/src/Spring/Spring.Data/Transaction/Interceptor/AbstractTransactionAttributeSourcePointcut.cs index 3d27d583..26567582 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/AbstractTransactionAttributeSourcePointcut.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/AbstractTransactionAttributeSourcePointcut.cs @@ -1,5 +1,5 @@ -#region License - +#region License + /* * Copyright 2002-2010 the original author or authors. * @@ -14,20 +14,19 @@ * 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 - -using System; -using System.Reflection; -using Spring.Aop.Support; - -namespace Spring.Transaction.Interceptor -{ - public abstract class AbstractTransactionAttributeSourcePointcut : StaticMethodMatcherPointcut - { - #region Overrides of StaticMethodMatcher - + */ + +#endregion + +using System.Reflection; +using Spring.Aop.Support; + +namespace Spring.Transaction.Interceptor +{ + public abstract class AbstractTransactionAttributeSourcePointcut : StaticMethodMatcherPointcut + { + #region Overrides of StaticMethodMatcher + /// /// Does the supplied satisfy this matcher? /// @@ -45,15 +44,15 @@ namespace Spring.Transaction.Interceptor /// /// /// if this this method matches statically. - /// - public override bool Matches(MethodInfo method, Type targetType) - { - ITransactionAttributeSource tas = TransactionAttributeSource; - return (tas == null || TransactionAttributeSource.ReturnTransactionAttribute(method, targetType) != null); - } - - #endregion - - protected abstract ITransactionAttributeSource TransactionAttributeSource { get; } - } -} \ No newline at end of file + /// + public override bool Matches(MethodInfo method, Type targetType) + { + ITransactionAttributeSource tas = TransactionAttributeSource; + return (tas == null || TransactionAttributeSource.ReturnTransactionAttribute(method, targetType) != null); + } + + #endregion + + protected abstract ITransactionAttributeSource TransactionAttributeSource { get; } + } +} diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/AttributesTransactionAttributeSource.cs b/src/Spring/Spring.Data/Transaction/Interceptor/AttributesTransactionAttributeSource.cs index 94d516fe..b124c427 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/AttributesTransactionAttributeSource.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/AttributesTransactionAttributeSource.cs @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections; -using System.Collections.Generic; using System.Reflection; namespace Spring.Transaction.Interceptor @@ -82,7 +79,7 @@ namespace Spring.Transaction.Interceptor if (attr is TransactionAttribute) { TransactionAttribute ta = (TransactionAttribute)attr; - RuleBasedTransactionAttribute rbta = + RuleBasedTransactionAttribute rbta = new RuleBasedTransactionAttribute(); //TODO another reminder to sync property names @@ -125,6 +122,6 @@ namespace Spring.Transaction.Interceptor } return null; } - + } } diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/DefaultTransactionAttribute.cs b/src/Spring/Spring.Data/Transaction/Interceptor/DefaultTransactionAttribute.cs index 45a43c1d..aef1bdc3 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/DefaultTransactionAttribute.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/DefaultTransactionAttribute.cs @@ -14,12 +14,11 @@ * limitations under the License. */ -using System; using Spring.Transaction.Support; namespace Spring.Transaction.Interceptor { - /// + /// /// Transaction attribute approach to rolling back on all exceptions, no other /// exceptions by default. /// @@ -75,7 +74,7 @@ namespace Spring.Transaction.Interceptor return (true); } - /// + /// /// Return a description of this transaction attribute. /// /// @@ -93,4 +92,4 @@ namespace Spring.Transaction.Interceptor return result; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/DefaultTransactionAttributeSourceAdvisor.cs b/src/Spring/Spring.Data/Transaction/Interceptor/DefaultTransactionAttributeSourceAdvisor.cs index 573f0889..393311c8 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/DefaultTransactionAttributeSourceAdvisor.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/DefaultTransactionAttributeSourceAdvisor.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Reflection; using AopAlliance.Aop; using Spring.Aop.Framework; @@ -27,15 +26,15 @@ using Spring.Aop.Support; namespace Spring.Transaction.Interceptor { /// - /// Advisor driven by a , + /// Advisor driven by a , /// used to exclude a general advice from methods that /// are non-transactional. /// /// /// - /// To put it another way, use this advisor when you would like to associate other AOP - /// advice based on the pointcut specified by declarative transaction demarcation, - /// attibute based or otherwise. + /// To put it another way, use this advisor when you would like to associate other AOP + /// advice based on the pointcut specified by declarative transaction demarcation, + /// attibute based or otherwise. /// ///

/// Because the AOP framework caches advice calculations, this is normally @@ -58,7 +57,7 @@ namespace Spring.Transaction.Interceptor { if (transactionAttributeSource == null) { - throw new AopConfigException("Cannot construct a DefaultTransactionAttributeSourceAdvisor if " + + throw new AopConfigException("Cannot construct a DefaultTransactionAttributeSourceAdvisor if " + "TransactionAttributeSource is null."); } _transactionAttributeSource = transactionAttributeSource; diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/DelegatingTransactionAttributeWithName.cs b/src/Spring/Spring.Data/Transaction/Interceptor/DelegatingTransactionAttributeWithName.cs index 2f5498a0..9d45060e 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/DelegatingTransactionAttributeWithName.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/DelegatingTransactionAttributeWithName.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Transactions; using IsolationLevel=System.Data.IsolationLevel; @@ -93,7 +92,7 @@ namespace Spring.Transaction.Interceptor /// public TransactionScopeAsyncFlowOption AsyncFlowOption => targetAttribute.AsyncFlowOption; - ///

+ /// /// Return a description of this transaction attribute. /// /// @@ -109,4 +108,4 @@ namespace Spring.Transaction.Interceptor return targetAttribute.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/ITransactionAttribute.cs b/src/Spring/Spring.Data/Transaction/Interceptor/ITransactionAttribute.cs index 0131f28a..961492e6 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/ITransactionAttribute.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/ITransactionAttribute.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.ComponentModel; namespace Spring.Transaction.Interceptor diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/ITransactionAttributeSource.cs b/src/Spring/Spring.Data/Transaction/Interceptor/ITransactionAttributeSource.cs index 59b61a6d..a5658d36 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/ITransactionAttributeSource.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/ITransactionAttributeSource.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Reflection; namespace Spring.Transaction.Interceptor @@ -43,11 +42,11 @@ namespace Spring.Transaction.Interceptor /// /// The method to check. /// - /// The target . May be null, in which case the declaring + /// The target . May be null, in which case the declaring /// class of the supplied must be used. /// /// - /// A or + /// A or /// null if the method is non-transactional. /// ITransactionAttribute ReturnTransactionAttribute( MethodInfo method, Type targetType ); diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/MatchAlwaysTransactionAttributeSource.cs b/src/Spring/Spring.Data/Transaction/Interceptor/MatchAlwaysTransactionAttributeSource.cs index b460c8e3..e11437fa 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/MatchAlwaysTransactionAttributeSource.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/MatchAlwaysTransactionAttributeSource.cs @@ -18,14 +18,13 @@ #endregion -using System; using System.Reflection; namespace Spring.Transaction.Interceptor { /// - /// Very simple implementation of - /// which will always return the same + /// Very simple implementation of + /// which will always return the same /// for all methods fed to it. /// /// @@ -69,11 +68,11 @@ namespace Spring.Transaction.Interceptor ///
/// The method to check. /// - /// The target . May be null, in which case the declaring + /// The target . May be null, in which case the declaring /// class of the supplied must be used. /// /// - /// A or + /// A or /// null if the method is non-transactional. /// public ITransactionAttribute ReturnTransactionAttribute(MethodInfo method, Type targetType) diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/MethodMapTransactionAttributeSource.cs b/src/Spring/Spring.Data/Transaction/Interceptor/MethodMapTransactionAttributeSource.cs index 82e875ba..dc6d66df 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/MethodMapTransactionAttributeSource.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/MethodMapTransactionAttributeSource.cs @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Reflection; @@ -29,8 +26,6 @@ using Spring.Util; using Spring.Core.TypeResolution; using Spring.Core; -#endregion - namespace Spring.Transaction.Interceptor { /// @@ -96,11 +91,11 @@ namespace Spring.Transaction.Interceptor editor.SetAsText(entry.Value.ToString()); attribute = editor.Value; } - AddTransactionalMethod( name, attribute ); - + AddTransactionalMethod( name, attribute ); + } - } + } } /// /// Add an attribute for a transactional method. @@ -117,7 +112,7 @@ namespace Spring.Transaction.Interceptor if (lastCommaIndex == -1) { throw new ArgumentException("'" + name + "'" + - " is not a valid method name, missing AssemblyName. Format is FQN.MethodName, AssemblyName."); + " is not a valid method name, missing AssemblyName. Format is FQN.MethodName, AssemblyName."); } string fqnWithMethod = name.Substring(0, lastCommaIndex); @@ -137,7 +132,7 @@ namespace Spring.Transaction.Interceptor } catch ( TypeLoadException exception ) { throw new TransactionUsageException( "Type '" + fqnClassName + "' not found.", exception ); - } + } } /// @@ -178,7 +173,7 @@ namespace Spring.Transaction.Interceptor { // No already registered method name, or more specific // method name specification now -> (re-)register method. - if (LOG.IsDebugEnabled && regularMethodName != null) + if (LOG.IsDebugEnabled && regularMethodName != null) { LOG.Debug("Replacing attribute for transactional method [" + currentMethod + "]: current name '" + name + "' is more specific than '" + regularMethodName + "'"); @@ -188,7 +183,7 @@ namespace Spring.Transaction.Interceptor } else { - if (LOG.IsDebugEnabled && regularMethodName != null) + if (LOG.IsDebugEnabled && regularMethodName != null) { LOG.Debug("Keeping attribute for transactional method [" + currentMethod + "]: current name '" + name + "' is not more specific than '" + regularMethodName + "'"); @@ -214,7 +209,7 @@ namespace Spring.Transaction.Interceptor /// /// /// The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, - /// as well as direct equality. This behaviour can (of course) be overridden in + /// as well as direct equality. This behaviour can (of course) be overridden in /// derived classes. /// /// The method name of the class. @@ -232,11 +227,11 @@ namespace Spring.Transaction.Interceptor /// /// The method to check. /// - /// The target . May be null, in which case the declaring + /// The target . May be null, in which case the declaring /// class of the supplied must be used. /// /// - /// A or + /// A or /// null if the method is non-transactional. /// public ITransactionAttribute ReturnTransactionAttribute(MethodInfo method, Type targetType) @@ -246,18 +241,18 @@ namespace Spring.Transaction.Interceptor foreach (DictionaryEntry dictionaryEntry in _methodMap) { MethodInfo currentMethod = (MethodInfo)dictionaryEntry.Key; - + MethodInfo specificMethod; if (targetType == null) { specificMethod = currentMethod; } else - { + { ParameterInfo[] parameters = currentMethod.GetParameters(); ComposedCriteria searchCriteria = new ComposedCriteria(); - searchCriteria.Add(new MethodNameMatchCriteria(currentMethod.Name)); + searchCriteria.Add(new MethodNameMatchCriteria(currentMethod.Name)); searchCriteria.Add(new MethodParametersCountCriteria(parameters.Length)); searchCriteria.Add(new MethodGenericArgumentsCountCriteria(currentMethod.GetGenericArguments().Length)); searchCriteria.Add(new MethodParametersCriteria(ReflectionUtils.GetParameterTypes(parameters))); @@ -287,6 +282,6 @@ namespace Spring.Transaction.Interceptor } #endregion - + } } diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/NameMatchTransactionAttributeSource.cs b/src/Spring/Spring.Data/Transaction/Interceptor/NameMatchTransactionAttributeSource.cs index 7f7e44ca..6f4912aa 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/NameMatchTransactionAttributeSource.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/NameMatchTransactionAttributeSource.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Collections.Specialized; using System.Reflection; @@ -56,33 +55,33 @@ namespace Spring.Transaction.Interceptor nameMap = new Hashtable(); } - /// - /// Enumerate the string/ mapping entries. - /// + /// + /// Enumerate the string/ mapping entries. + /// public IEnumerator GetEnumerator() - { - return nameMap.GetEnumerator(); - } - - /// - /// Add a mapping. - /// - public void Add(string methodPattern, ITransactionAttribute txAttribute) - { - AddTransactionMethod(methodPattern, txAttribute); - } - - /// - /// Add a mapping. - /// - public void Add(string methodPattern, string txAttributeText) - { - TransactionAttributeEditor editor = new TransactionAttributeEditor(); - editor.SetAsText(txAttributeText); - ITransactionAttribute txAttribute = editor.Value; - AddTransactionMethod(methodPattern, txAttribute); - } - + { + return nameMap.GetEnumerator(); + } + + /// + /// Add a mapping. + /// + public void Add(string methodPattern, ITransactionAttribute txAttribute) + { + AddTransactionMethod(methodPattern, txAttribute); + } + + /// + /// Add a mapping. + /// + public void Add(string methodPattern, string txAttributeText) + { + TransactionAttributeEditor editor = new TransactionAttributeEditor(); + editor.SetAsText(txAttributeText); + ITransactionAttribute txAttribute = editor.Value; + AddTransactionMethod(methodPattern, txAttribute); + } + /// /// Set a name/attribute map, consisting of method names (e.g. "MyMethod") and /// instances @@ -106,7 +105,7 @@ namespace Spring.Transaction.Interceptor editor.SetAsText(entry.Value.ToString()); attribute = editor.Value; } - AddTransactionMethod(name, attribute); + AddTransactionMethod(name, attribute); } } } @@ -116,8 +115,8 @@ namespace Spring.Transaction.Interceptor /// /// /// Expects method names as keys and string attributes definitions as values, - /// parsable into - /// instances via + /// parsable into + /// instances via /// . /// /// The properties of the transaction. @@ -142,7 +141,7 @@ namespace Spring.Transaction.Interceptor protected virtual bool IsMatch( string methodName, string mappedName ) { return PatternMatchUtils.SimpleMatch(mappedName, methodName); - } + } /// /// Add an attribute for a transactional method. @@ -165,15 +164,15 @@ namespace Spring.Transaction.Interceptor } #endregion nameMap.Add( methodName, attribute ); - } + } /// /// Parses the given properties into a name/attribute map. /// /// /// Expects method names as keys and string attributes definitions as values, - /// parsable into - /// instances via + /// parsable into + /// instances via /// . /// /// The properties of the transaction. @@ -195,11 +194,11 @@ namespace Spring.Transaction.Interceptor /// /// The method to check. /// - /// The target . May be null, in which case the declaring + /// The target . May be null, in which case the declaring /// class of the supplied must be used. /// /// - /// A or + /// A or /// null if the method is non-transactional. /// public ITransactionAttribute ReturnTransactionAttribute(MethodInfo method, Type targetType) diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/NoRollbackRuleAttribute.cs b/src/Spring/Spring.Data/Transaction/Interceptor/NoRollbackRuleAttribute.cs index 8b9bb678..abe457e9 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/NoRollbackRuleAttribute.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/NoRollbackRuleAttribute.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Transaction.Interceptor { /// diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/RollbackRuleAttribute.cs b/src/Spring/Spring.Data/Transaction/Interceptor/RollbackRuleAttribute.cs index 334e25dc..6710bea2 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/RollbackRuleAttribute.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/RollbackRuleAttribute.cs @@ -18,8 +18,6 @@ #endregion -using System; - using Spring.Util; namespace Spring.Transaction.Interceptor @@ -40,7 +38,7 @@ namespace Spring.Transaction.Interceptor { /// /// Could hold exception, resolving class name but would always require FQN. - /// This way does multiple string comparisons, but how often do we decide + /// This way does multiple string comparisons, but how often do we decide /// whether to roll back a transaction following an exception? /// private string _exceptionName; @@ -90,7 +88,7 @@ namespace Spring.Transaction.Interceptor /// public RollbackRuleAttribute( Type exceptionType ) { - AssertUtils.ArgumentNotNull(exceptionType, "exceptionType"); + AssertUtils.ArgumentNotNull(exceptionType, "exceptionType"); if ( ! typeof(Exception).IsAssignableFrom( exceptionType ) ) { throw new ArgumentException("Cannot construct rollback rule from " + exceptionType + "; " + "It's not an Exception"); @@ -110,7 +108,7 @@ namespace Spring.Transaction.Interceptor /// Return the depth to the matching superclass execption . /// /// - /// A return value of 0 means that the matches. + /// A return value of 0 means that the matches. /// /// /// The of exception to find. @@ -127,8 +125,8 @@ namespace Spring.Transaction.Interceptor /// Return the depth to the matching superclass execption . /// /// - /// A return value of 0 means that the s - /// matches. + /// A return value of 0 means that the s + /// matches. /// /// /// The exception object to find. @@ -161,7 +159,7 @@ namespace Spring.Transaction.Interceptor return base.GetHashCode(); } - + /// /// Override of . /// @@ -197,7 +195,7 @@ namespace Spring.Transaction.Interceptor if ( ( exceptionType.Name.IndexOf( ExceptionName ) != -1 ) || ( exceptionType.FullName.IndexOf( ExceptionName ) != -1 ) ) { return depth; - } + } if ( exceptionType == typeof(Exception)) { return -1; diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/RuleBasedTransactionAttribute.cs b/src/Spring/Spring.Data/Transaction/Interceptor/RuleBasedTransactionAttribute.cs index 2ee4afee..69178108 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/RuleBasedTransactionAttribute.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/RuleBasedTransactionAttribute.cs @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections; -using System.Collections.Generic; using System.Text; using Spring.Collections; @@ -33,11 +30,11 @@ namespace Spring.Transaction.Interceptor /// a number of rollback rules, both positive and negative. ///
/// - /// If no rules are relevant to the exception, it behaves like the + /// If no rules are relevant to the exception, it behaves like the /// class /// (rolling back on runtime exceptions).. ///

- /// The + /// The /// creates objects of this class. ///

///
diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAspectSupport.cs b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAspectSupport.cs index 954c3b43..a51854ac 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAspectSupport.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAspectSupport.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections.Specialized; using System.Reflection; using Common.Logging; @@ -335,8 +334,8 @@ namespace Spring.Transaction.Interceptor /// Transaction Info for declarative transaction management. protected TransactionInfo CreateTransactionIfNecessary(ITransactionAttribute sourceAttr, string joinpointIdentification) { - ITransactionAttribute txAttr = sourceAttr; - + ITransactionAttribute txAttr = sourceAttr; + // If no name specified, apply method identification as transaction name. if (txAttr != null && txAttr.Name == null) { @@ -364,8 +363,8 @@ namespace Spring.Transaction.Interceptor // false. We created it only to preserve the integrity of // the ThreadLocal stack maintained in this class. if (log.IsDebugEnabled) - { - log.Debug("Skipping transactional joinpoint [" + joinpointIdentification + + { + log.Debug("Skipping transactional joinpoint [" + joinpointIdentification + "] because no transaction manager has been configured"); } } @@ -407,7 +406,7 @@ namespace Spring.Transaction.Interceptor #region Instrumentation if (log.IsDebugEnabled) - { + { log.Debug("Completing transaction for [" + transactionInfo.JoinpointIdentification + "]"); } diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttribute.cs b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttribute.cs index 4fc2d358..91a99081 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttribute.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttribute.cs @@ -1,5 +1,5 @@ /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Data; using Spring.Transaction.Support; @@ -163,4 +162,4 @@ namespace Spring.Transaction.Interceptor set => _asyncFlowOption = value; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeConverter.cs b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeConverter.cs index 5c803a24..ab46cab9 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeConverter.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeConverter.cs @@ -18,15 +18,13 @@ #endregion - -using System; using System.ComponentModel; using System.Globalization; namespace Spring.Transaction.Interceptor { /// - /// Type converter for + /// Type converter for /// objects. /// /// @@ -86,4 +84,4 @@ namespace Spring.Transaction.Interceptor return base.ConvertFrom(context, culture, val); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeEditor.cs b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeEditor.cs index 28591d50..4b2716e7 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeEditor.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeEditor.cs @@ -18,14 +18,13 @@ #endregion -using System; using System.Data; using Spring.Util; namespace Spring.Transaction.Interceptor { /// - /// Type converter for + /// Type converter for /// objects. /// /// @@ -93,7 +92,7 @@ namespace Spring.Transaction.Interceptor } else { throw new ArgumentException("Illegal transaction attribute token: [" + token + "]"); - } + } } _attribute = attribute; } diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeSourceAdvisor.cs b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeSourceAdvisor.cs index b7ffc1d4..0e5cb5d8 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeSourceAdvisor.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionAttributeSourceAdvisor.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Reflection; using Spring.Aop.Framework; using Spring.Aop.Support; @@ -33,7 +32,7 @@ namespace Spring.Transaction.Interceptor /// ///

/// Because the AOP framework caches advice calculations, this is normally - /// faster than just letting the + /// faster than just letting the /// run and find out itself that it has no work to do. ///

///
@@ -125,6 +124,6 @@ namespace Spring.Transaction.Interceptor _transactionAttributeSource = transactionInterceptor.TransactionAttributeSource; } - #endregion + #endregion } } diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionInterceptor.cs b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionInterceptor.cs index da976da3..7b2cd0ad 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionInterceptor.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionInterceptor.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Reflection; using AopAlliance.Intercept; @@ -34,7 +33,7 @@ namespace Spring.Transaction.Interceptor /// transaction API: subclasses such as this are responsible for calling /// superclass methods such as /// - /// in the correct order, in the event of normal invocation return or an exception. + /// in the correct order, in the event of normal invocation return or an exception. ///

///

/// s are thread-safe. @@ -48,7 +47,7 @@ namespace Spring.Transaction.Interceptor public class TransactionInterceptor : TransactionAspectSupport, IMethodInterceptor { ///

- /// AOP Alliance invoke call that handles all transaction plumbing. + /// AOP Alliance invoke call that handles all transaction plumbing. /// /// /// The method that is to execute in the context of a transaction. @@ -71,13 +70,13 @@ namespace Spring.Transaction.Interceptor // Invoke the next interceptor in the chain. // This will normally result in a target object being invoked. returnValue = invocation.Proceed(); - } + } catch ( Exception ex ) { // target invocation exception CompleteTransactionAfterThrowing( txnInfo, ex ); throw; - } + } finally { CleanupTransactionInfo( txnInfo ); diff --git a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionProxyFactoryObject.cs b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionProxyFactoryObject.cs index ca4ab861..1d20a747 100644 --- a/src/Spring/Spring.Data/Transaction/Interceptor/TransactionProxyFactoryObject.cs +++ b/src/Spring/Spring.Data/Transaction/Interceptor/TransactionProxyFactoryObject.cs @@ -18,10 +18,6 @@ #endregion -#region Imports - -using System; -using System.Collections.Generic; using System.Collections.Specialized; using Spring.Aop; @@ -32,8 +28,6 @@ using Spring.Aop.Target; using Spring.Core.TypeResolution; using Spring.Objects.Factory; -#endregion - namespace Spring.Transaction.Interceptor { /// @@ -50,11 +44,11 @@ namespace Spring.Transaction.Interceptor /// transactional proxy, proxying all the interfaces that the target implements. ///

///

- /// Internally, a + /// Internally, a /// instance is used, but the user of this class does not have to care. Optionally, an /// can be specified to cause conditional invocation of /// the underlying . - ///

+ ///

///

/// The /// @@ -240,12 +234,12 @@ namespace Spring.Transaction.Interceptor if ( _proxy != null ) { return _proxy.GetType(); - } + } else if ( _target != null && _target is ITargetSource ) { return _target.GetType(); - } - else + } + else { return null; } @@ -298,7 +292,7 @@ namespace Spring.Transaction.Interceptor { IAdvisor advice = new DefaultPointcutAdvisor(_pointcut, _transactionInterceptor); proxyFactory.AddAdvisor(advice); - } + } else { proxyFactory.AddAdvisor( new TransactionAttributeSourceAdvisor( _transactionInterceptor ) ); @@ -315,7 +309,7 @@ namespace Spring.Transaction.Interceptor if ( _proxyInterfaces != null ) { proxyFactory.Interfaces = _proxyInterfaces; - } + } else if ( !ProxyTargetType ) { if ( _target is ITargetSource ) diff --git a/src/Spring/Spring.Data/Transaction/InvalidIsolationLevelException.cs b/src/Spring/Spring.Data/Transaction/InvalidIsolationLevelException.cs index a9396e27..aa7809e1 100644 --- a/src/Spring/Spring.Data/Transaction/InvalidIsolationLevelException.cs +++ b/src/Spring/Spring.Data/Transaction/InvalidIsolationLevelException.cs @@ -18,12 +18,11 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Transaction { - + ///

/// Exception that gets thrown when an invalid isolation level is specified, /// i.e. an isolation level that the transaction manager implementation @@ -66,4 +65,4 @@ namespace Spring.Transaction protected InvalidIsolationLevelException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/InvalidTimeoutException.cs b/src/Spring/Spring.Data/Transaction/InvalidTimeoutException.cs index bfb07fd7..18891ce6 100644 --- a/src/Spring/Spring.Data/Transaction/InvalidTimeoutException.cs +++ b/src/Spring/Spring.Data/Transaction/InvalidTimeoutException.cs @@ -18,12 +18,11 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Transaction { - /// + /// /// Exception that gets thrown when an invalid timeout is specified, /// for example when the transaction manager implementation doesn't support timeouts. /// @@ -92,7 +91,7 @@ namespace Spring.Transaction /// protected InvalidTimeoutException( - SerializationInfo info, StreamingContext context ) : base( info, context ) + SerializationInfo info, StreamingContext context ) : base( info, context ) { _timeout = info.GetInt32( "timeout" ); } @@ -104,4 +103,4 @@ namespace Spring.Transaction base.GetObjectData( info, context ); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/NestedTransactionNotSupportedException.cs b/src/Spring/Spring.Data/Transaction/NestedTransactionNotSupportedException.cs index ab8e0172..ef220a39 100644 --- a/src/Spring/Spring.Data/Transaction/NestedTransactionNotSupportedException.cs +++ b/src/Spring/Spring.Data/Transaction/NestedTransactionNotSupportedException.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Transaction @@ -64,4 +63,4 @@ namespace Spring.Transaction protected NestedTransactionNotSupportedException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/NoTransactionException.cs b/src/Spring/Spring.Data/Transaction/NoTransactionException.cs index 1c2aa516..565ce8ea 100644 --- a/src/Spring/Spring.Data/Transaction/NoTransactionException.cs +++ b/src/Spring/Spring.Data/Transaction/NoTransactionException.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Transaction @@ -65,4 +64,4 @@ namespace Spring.Transaction protected NoTransactionException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/Support/AbstractPlatformTransactionManager.cs b/src/Spring/Spring.Data/Transaction/Support/AbstractPlatformTransactionManager.cs index e132100c..81629ec2 100644 --- a/src/Spring/Spring.Data/Transaction/Support/AbstractPlatformTransactionManager.cs +++ b/src/Spring/Spring.Data/Transaction/Support/AbstractPlatformTransactionManager.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Data; using Common.Logging; @@ -430,8 +429,8 @@ namespace Spring.Transaction.Support /// EnterpriseServices transaction invoked via their APIs. /// /// The default implementation simply invokes the AfterCompletion methods - /// immediately, passing in TransactionSynchronizationStatus.Unknown. - /// This is the best we can do if there's no chance to determine the actual + /// immediately, passing in TransactionSynchronizationStatus.Unknown. + /// This is the best we can do if there's no chance to determine the actual /// outcome of the outer transaction. /// /// @@ -692,7 +691,7 @@ namespace Spring.Transaction.Support log.Debug("Participating in existing transaction"); } - //TODO: this block related to un-ported java feature permitting setting the ValidateExistingTransaction flag + //TODO: this block related to un-ported java feature permitting setting the ValidateExistingTransaction flag // default is FALSE anyway so skipping this validation block should have no effect on code excecution path /*if (isValidateExistingTransaction()) { @@ -718,7 +717,7 @@ namespace Spring.Transaction.Support definition + "] is not marked as read-only but existing transaction is"); } } - + bool newSynch = (_transactionSyncState != TransactionSynchronizationState.Never); return PrepareTransactionStatus(definition, transaction, false, newSynch, debugEnabled, null); @@ -1274,4 +1273,4 @@ namespace Spring.Transaction.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/Support/DefaultTransactionDefinition.cs b/src/Spring/Spring.Data/Transaction/Support/DefaultTransactionDefinition.cs index 8a242330..00bfb8c9 100644 --- a/src/Spring/Spring.Data/Transaction/Support/DefaultTransactionDefinition.cs +++ b/src/Spring/Spring.Data/Transaction/Support/DefaultTransactionDefinition.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Text; using System.Transactions; @@ -271,4 +270,4 @@ namespace Spring.Transaction.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/Support/ResourceHolderSupport.cs b/src/Spring/Spring.Data/Transaction/Support/ResourceHolderSupport.cs index 2ec091f0..196aa9eb 100644 --- a/src/Spring/Spring.Data/Transaction/Support/ResourceHolderSupport.cs +++ b/src/Spring/Spring.Data/Transaction/Support/ResourceHolderSupport.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Transaction.Support { /// @@ -39,7 +37,7 @@ namespace Spring.Transaction.Support private bool rollbackOnly = false; private DateTime deadline; private int referenceCount = 0; - + /// /// Mark the resource as synchronized with a transaction. /// @@ -72,7 +70,7 @@ namespace Spring.Transaction.Support /// public bool HasTimeout { - get { return ( deadline != DateTime.MinValue ); } + get { return ( deadline != DateTime.MinValue ); } } /// @@ -193,6 +191,6 @@ namespace Spring.Transaction.Support return (referenceCount > 0); } } - + } } diff --git a/src/Spring/Spring.Data/Transaction/Support/TransactionCallbackWithoutResult.cs b/src/Spring/Spring.Data/Transaction/Support/TransactionCallbackWithoutResult.cs index d4f9fb44..51e21453 100644 --- a/src/Spring/Spring.Data/Transaction/Support/TransactionCallbackWithoutResult.cs +++ b/src/Spring/Spring.Data/Transaction/Support/TransactionCallbackWithoutResult.cs @@ -1,14 +1,14 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. - * + * Copyright � 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -16,12 +16,6 @@ * limitations under the License. */ -#endregion - -#region Imports - - - #endregion namespace Spring.Transaction.Support diff --git a/src/Spring/Spring.Data/Transaction/Support/TransactionSynchronizationAdapter.cs b/src/Spring/Spring.Data/Transaction/Support/TransactionSynchronizationAdapter.cs index b20afe63..b78ca318 100644 --- a/src/Spring/Spring.Data/Transaction/Support/TransactionSynchronizationAdapter.cs +++ b/src/Spring/Spring.Data/Transaction/Support/TransactionSynchronizationAdapter.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Transaction.Support { /// @@ -39,7 +37,7 @@ namespace Spring.Transaction.Support #region ITransactionSynchronization Members /// - /// Suspend this synchronization. + /// Suspend this synchronization. /// /// ///

@@ -74,7 +72,7 @@ namespace Spring.Transaction.Support /// Can flush transactional sessions to the database. ///

///

- /// Note that exceptions will get propagated to the commit caller and + /// Note that exceptions will get propagated to the commit caller and /// cause a rollback of the transaction. ///

///
@@ -92,7 +90,7 @@ namespace Spring.Transaction.Support public virtual void AfterCommit() { } - + /// /// Invoked before transaction commit/rollback (after /// , @@ -132,7 +130,7 @@ namespace Spring.Transaction.Support /// /// /// - ///A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than obj. Zero This instance is equal to obj. Greater than zero This instance is greater than obj. + ///A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: Value Meaning Less than zero This instance is less than obj. Zero This instance is equal to obj. Greater than zero This instance is greater than obj. /// /// ///An object to compare with this instance. diff --git a/src/Spring/Spring.Data/Transaction/Support/TransactionSynchronizationManager.cs b/src/Spring/Spring.Data/Transaction/Support/TransactionSynchronizationManager.cs index 883dc346..0ec8da68 100644 --- a/src/Spring/Spring.Data/Transaction/Support/TransactionSynchronizationManager.cs +++ b/src/Spring/Spring.Data/Transaction/Support/TransactionSynchronizationManager.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Data; @@ -57,9 +56,9 @@ namespace Spring.Transaction.Support /// If transaction synchronization isn't active, there is either no current /// transaction, or the transaction manager doesn't support synchronizations. ///

- /// Note that this class uses following naming convention for the + /// Note that this class uses following naming convention for the /// named 'data slots' for storage of thread local data, 'Spring.Transaction:Name' - /// where Name is either + /// where Name is either /// /// Juergen Hoeller /// Griffin Caprio (.NET) @@ -72,9 +71,9 @@ namespace Spring.Transaction.Support #endregion - #region Fields + #region Fields private static readonly string syncsDataSlotName = "Spring.Transactions:syncList"; - + private static readonly string resourcesDataSlotName = "Spring.Transactions:resources"; private static readonly string currentTxReadOnlyDataSlotName = "Spring.Transactions:currentTxReadOnly"; @@ -96,7 +95,7 @@ namespace Spring.Transaction.Support /// Main for debugging purposes. Resource manager should always /// invoke HasResource for a specific resource key that they are interested in. /// - /// IDictionary with resource keys and resource objects or empty + /// IDictionary with resource keys and resource objects or empty /// dictionary if none is bound. public static IDictionary ResourceDictionary { @@ -145,7 +144,7 @@ namespace Spring.Transaction.Support return null; } object val = resources[key]; - + if (val != null && LOG.IsDebugEnabled) { LOG.Debug("Retrieved value [" + Describe(val) + "] for key [" + Describe(key) + "] bound to thread [" + @@ -226,9 +225,9 @@ namespace Spring.Transaction.Support /// /// If synchronization is already active. /// - public static void InitSynchronization() + public static void InitSynchronization() { - if ( SynchronizationActive ) + if ( SynchronizationActive ) { throw new InvalidOperationException( "Cannot activate transaction synchronization - already active" ); } @@ -249,9 +248,9 @@ namespace Spring.Transaction.Support /// /// If synchronization is not active. /// - public static void ClearSynchronization() + public static void ClearSynchronization() { - if ( !SynchronizationActive ) + if ( !SynchronizationActive ) { throw new InvalidOperationException( "Cannot deactivate transaction synchronization - not active" ); } @@ -284,10 +283,10 @@ namespace Spring.Transaction.Support /// /// If synchronization is not active. /// - public static void RegisterSynchronization( ITransactionSynchronization synchronization ) + public static void RegisterSynchronization( ITransactionSynchronization synchronization ) { AssertUtils.ArgumentNotNull(synchronization, "TransactionSynchronization must not be null"); - if ( !SynchronizationActive ) + if ( !SynchronizationActive ) { throw new InvalidOperationException( "Transaction synchronization is not active" ); } @@ -322,7 +321,7 @@ namespace Spring.Transaction.Support /// public static IList Synchronizations { - get + get { if (!SynchronizationActive) { @@ -335,7 +334,7 @@ namespace Spring.Transaction.Support object root = syncs.SyncRoot; lock (root) { - // #SPRNET-1160, tx Ben Rowlands + // #SPRNET-1160, tx Ben Rowlands CollectionUtils.StableSortInPlace(syncs, syncComparer); } @@ -369,10 +368,10 @@ namespace Spring.Transaction.Support } /// - /// Gets or sets a value indicating whether the + /// Gets or sets a value indicating whether the /// current transaction is read only. /// - /// + /// /// Called by transaction manager on transaction begin and on cleanup. /// Return whether the current transaction is marked as read-only. /// To be called by resource management code when preparing a newly @@ -397,13 +396,13 @@ namespace Spring.Transaction.Support { if (value) { - LogicalThreadContext.SetData(currentTxReadOnlyDataSlotName, true); + LogicalThreadContext.SetData(currentTxReadOnlyDataSlotName, true); } else { LogicalThreadContext.FreeNamedDataSlot(currentTxReadOnlyDataSlotName); } - + } } @@ -435,7 +434,7 @@ namespace Spring.Transaction.Support /// Called by the transaction manager on transaction begin and on cleanup. /// To be called by resource management code that wants to discriminate between /// active transaction synchronization (with or without backing resource transaction; - /// also on PROPAGATION_SUPPORTS) and an actual transaction being active; on + /// also on PROPAGATION_SUPPORTS) and an actual transaction being active; on /// PROPAGATION_REQUIRES, PROPAGATION_REQUIRES_NEW, etC) /// /// true if [actual transaction active]; otherwise, false. @@ -443,7 +442,7 @@ namespace Spring.Transaction.Support public static bool ActualTransactionActive { get - { + { return LogicalThreadContext.GetData(actualTxActiveDataSlotName) != null; } set @@ -464,7 +463,7 @@ namespace Spring.Transaction.Support /// Gets or sets the current transaction isolation level, if any. ///
/// Called by the transaction manager on transaction begin and on cleanup. - /// The current transaction isolation level. If no current transaction is + /// The current transaction isolation level. If no current transaction is /// active, retrun IsolationLevel.Unspecified public static IsolationLevel CurrentTransactionIsolationLevel { diff --git a/src/Spring/Spring.Data/Transaction/Support/TransactionTemplate.cs b/src/Spring/Spring.Data/Transaction/Support/TransactionTemplate.cs index 9b792edf..f3771158 100644 --- a/src/Spring/Spring.Data/Transaction/Support/TransactionTemplate.cs +++ b/src/Spring/Spring.Data/Transaction/Support/TransactionTemplate.cs @@ -18,7 +18,6 @@ #endregion -using System; using Common.Logging; using Spring.Objects.Factory; @@ -53,7 +52,7 @@ namespace Spring.Transaction.Support ///

/// /// Juergen Hoeller - /// Mark Pollack (.NET) + /// Mark Pollack (.NET) /// Griffin Caprio (.NET) public class TransactionTemplate : DefaultTransactionDefinition, ITransactionOperations, IInitializingObject { @@ -96,7 +95,7 @@ namespace Spring.Transaction.Support /// /// The transaction management strategy to be used. /// - public TransactionTemplate( IPlatformTransactionManager platformTransactionManager ) + public TransactionTemplate( IPlatformTransactionManager platformTransactionManager ) { _platformTransactionManager = platformTransactionManager; } @@ -119,7 +118,7 @@ namespace Spring.Transaction.Support ///
public void AfterPropertiesSet() { - if ( _platformTransactionManager == null ) + if ( _platformTransactionManager == null ) { throw new ArgumentException( "IPlatformTransactionManager instance is required." ); } @@ -142,14 +141,14 @@ namespace Spring.Transaction.Support /// /// In case of initialization or system errors. /// - public object Execute( TransactionDelegate transactionMethod ) + public object Execute( TransactionDelegate transactionMethod ) { ITransactionStatus status = _platformTransactionManager.GetTransaction( this ); object result; try { result = transactionMethod( status ); - } + } catch ( Exception ex ) { rollbackOnException( status, ex ); @@ -182,7 +181,7 @@ namespace Spring.Transaction.Support try { result = action.DoInTransaction(status); - } + } catch ( Exception ex ) { rollbackOnException( status, ex ); diff --git a/src/Spring/Spring.Data/Transaction/TransactionException.cs b/src/Spring/Spring.Data/Transaction/TransactionException.cs index 26932262..18eb05fd 100644 --- a/src/Spring/Spring.Data/Transaction/TransactionException.cs +++ b/src/Spring/Spring.Data/Transaction/TransactionException.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Transaction diff --git a/src/Spring/Spring.Data/Transaction/TransactionOutcomeState.cs b/src/Spring/Spring.Data/Transaction/TransactionOutcomeState.cs index 1bfde362..41307617 100644 --- a/src/Spring/Spring.Data/Transaction/TransactionOutcomeState.cs +++ b/src/Spring/Spring.Data/Transaction/TransactionOutcomeState.cs @@ -1,11 +1,5 @@ #region License -#endregion - -#region Imports - - - #endregion namespace Spring.Transaction diff --git a/src/Spring/Spring.Data/Transaction/TransactionSuspensionNotSupportedException.cs b/src/Spring/Spring.Data/Transaction/TransactionSuspensionNotSupportedException.cs index 53a71726..10192847 100644 --- a/src/Spring/Spring.Data/Transaction/TransactionSuspensionNotSupportedException.cs +++ b/src/Spring/Spring.Data/Transaction/TransactionSuspensionNotSupportedException.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Transaction @@ -64,4 +63,4 @@ namespace Spring.Transaction protected TransactionSuspensionNotSupportedException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/TransactionSystemException.cs b/src/Spring/Spring.Data/Transaction/TransactionSystemException.cs index c3eed3fe..8f930dd7 100644 --- a/src/Spring/Spring.Data/Transaction/TransactionSystemException.cs +++ b/src/Spring/Spring.Data/Transaction/TransactionSystemException.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Transaction @@ -64,4 +63,4 @@ namespace Spring.Transaction protected TransactionSystemException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/TransactionTimedOutException.cs b/src/Spring/Spring.Data/Transaction/TransactionTimedOutException.cs index dd778ca8..2146de21 100644 --- a/src/Spring/Spring.Data/Transaction/TransactionTimedOutException.cs +++ b/src/Spring/Spring.Data/Transaction/TransactionTimedOutException.cs @@ -1,4 +1,3 @@ -using System; using System.Runtime.Serialization; namespace Spring.Transaction @@ -14,7 +13,7 @@ namespace Spring.Transaction ///
public TransactionTimedOutException() : base() { - + } /// /// Creates a new instance of the diff --git a/src/Spring/Spring.Data/Transaction/TransactionUsageException.cs b/src/Spring/Spring.Data/Transaction/TransactionUsageException.cs index 964a36c3..220e2243 100644 --- a/src/Spring/Spring.Data/Transaction/TransactionUsageException.cs +++ b/src/Spring/Spring.Data/Transaction/TransactionUsageException.cs @@ -18,13 +18,12 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Transaction { - /// - /// Superclass for exceptions caused by inappropriate usage of + /// + /// Superclass for exceptions caused by inappropriate usage of /// a Spring.NET transaction API. /// /// Juergen Hoeller @@ -64,4 +63,4 @@ namespace Spring.Transaction protected TransactionUsageException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Data/Transaction/UnexpectedRollbackException.cs b/src/Spring/Spring.Data/Transaction/UnexpectedRollbackException.cs index 3df18f76..0706ce82 100644 --- a/src/Spring/Spring.Data/Transaction/UnexpectedRollbackException.cs +++ b/src/Spring/Spring.Data/Transaction/UnexpectedRollbackException.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Transaction @@ -63,4 +62,4 @@ namespace Spring.Transaction protected UnexpectedRollbackException( SerializationInfo info, StreamingContext context ) : base( info, context ) {} } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsConnection.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsConnection.cs index cf6d1618..0f48cffb 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsConnection.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsConnection.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -19,12 +19,11 @@ #endregion using Common.Logging; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Common { /// - /// A Connection object is a client's active connection to TIBCO EMS Server. + /// A Connection object is a client's active connection to TIBCO EMS Server. /// public class EmsConnection : IConnection { @@ -138,7 +137,7 @@ namespace Spring.Messaging.Ems.Common /// public void Close() { - nativeConnection.Close(); + nativeConnection.Close(); } /// @@ -201,4 +200,4 @@ namespace Spring.Messaging.Ems.Common } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsConnectionFactory.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsConnectionFactory.cs index 9086f132..036dfd16 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsConnectionFactory.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsConnectionFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,12 +18,9 @@ #endregion -using System; using System.Collections; -using System.IO; using System.Runtime.Serialization; using Spring.Objects.Factory; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Common { @@ -33,7 +30,7 @@ namespace Spring.Messaging.Ems.Common private string sslProxyAuthUsername; private string sslProxyAuthPassword; - private string sslProxyHost; + private string sslProxyHost; private int sslProxyPort; public EmsConnectionFactory() @@ -42,7 +39,7 @@ namespace Spring.Messaging.Ems.Common } public EmsConnectionFactory(string serverUrl) : this(serverUrl, null, null) - { + { } public EmsConnectionFactory(string serverUrl, string clientId) : this(serverUrl, clientId, null) @@ -242,7 +239,7 @@ namespace Spring.Messaging.Ems.Common public string UserPassword { - set { nativeConnectionFactory.SetUserPassword(value); } + set { nativeConnectionFactory.SetUserPassword(value); } } public FactoryLoadBalanceMetric Metric @@ -261,7 +258,7 @@ namespace Spring.Messaging.Ems.Common #region Implementation of IInitializingObject public void AfterPropertiesSet() { - + if (this.sslProxyAuthUsername != null && sslProxyAuthPassword != null) { nativeConnectionFactory.SetSSLProxyAuth(this.sslProxyAuthUsername, this.sslProxyAuthPassword); @@ -275,4 +272,4 @@ namespace Spring.Messaging.Ems.Common #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsMessageConsumer.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsMessageConsumer.cs index fefd05ff..5556ed69 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsMessageConsumer.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsMessageConsumer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,9 +18,6 @@ #endregion -using System; -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Common { public class EmsMessageConsumer : IMessageConsumer @@ -75,4 +72,4 @@ namespace Spring.Messaging.Ems.Common #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsMessageProducer.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsMessageProducer.cs index eda35068..a855d669 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsMessageProducer.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsMessageProducer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,8 +18,6 @@ #endregion -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Common { public class EmsMessageProducer : IMessageProducer @@ -116,4 +114,4 @@ namespace Spring.Messaging.Ems.Common #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsSSLFileStoreInfo.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsSSLFileStoreInfo.cs index f6ebe3d6..c6df042e 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsSSLFileStoreInfo.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsSSLFileStoreInfo.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -19,7 +19,6 @@ #endregion using System.Security.Cryptography.X509Certificates; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Common { @@ -59,4 +58,4 @@ namespace Spring.Messaging.Ems.Common } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsSSLSystemStoreInfo.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsSSLSystemStoreInfo.cs index 868cea96..b5d7a238 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsSSLSystemStoreInfo.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsSSLSystemStoreInfo.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -19,7 +19,6 @@ #endregion using System.Security.Cryptography.X509Certificates; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Common { @@ -55,4 +54,4 @@ namespace Spring.Messaging.Ems.Common set { EmssslSystemStoreInfo.SetCertificateStoreName(value); } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsSession.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsSession.cs index 71d606e8..3498ee89 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsSession.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsSession.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,8 +18,6 @@ #endregion -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Common { public class EmsSession : ISession @@ -66,7 +64,7 @@ namespace Spring.Messaging.Ems.Common public IMessageConsumer CreateConsumer(Destination dest) { return new EmsMessageConsumer(nativeSession.CreateConsumer(dest)); - + } public IMessageConsumer CreateConsumer(Destination dest, string messageSelector) @@ -156,7 +154,7 @@ namespace Spring.Messaging.Ems.Common public void Rollback() { - nativeSession.Rollback(); + nativeSession.Rollback(); } public void Run() @@ -207,4 +205,4 @@ namespace Spring.Messaging.Ems.Common #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsTopicSubscriber.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsTopicSubscriber.cs index ab85843e..15b62dc4 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsTopicSubscriber.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/EmsTopicSubscriber.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,8 +18,6 @@ #endregion -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Common { public class EmsTopicSubscriber : EmsMessageConsumer, ITopicSubscriber @@ -43,4 +41,4 @@ namespace Spring.Messaging.Ems.Common #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IConnection.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IConnection.cs index 56e5ec15..a3dd1f4c 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IConnection.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IConnection.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,9 +18,7 @@ #endregion -using System; using System.ComponentModel; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Common { @@ -74,7 +72,7 @@ namespace Spring.Messaging.Ems.Common /// true if the connection is closed; otherwise, false. bool IsClosed { get; } - /// + /// /// Gets a value indicating whether the connection communicates with a secure protocol /// /// true if the connection communicates with a secure protocol; otherwise, false. @@ -88,7 +86,7 @@ namespace Spring.Messaging.Ems.Common ConnectionMetaData MetaData { get; } /// - /// Closes the connection and reclaims resources. + /// Closes the connection and reclaims resources. /// void Close(); @@ -99,7 +97,7 @@ namespace Spring.Messaging.Ems.Common /// Indicates whether and how the consumer is to acknowledge received messages. /// This version of CreateSession accepts an integer value associated with the acknowledge mode described by a Session member and should only be used for backward compatibility. /// This parameter is ignored if the session is transacted. - /// A newly created session. + /// A newly created session. ISession CreateSession(bool transacted, int acknowledgeMode); /// @@ -108,29 +106,29 @@ namespace Spring.Messaging.Ems.Common /// if set to true [transacted]. /// The acknowledge mode. /// When true, the new session has transaction semantics. - /// Indicates whether and how the consumer is to acknowledge received messages. - /// Legal values are listed under SessionMode. - /// This parameter is ignored if the session is transacted. + /// Indicates whether and how the consumer is to acknowledge received messages. + /// Legal values are listed under SessionMode. + /// This parameter is ignored if the session is transacted. /// /// A newly created session. ISession CreateSession(bool transacted, SessionMode acknowledgeMode); /// - /// Starts (or restarts) a connection's delivery of incoming messages. + /// Starts (or restarts) a connection's delivery of incoming messages. /// void Start(); /// - /// Temporarily stops a connection's delivery of incoming messages. + /// Temporarily stops a connection's delivery of incoming messages. /// void Stop(); /// - /// A String representation of the connection object + /// A String representation of the connection object /// /// /// A that represents this instance. /// string ToString(); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IConnectionFactory.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IConnectionFactory.cs index c4d47df3..d56c84d8 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IConnectionFactory.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IConnectionFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,15 +18,12 @@ #endregion -using System; -using System.IO; using System.Runtime.Serialization; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Common { /// - /// An interface containing all methods and properties on the TIBCO.EMS.ConnectionFactory class. + /// An interface containing all methods and properties on the TIBCO.EMS.ConnectionFactory class. /// Refer to the TIBCO EMS API documentation for more information. /// /// @@ -56,7 +53,7 @@ namespace Spring.Messaging.Ems.Common IConnection CreateConnection(string userName, string password); /// - /// Gets the certificate store info object associated with this connection factory. + /// Gets the certificate store info object associated with this connection factory. /// /// The certificate store. object CertificateStore { get; } @@ -110,7 +107,7 @@ namespace Spring.Messaging.Ems.Common int ConnAttemptCount { set; } /// - /// Sets delay between connection attempts + /// Sets delay between connection attempts /// /// The delay between connection attempts. int ConnAttemptDelay { set; } @@ -122,7 +119,7 @@ namespace Spring.Messaging.Ems.Common int ConnAttemptTimeout { set; } /// - /// Sets the custom host name verifier. Set to null to remove custom host name verifier. + /// Sets the custom host name verifier. Set to null to remove custom host name verifier. /// /// The host name verifier. EMSSSLHostNameVerifier HostNameVerifier { set; } @@ -144,15 +141,15 @@ namespace Spring.Messaging.Ems.Common /// /// true to enable multicast; false to disable. bool MulticastEnabled { set; } - + int ReconnAttemptCount { set; } - + int ReconnAttemptDelay { set; } - + int ReconnAttemptTimeout { set; } - + string ServerUrl { set; } - + bool SSLAuthOnly { set; } string SSLProxyAuthUsername { set; get; } @@ -160,15 +157,15 @@ namespace Spring.Messaging.Ems.Common string SSLProxyAuthPassword { set; get; } bool SSLTrace { set; } - + string TargetHostName { set; } - + string UserName { set; } - + string UserPassword { set; } string ToString(); FactoryLoadBalanceMetric Metric { get; set; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IMessageConsumer.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IMessageConsumer.cs index 5acdff50..739f1def 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IMessageConsumer.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IMessageConsumer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,8 +18,6 @@ #endregion -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Common { public interface IMessageConsumer @@ -34,4 +32,4 @@ namespace Spring.Messaging.Ems.Common Message ReceiveNoWait(); string ToString(); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IMessageProducer.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IMessageProducer.cs index 894e0e4d..70eb58e4 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IMessageProducer.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/IMessageProducer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,8 +18,6 @@ #endregion -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Common { public interface IMessageProducer @@ -49,4 +47,4 @@ namespace Spring.Messaging.Ems.Common /// The message time to live in milliseconds; zero is unlimited long TimeToLive { get; set; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/ISession.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/ISession.cs index 1f18b0f3..eb519285 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/ISession.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/ISession.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,11 +18,8 @@ #endregion -using System; using System.ComponentModel; -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Common { public interface ISession @@ -91,4 +88,4 @@ namespace Spring.Messaging.Ems.Common SessionMode SessionAcknowledgeMode { get; } bool Transacted { get; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/ITopicSubscriber.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/ITopicSubscriber.cs index 83c3e09c..b369d7db 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/ITopicSubscriber.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Common/ITopicSubscriber.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,8 +18,6 @@ #endregion -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Common { public interface ITopicSubscriber : IMessageConsumer @@ -27,4 +25,4 @@ namespace Spring.Messaging.Ems.Common bool NoLocal { get; } Topic Topic { get; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Config/EmsNamespaceParser.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Config/EmsNamespaceParser.cs index 65f97a4b..1462f68e 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Config/EmsNamespaceParser.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Config/EmsNamespaceParser.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Objects.Factory.Xml; namespace Spring.Messaging.Ems.Config @@ -46,4 +45,4 @@ namespace Spring.Messaging.Ems.Config RegisterObjectDefinitionParser("listener-container", new MessageListenerContainerObjectDefinitionParser()); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Config/MessageListenerContainerObjectDefinitionParser.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Config/MessageListenerContainerObjectDefinitionParser.cs index 0e635d70..d73b9cd9 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Config/MessageListenerContainerObjectDefinitionParser.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Config/MessageListenerContainerObjectDefinitionParser.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Xml; using Spring.Core.TypeResolution; //using TIBCO.EMS; @@ -85,8 +84,8 @@ namespace Spring.Messaging.Ems.Config private readonly string RECOVERY_INTERVAL_ATTRIBUTE = "recovery-interval"; - private readonly string MAX_RECOVERY_TIME_ATTRIBUTE = "max-recovery-time"; - + private readonly string MAX_RECOVERY_TIME_ATTRIBUTE = "max-recovery-time"; + private readonly string CONNECTION_FACTORY_ATTRIBUTE = "connection-factory"; private readonly string CONTAINER_CUSTOM_TYPE = "container-custom-type"; @@ -98,7 +97,7 @@ namespace Spring.Messaging.Ems.Config private readonly string ERROR_HANDLER_ATTRIBUTE = "error-handler"; private readonly string EXCEPTION_LISTENER_ATTRIBUTE = "exception-listener"; - + #endregion #region IObjectDefinitionParser Members @@ -163,7 +162,7 @@ namespace Spring.Messaging.Ems.Config "Listener '" + METHOD_ATTRIBUTE + "' attribute contains empty value."); } - } + } } listenerDefBuilder.AddPropertyValue("DefaultHandlerMethod", handlerMethod); @@ -193,7 +192,7 @@ namespace Spring.Messaging.Ems.Config containerDefBuilder.AddPropertyValue("MessageListener", listenerDefBuilder.ObjectDefinition); string containerObjectName = listenerElement.GetAttribute(ID_ATTRIBUTE); - // If no object id is given auto generate one using the ReaderContext's ObjectNameGenerator + // If no object id is given auto generate one using the ReaderContext's ObjectNameGenerator if (!StringUtils.HasText(containerObjectName)) { containerObjectName = @@ -230,7 +229,7 @@ namespace Spring.Messaging.Ems.Config parserContext.ReaderContext.ReportException(containerElement, CONTAINER_CUSTOM_TYPE, "Invalid container-custom-type value [" + customType + "]", ex); } - } + } //Only support SimpleMessageListenerContainer ObjectDefinitionBuilder containerDef = parserContext.ParserHelper.CreateRootObjectDefinitionBuilder(containerType); @@ -297,7 +296,7 @@ namespace Spring.Messaging.Ems.Config } containerDef.AddPropertyValue("RecoveryInterval", ParseRecoveryInterval(containerElement, parserContext)); - containerDef.AddPropertyValue("MaxRecoveryTime", ParseMaxRecoveryTime(containerElement, parserContext)); + containerDef.AddPropertyValue("MaxRecoveryTime", ParseMaxRecoveryTime(containerElement, parserContext)); return containerDef; } @@ -422,7 +421,7 @@ namespace Spring.Messaging.Ems.Config else { return concurrency; - } + } } private string ParseRecoveryInterval(XmlElement ele, ParserContext parserContext) @@ -452,4 +451,4 @@ namespace Spring.Messaging.Ems.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachedMessageConsumer .cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachedMessageConsumer .cs index 735d1a99..2a3d96d9 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachedMessageConsumer .cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachedMessageConsumer .cs @@ -18,9 +18,7 @@ #endregion -using System; using Spring.Messaging.Ems.Common; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Connections { @@ -133,4 +131,4 @@ namespace Spring.Messaging.Ems.Connections return "Cached EMS MessageConsumer: " + this.target; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachedMessageProducer.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachedMessageProducer.cs index 14572768..6ee060c8 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachedMessageProducer.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachedMessageProducer.cs @@ -19,7 +19,6 @@ #endregion using Spring.Messaging.Ems.Common; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Connections { @@ -37,7 +36,7 @@ namespace Spring.Messaging.Ems.Connections private object originalDisableMessageTimestamp; - private MessageDeliveryMode deliveryMode; + private MessageDeliveryMode deliveryMode; private int priority; @@ -232,4 +231,4 @@ namespace Spring.Messaging.Ems.Connections return "Cached EMS MessageProducer: " + this.target; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachedSession.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachedSession.cs index e3758c2e..2f127392 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachedSession.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachedSession.cs @@ -20,7 +20,6 @@ using System.Collections; using Spring.Messaging.Ems.Common; -using TIBCO.EMS; using Common.Logging; using Spring.Collections; using Spring.Util; @@ -166,7 +165,7 @@ namespace Spring.Messaging.Ems.Connections { ((IMessageConsumer) dictionaryEntry.Value).Close(); ToRemove.Add(key); - } + } } foreach (ConsumerCacheKey key in ToRemove) { @@ -216,7 +215,7 @@ namespace Spring.Messaging.Ems.Connections } /// - /// Creates the consumer, potentially returning a cached instance. + /// Creates the consumer, potentially returning a cached instance. /// /// The destination. /// A message consumer @@ -227,7 +226,7 @@ namespace Spring.Messaging.Ems.Connections /// - /// Creates the consumer, potentially returning a cached instance. + /// Creates the consumer, potentially returning a cached instance. /// /// The destination. /// The selector. @@ -497,13 +496,13 @@ namespace Spring.Messaging.Ems.Connections public void Recover() { this.transactionOpen = true; - target.Recover(); + target.Recover(); } public void Run() { this.transactionOpen = true; - target.Run(); + target.Run(); } public void Unsubscribe(string name) @@ -576,7 +575,7 @@ namespace Spring.Messaging.Ems.Connections public bool IsClosed { - get { + get { this.transactionOpen = true; return target.IsClosed; } @@ -646,4 +645,4 @@ namespace Spring.Messaging.Ems.Connections return destination.GetHashCode(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachingConnectionFactory.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachingConnectionFactory.cs index ec4a131c..a9c5a544 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachingConnectionFactory.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/CachingConnectionFactory.cs @@ -18,13 +18,9 @@ #endregion -using System; using System.Collections; using Spring.Messaging.Ems.Common; - -using TIBCO.EMS; - using Common.Logging; using Spring.Collections; @@ -58,7 +54,7 @@ namespace Spring.Messaging.Ems.Connections /// Session handle is not supported; close and reobtain a cached Session first. /// /// - /// + /// /// Juergen Hoeller /// Mark Pollack (.NET) public class CachingConnectionFactory : SingleConnectionFactory @@ -125,8 +121,8 @@ namespace Spring.Messaging.Ems.Connections } /// - /// Gets or sets a value indicating whether to cache MessageProducers per - /// Session instance. (more specifically: one MessageProducer per Destination + /// Gets or sets a value indicating whether to cache MessageProducers per + /// Session instance. (more specifically: one MessageProducer per Destination /// and Session). /// /// @@ -142,8 +138,8 @@ namespace Spring.Messaging.Ems.Connections } /// - /// Gets or sets a value indicating whether o cache JMS MessageConsumers per - /// EMS Session instance. + /// Gets or sets a value indicating whether o cache JMS MessageConsumers per + /// EMS Session instance. /// /// /// Mmore specifically: one MessageConsumer per Destination, selector String @@ -273,4 +269,4 @@ namespace Spring.Messaging.Ems.Connections return new CachedSession(targetSession, sessionList, this); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/ChainedExceptionListener.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/ChainedExceptionListener.cs index c43d9969..b75f16a8 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/ChainedExceptionListener.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/ChainedExceptionListener.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -20,7 +20,6 @@ using System.Collections; using Spring.Util; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Connections { @@ -68,4 +67,4 @@ namespace Spring.Messaging.Ems.Connections } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/ConnectionFactoryUtils.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/ConnectionFactoryUtils.cs index b115c220..5323e1a1 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/ConnectionFactoryUtils.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/ConnectionFactoryUtils.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,13 +18,11 @@ #endregion -using System; using Common.Logging; using Spring.Messaging.Ems.Common; using Spring.Messaging.Ems.Support; using Spring.Transaction.Support; using Spring.Util; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Connections { @@ -45,7 +43,7 @@ namespace Spring.Messaging.Ems.Connections /// Releases the given connection, stopping it (if necessary) and eventually closing it. /// /// Checks , if available. - /// This is essentially a more sophisticated version of + /// This is essentially a more sophisticated version of /// /// /// The connection to release. (if this is null, the call will be ignored) @@ -279,7 +277,7 @@ namespace Spring.Messaging.Ems.Connections public virtual ISession CreateSession(IConnection con) { - return con.CreateSession(synchedLocalTransactionAllowed, Session.SESSION_TRANSACTED); + return con.CreateSession(synchedLocalTransactionAllowed, Session.SESSION_TRANSACTED); } public bool SynchedLocalTransactionAllowed @@ -335,7 +333,7 @@ namespace Spring.Messaging.Ems.Connections /// committing right after the main transaction. /// Returns whether to allow for synchronizing a local EMS transaction /// - /// + /// bool SynchedLocalTransactionAllowed { get; } } @@ -410,4 +408,4 @@ namespace Spring.Messaging.Ems.Connections #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/EmsResourceHolder.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/EmsResourceHolder.cs index 81e01d07..5c5c5249 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/EmsResourceHolder.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/EmsResourceHolder.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,14 +18,12 @@ #endregion -using System; using System.Collections; using Common.Logging; using Spring.Collections; using Spring.Messaging.Ems.Common; using Spring.Transaction.Support; using Spring.Util; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Connections { @@ -118,11 +116,11 @@ namespace Spring.Messaging.Ems.Connections this.frozen = true; } #endregion - + #region Properties /// - /// Gets a value indicating whether this is frozen, namely that + /// Gets a value indicating whether this is frozen, namely that /// additional resources can be registered with the holder. If using any of the constructors with /// a Session, the holder will be set to the frozen state. /// @@ -276,7 +274,7 @@ namespace Spring.Messaging.Ems.Connections } this.connections.Clear(); this.sessions.Clear(); - this.sessionsPerConnection.Clear(); + this.sessionsPerConnection.Clear(); } /// diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/EmsTransactionManager.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/EmsTransactionManager.cs index efa3ea9f..47151883 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/EmsTransactionManager.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/EmsTransactionManager.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Data; using Common.Logging; using Spring.Messaging.Ems.Common; @@ -26,13 +25,12 @@ using Spring.Messaging.Ems.Core; using Spring.Objects.Factory; using Spring.Transaction; using Spring.Transaction.Support; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Connections { /// /// A implementation - /// for a single EMS ConnectionFactory. Binds a + /// for a single EMS ConnectionFactory. Binds a /// Connection/Session pair from the specified ConnecctionFactory to the thread, /// potentially allowing for one thread-bound Session per ConnectionFactory. /// @@ -40,7 +38,7 @@ namespace Spring.Messaging.Ems.Connections /// /// Application code is required to retrieve the transactional Session via /// . Spring's - /// will autodetect a thread-bound Session and + /// will autodetect a thread-bound Session and /// automatically participate in it. /// /// @@ -51,7 +49,7 @@ namespace Spring.Messaging.Ems.Connections /// /// Juergen Hoeller /// Mark Pollack (.NET) - public class EmsTransactionManager : AbstractPlatformTransactionManager, + public class EmsTransactionManager : AbstractPlatformTransactionManager, IResourceTransactionManager, IInitializingObject { @@ -59,7 +57,7 @@ namespace Spring.Messaging.Ems.Connections private static readonly ILog LOG = LogManager.GetLogger(typeof(EmsTransactionManager)); - #endregion + #endregion private IConnectionFactory connectionFactory; @@ -67,7 +65,7 @@ namespace Spring.Messaging.Ems.Connections /// Initializes a new instance of the class. /// /// - /// The ConnectionFactory has to be set before using the instance. + /// The ConnectionFactory has to be set before using the instance. /// This constructor can be used to prepare a EmsTemplate via a ApplicationContext, /// typically setting the ConnectionFactory via ConnectionFactory property. /// @@ -192,7 +190,7 @@ namespace Spring.Messaging.Ems.Connections txObject.ResourceHolder.TimeoutInSeconds = timeout; } TransactionSynchronizationManager.BindResource(ConnectionFactory, txObject.ResourceHolder); - + } catch (EMSException ex) @@ -214,7 +212,7 @@ namespace Spring.Messaging.Ems.Connections } throw new CannotCreateTransactionException("Could not create EMS Transaction", ex); } - + } /// @@ -281,7 +279,7 @@ namespace Spring.Messaging.Ems.Connections throw new UnexpectedRollbackException("EMS transaction rolled back", ex); } catch (EMSException ex) - { + { throw new TransactionSystemException("Could not commit EMS transaction.", ex); } } @@ -303,7 +301,7 @@ namespace Spring.Messaging.Ems.Connections { LOG.Debug("Rolling back EMS transaction on Session [" + session + "]"); } - session.Rollback(); + session.Rollback(); } catch (EMSException ex) { @@ -416,4 +414,4 @@ namespace Spring.Messaging.Ems.Connections #endregion } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/ISmartConnectionFactory.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/ISmartConnectionFactory.cs index da96b57d..ac64bbed 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/ISmartConnectionFactory.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/ISmartConnectionFactory.cs @@ -1,4 +1,4 @@ - + #region License @@ -21,12 +21,11 @@ #endregion using Spring.Messaging.Ems.Common; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Connections { /// - /// Extension of the IConnectionFactory interface, + /// Extension of the IConnectionFactory interface, /// indicating how to release Connections obtained from it. /// /// Juergen Hoeller @@ -40,4 +39,4 @@ namespace Spring.Messaging.Ems.Connections /// wheter a stop call is necessary bool ShouldStop(IConnection con); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/SingleConnectionFactory.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/SingleConnectionFactory.cs index 1f88d6a0..0c63af02 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/SingleConnectionFactory.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/SingleConnectionFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,11 +18,8 @@ #endregion -using System; -using System.IO; using System.Runtime.Serialization; using Spring.Messaging.Ems.Support; -using TIBCO.EMS; using Common.Logging; using Spring.Messaging.Ems.Core; using Spring.Messaging.Ems.Common; @@ -35,7 +32,7 @@ namespace Spring.Messaging.Ems.Connections /// A ConnectionFactory adapter that returns the same Connection /// from all CreateConnection() calls, and ignores calls to /// Connection.Close(). According to the JMS Connection - /// model, this is perfectly thread-safe. The + /// model, this is perfectly thread-safe. The /// shared Connection can be automatically recovered in case of an Exception. /// /// @@ -89,7 +86,7 @@ namespace Spring.Messaging.Ems.Connections /// - /// Whether the shared Connection has been started + /// Whether the shared Connection has been started /// private bool started = false; @@ -365,7 +362,7 @@ namespace Spring.Messaging.Ems.Connections sslProxyHostSet = true; } } - + public int SSLProxyPort { get { return TargetConnectionFactory.SSLProxyPort;} @@ -510,7 +507,7 @@ namespace Spring.Messaging.Ems.Connections /// The connection to operate on. /// The session ack mode. /// the Session to use, or null to indicate - /// creation of a raw standard Session + /// creation of a raw standard Session public virtual ISession GetSession(IConnection con, SessionMode mode) { return null; @@ -544,7 +541,7 @@ namespace Spring.Messaging.Ems.Connections if (this.started) { this.started = false; - con.Stop(); + con.Stop(); } } finally { @@ -567,7 +564,7 @@ namespace Spring.Messaging.Ems.Connections { throw new ArgumentException("Connection or 'TargetConnectionFactory' is required."); } - // Note this is repeated in EmsConnectionFactory as this class only refers to IConnectionFactory and + // Note this is repeated in EmsConnectionFactory as this class only refers to IConnectionFactory and // IConnectionFactory does not implement the spring specific lifecycle interface IInitializingObject if (sslProxyAuthUsernameSet || sslProxyAuthPasswordSet) { @@ -584,7 +581,7 @@ namespace Spring.Messaging.Ems.Connections /// /// Close the underlying shared connection. The provider of this ConnectionFactory needs to care for proper shutdown. - /// As this object implements an application context will automatically + /// As this object implements an application context will automatically /// invoke this on distruction o /// public void Dispose() @@ -684,9 +681,9 @@ namespace Spring.Messaging.Ems.Connections throw new IllegalStateException( "Setting of 'ClientID' property not supported on wrapper for shared Connection since" + "this is a shared connection that may serve any number of clients concurrently." + - "Set the 'ClientId' property on the SingleConnectionFactory instead."); + "Set the 'ClientId' property on the SingleConnectionFactory instead."); } - + } } @@ -745,7 +742,7 @@ namespace Spring.Messaging.Ems.Connections } } set - { + { IExceptionListener currentExceptionListener = target.ExceptionListener; if (value != null && currentExceptionListener is InternalChainedExceptionListener) { @@ -757,7 +754,7 @@ namespace Spring.Messaging.Ems.Connections "Set the 'ExceptionListener' property on the SingleConnectionFactory instead. " + "Alternatively, activate SingleConnectionFactory's 'reconnectOnException' feature, " + "which will allow for registering further ExceptionListeners to the recovery chain."); - } + } } } @@ -772,7 +769,7 @@ namespace Spring.Messaging.Ems.Connections } remove { - target.EMSExceptionHandler -= value; + target.EMSExceptionHandler -= value; } } @@ -811,4 +808,4 @@ namespace Spring.Messaging.Ems.Connections } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/SynchedLocalTransactionFailedException.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/SynchedLocalTransactionFailedException.cs index 328f375b..db2eb3cc 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/SynchedLocalTransactionFailedException.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Connections/SynchedLocalTransactionFailedException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,9 +18,6 @@ #endregion -using System; -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Connections { /// Exception thrown when a synchronized local transaction failed to complete diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/BrowserDelegate.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/BrowserDelegate.cs index c7703d81..39edf505 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/BrowserDelegate.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/BrowserDelegate.cs @@ -1,4 +1,4 @@ - + #region License @@ -21,12 +21,11 @@ #endregion using Spring.Messaging.Ems.Common; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Core { /// /// Delegate callback for browsing the messages in an EMS queue. /// - public delegate object BrowserDelegate(ISession session, QueueBrowser browser); -} \ No newline at end of file + public delegate object BrowserDelegate(ISession session, QueueBrowser browser); +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/EmsGatewaySupport.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/EmsGatewaySupport.cs index 6f159263..632c1524 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/EmsGatewaySupport.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/EmsGatewaySupport.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,11 +18,9 @@ #endregion -using System; using Common.Logging; using Spring.Messaging.Ems.Common; using Spring.Objects.Factory; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Core { diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/EmsTemplate.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/EmsTemplate.cs index f98161ce..949f6b2d 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/EmsTemplate.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/EmsTemplate.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,7 +18,6 @@ #endregion -using System; using Common.Logging; using Spring.Messaging.Ems.Common; using Spring.Messaging.Ems.Connections; @@ -27,7 +26,6 @@ using Spring.Messaging.Ems.Support.Converter; using Spring.Messaging.Ems.Support.Destinations; using Spring.Transaction.Support; using Spring.Util; -using TIBCO.EMS; using Queue=TIBCO.EMS.Queue; namespace Spring.Messaging.Ems.Core @@ -61,7 +59,7 @@ namespace Spring.Messaging.Ems.Core /// /// Timeout value indicating that a receive operation should - /// check if a message is immediately available without blocking. + /// check if a message is immediately available without blocking. /// public static readonly long DEFAULT_RECEIVE_TIMEOUT = -1; @@ -87,7 +85,7 @@ namespace Spring.Messaging.Ems.Core private int deliveryMode = Message.DEFAULT_DELIVERY_MODE; private long timeToLive = Message.DEFAULT_TIME_TO_LIVE; - + #endregion #region Constructor (s) @@ -191,7 +189,7 @@ namespace Spring.Messaging.Ems.Core ISession sessionToClose = null; // bool sessionInTLS = true; - //NOTE: Not closing session or connection unless session is not returned from + //NOTE: Not closing session or connection unless session is not returned from // ConnectionFactoryUtils.DoGetTransactionalSession and CacheEmsResources is set to false try { @@ -355,7 +353,7 @@ namespace Spring.Messaging.Ems.Core virtual public int DeliveryMode { get { return deliveryMode; } - + set { deliveryMode = value; } } @@ -385,7 +383,7 @@ namespace Spring.Messaging.Ems.Core set { timeToLive = value; } } - /* + /* /// /// Gets or sets a value indicating whether the EmsTemplate should itself /// be responsible for caching EMS Connection/Session/MessageProducer as compared to @@ -480,7 +478,7 @@ namespace Spring.Messaging.Ems.Core /// /// Determines whether the given Session is locally transacted, that is, whether /// its transaction is managed by this template class's Session handling - /// and not by an external transaction coordinator. + /// and not by an external transaction coordinator. /// /// /// The Session's own transacted flag will already have been checked @@ -499,7 +497,7 @@ namespace Spring.Messaging.Ems.Core /// Create a raw EMS MessageProducer for the given Session and Destination. /// - /// If CacheJmsResource is true, then the producer + /// If CacheJmsResource is true, then the producer /// will be created upon the first invocation and will retrun the same /// producer (per destination) on all subsequent calls. /// @@ -554,7 +552,7 @@ namespace Spring.Messaging.Ems.Core else { return session.CreateProducer(destination); - }*/ + }*/ } /// Create a EMS MessageConsumer for the given Session and Destination. @@ -586,7 +584,7 @@ namespace Spring.Messaging.Ems.Core /* /// Create a EMS Connection via this template's ConnectionFactory. /// - /// If CacheJmsResource is true, then the connection + /// If CacheJmsResource is true, then the connection /// will be created upon the first invocation and will retrun the same /// connection on all subsequent calls. /// @@ -612,7 +610,7 @@ namespace Spring.Messaging.Ems.Core /* /// Create a EMS Session for the given Connection. /// - /// If CacheJmsResource is true, then the session + /// If CacheJmsResource is true, then the session /// will be created upon the first invocation and will retrun the same /// session on all subsequent calls. /// @@ -676,10 +674,10 @@ namespace Spring.Messaging.Ems.Core { - IMessageProducer producer = CreateProducer(session, destination); + IMessageProducer producer = CreateProducer(session, destination); try { - + Message message; if (messageCreator != null) { @@ -869,7 +867,7 @@ namespace Spring.Messaging.Ems.Core /// If there is any problem accessing the EMS API public void Send(Destination destination, IMessageCreator messageCreator) { - + Execute(new SendDestinationCallback(this, destination, messageCreator), false); } @@ -971,7 +969,7 @@ namespace Spring.Messaging.Ems.Core { CheckMessageConverter(); Send(destination, new ConvertAndSendMessageCreator(this, message, postProcessor)); - + } /// Send the given object to the specified destination, converting the object @@ -989,7 +987,7 @@ namespace Spring.Messaging.Ems.Core public void ConvertAndSend(string destinationName, object message, IMessagePostProcessor postProcessor) { CheckMessageConverter(); - Send(destinationName, new ConvertAndSendMessageCreator(this, message, postProcessor)); + Send(destinationName, new ConvertAndSendMessageCreator(this, message, postProcessor)); } /// /// Send the given object to the default destination, converting the object @@ -1162,7 +1160,7 @@ namespace Spring.Messaging.Ems.Core public Message ReceiveSelected(string destinationName, string messageSelector) { return Execute(new ReceiveSelectedCallback(this, destinationName, messageSelector), true) as Message; - + } /// @@ -1342,7 +1340,7 @@ namespace Spring.Messaging.Ems.Core /// /// The action callback object that exposes the session/browser pair. /// the result object from working with the session - /// If there is any problem accessing the EMS API + /// If there is any problem accessing the EMS API public object Browse(IBrowserCallback action) { AssertUtils.ArgumentNotNull(action, "action"); @@ -1356,7 +1354,7 @@ namespace Spring.Messaging.Ems.Core /// The queue to browse. /// The action callback object that exposes the session/browser pair. /// the result object from working with the session - /// If there is any problem accessing the EMS API + /// If there is any problem accessing the EMS API public object Browse(Queue queue, IBrowserCallback action) { AssertUtils.ArgumentNotNull(action, "action"); @@ -1367,7 +1365,7 @@ namespace Spring.Messaging.Ems.Core /// Browses messages in a EMS queue. The callback gives access to the EMS Session /// and QueueBrowser in order to browse the queue and react to the contents. /// - /// Name of the queue to browse, + /// Name of the queue to browse, /// (to be resolved to an actual destination by a DestinationResolver) /// The action callback object that exposes the session/browser pair. /// If there is any problem accessing the EMS API @@ -1402,7 +1400,7 @@ namespace Spring.Messaging.Ems.Core public object BrowseSelected(Queue queue, string messageSelector, IBrowserCallback action) { AssertUtils.ArgumentNotNull(action, "action"); - return BrowseSelectedWithDelegate(queue, messageSelector, action.DoInEms); + return BrowseSelectedWithDelegate(queue, messageSelector, action.DoInEms); } @@ -1410,7 +1408,7 @@ namespace Spring.Messaging.Ems.Core /// Browses messages in a EMS queue. The callback gives access to the EMS Session /// and QueueBrowser in order to browse the queue and react to the contents. /// - /// Name of the queue to browse, + /// Name of the queue to browse, /// (to be resolved to an actual destination by a DestinationResolver) /// The EMS message selector expression (or null if none). /// The action callback object that exposes the session/browser pair. @@ -1463,7 +1461,7 @@ namespace Spring.Messaging.Ems.Core /// Browses messages in a EMS queue. The callback gives access to the EMS Session /// and QueueBrowser in order to browse the queue and react to the contents. /// - /// Name of the queue to browse, + /// Name of the queue to browse, /// (to be resolved to an actual destination by a DestinationResolver) /// The action callback delegate that exposes the session/browser pair. /// If there is any problem accessing the EMS API @@ -1519,14 +1517,14 @@ namespace Spring.Messaging.Ems.Core { EmsUtils.CloseQueueBrowser(browser); } - }, true); + }, true); } /// /// Browses messages in a EMS queue. The callback gives access to the EMS Session /// and QueueBrowser in order to browse the queue and react to the contents. /// - /// Name of the queue to browse, + /// Name of the queue to browse, /// (to be resolved to an actual destination by a DestinationResolver) /// The EMS message selector expression (or null if none). /// The action callback delegate that exposes the session/browser pair. @@ -1547,7 +1545,7 @@ namespace Spring.Messaging.Ems.Core { EmsUtils.CloseQueueBrowser(browser); } - }, true); + }, true); } #endregion @@ -1573,7 +1571,7 @@ namespace Spring.Messaging.Ems.Core private class EmsTemplateResourceFactory : ConnectionFactoryUtils.ResourceFactory { private EmsTemplate enclosingTemplateInstance; - + public EmsTemplateResourceFactory(EmsTemplate enclosingInstance) { InitBlock(enclosingInstance); @@ -1687,7 +1685,7 @@ namespace Spring.Messaging.Ems.Core jmsTemplate.ResolveDestinationName(session, destinationName), null); } - + } } @@ -1780,7 +1778,7 @@ namespace Spring.Messaging.Ems.Core return del(session); } } - + #endregion } @@ -1827,7 +1825,7 @@ namespace Spring.Messaging.Ems.Core { private EmsTemplate jmsTemplate; private object objectToConvert; - + public SimpleMessageCreator(EmsTemplate jmsTemplate, object objectToConvert) { this.jmsTemplate = jmsTemplate; diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IBrowserCallback.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IBrowserCallback.cs index f8177960..653e0ded 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IBrowserCallback.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IBrowserCallback.cs @@ -1,4 +1,4 @@ - + #region License @@ -21,7 +21,6 @@ #endregion using Spring.Messaging.Ems.Common; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Core { @@ -45,4 +44,4 @@ namespace Spring.Messaging.Ems.Core /// If there is any problem when accessing EMS API object DoInEms(ISession session, QueueBrowser browser); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IEmsOperations.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IEmsOperations.cs index 6cf17fa1..a55152ab 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IEmsOperations.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IEmsOperations.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,8 +18,6 @@ #endregion -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Core { /// Specifies a basic set of EMS operations. @@ -27,7 +25,7 @@ namespace Spring.Messaging.Ems.Core /// ///

Implemented by EmsTemplate. Not often used but a useful option /// to enhance testability, as it can easily be mocked or stubbed.

- /// + /// ///

Provides EmsTemplate's send(..) and /// receive(..) methods that mirror various EMS API methods. /// See the EMS specification and EMS API docs for details on those methods. @@ -56,7 +54,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API object Execute(ISessionCallback action); - + ///

Send a message to a EMS destination. The callback gives access to /// the EMS session and MessageProducer in order to do more complex /// send operations. @@ -78,12 +76,12 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API object Execute(ProducerDelegate del); - - + + //------------------------------------------------------------------------- // Convenience methods for sending messages //------------------------------------------------------------------------- - + /// Send a message to the default destination. ///

This will only work with a default destination specified!

///
@@ -91,7 +89,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API void Send(IMessageCreator messageCreator); - + /// Send a message to the specified destination. /// The IMessageCreator callback creates the message given a Session. /// @@ -101,7 +99,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API void Send(Destination destination, IMessageCreator messageCreator); - + /// Send a message to the specified destination. /// The IMessageCreator callback creates the message given a Session. /// @@ -145,11 +143,11 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API void SendWithDelegate(string destinationName, MessageCreatorDelegate messageCreatorDelegate); - + //------------------------------------------------------------------------- // Convenience methods for sending auto-converted messages //------------------------------------------------------------------------- - + /// Send the given object to the default destination, converting the object /// to a EMS message with a configured IMessageConverter. ///

This will only work with a default destination specified!

@@ -158,7 +156,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API void ConvertAndSend(object message); - + /// Send the given object to the specified destination, converting the object /// to a EMS message with a configured IMessageConverter. /// @@ -168,7 +166,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API void ConvertAndSend(Destination destination, object message); - + /// Send the given object to the specified destination, converting the object /// to a EMS message with a configured IMessageConverter. /// @@ -179,7 +177,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API void ConvertAndSend(string destinationName, object message); - + /// Send the given object to the default destination, converting the object /// to a EMS message with a configured IMessageConverter. The IMessagePostProcessor /// callback allows for modification of the message after conversion. @@ -191,7 +189,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API void ConvertAndSend(object message, IMessagePostProcessor postProcessor); - + /// Send the given object to the specified destination, converting the object /// to a EMS message with a configured IMessageConverter. The IMessagePostProcessor /// callback allows for modification of the message after conversion. @@ -204,7 +202,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API void ConvertAndSend(Destination destination, object message, IMessagePostProcessor postProcessor); - + /// Send the given object to the specified destination, converting the object /// to a EMS message with a configured IMessageConverter. The IMessagePostProcessor /// callback allows for modification of the message after conversion. @@ -258,7 +256,7 @@ namespace Spring.Messaging.Ems.Core //------------------------------------------------------------------------- // Convenience methods for receiving messages //------------------------------------------------------------------------- - + /// Receive a message synchronously from the default destination, but only /// wait up to a specified time for delivery. ///

This method should be used carefully, since it will block the thread @@ -269,7 +267,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API Message Receive(); - + ///

Receive a message synchronously from the specified destination, but only /// wait up to a specified time for delivery. ///

This method should be used carefully, since it will block the thread @@ -281,7 +279,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API Message Receive(Destination destination); - + ///

Receive a message synchronously from the specified destination, but only /// wait up to a specified time for delivery. ///

This method should be used carefully, since it will block the thread @@ -294,7 +292,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API Message Receive(string destinationName); - + ///

Receive a message synchronously from the default destination, but only /// wait up to a specified time for delivery. ///

This method should be used carefully, since it will block the thread @@ -308,7 +306,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API Message ReceiveSelected(string messageSelector); - + ///

Receive a message synchronously from the specified destination, but only /// wait up to a specified time for delivery. ///

This method should be used carefully, since it will block the thread @@ -323,7 +321,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API Message ReceiveSelected(Destination destination, string messageSelector); - + ///

Receive a message synchronously from the specified destination, but only /// wait up to a specified time for delivery. ///

This method should be used carefully, since it will block the thread @@ -339,12 +337,12 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API Message ReceiveSelected(string destinationName, string messageSelector); - - + + //------------------------------------------------------------------------- // Convenience methods for receiving auto-converted messages //------------------------------------------------------------------------- - + ///

Receive a message synchronously from the default destination, but only /// wait up to a specified time for delivery. Convert the message into an /// object with a configured IMessageConverter. @@ -356,7 +354,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API object ReceiveAndConvert(); - + /// Receive a message synchronously from the specified destination, but only /// wait up to a specified time for delivery. Convert the message into an /// object with a configured IMessageConverter. @@ -369,7 +367,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API object ReceiveAndConvert(Destination destination); - + /// Receive a message synchronously from the specified destination, but only /// wait up to a specified time for delivery. Convert the message into an /// object with a configured IMessageConverter. @@ -383,7 +381,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API object ReceiveAndConvert(string destinationName); - + /// Receive a message synchronously from the default destination, but only /// wait up to a specified time for delivery. Convert the message into an /// object with a configured IMessageConverter. @@ -398,7 +396,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API object ReceiveSelectedAndConvert(string messageSelector); - + /// Receive a message synchronously from the specified destination, but only /// wait up to a specified time for delivery. Convert the message into an /// object with a configured IMessageConverter. @@ -414,7 +412,7 @@ namespace Spring.Messaging.Ems.Core /// /// If there is any problem accessing the EMS API object ReceiveSelectedAndConvert(Destination destination, string messageSelector); - + /// Receive a message synchronously from the specified destination, but only /// wait up to a specified time for delivery. Convert the message into an /// object with a configured IMessageConverter. @@ -439,7 +437,7 @@ namespace Spring.Messaging.Ems.Core /// /// The action callback object that exposes the session/browser pair. /// the result object from working with the session - /// If there is any problem accessing the EMS API + /// If there is any problem accessing the EMS API object Browse(IBrowserCallback action); @@ -450,14 +448,14 @@ namespace Spring.Messaging.Ems.Core /// The queue to browse. /// The action callback object that exposes the session/browser pair. /// the result object from working with the session - /// If there is any problem accessing the EMS API + /// If there is any problem accessing the EMS API object Browse(Queue queue, IBrowserCallback action); /// /// Browses messages in a EMS queue. The callback gives access to the EMS Session /// and QueueBrowser in order to browse the queue and react to the contents. /// - /// Name of the queue to browse, + /// Name of the queue to browse, /// (to be resolved to an actual destination by a DestinationResolver) /// The action callback object that exposes the session/browser pair. /// If there is any problem accessing the EMS API @@ -489,7 +487,7 @@ namespace Spring.Messaging.Ems.Core /// Browses messages in a EMS queue. The callback gives access to the EMS Session /// and QueueBrowser in order to browse the queue and react to the contents. /// - /// Name of the queue to browse, + /// Name of the queue to browse, /// (to be resolved to an actual destination by a DestinationResolver) /// The EMS message selector expression (or null if none). /// The action callback object that exposes the session/browser pair. @@ -518,7 +516,7 @@ namespace Spring.Messaging.Ems.Core /// Browses messages in a EMS queue. The callback gives access to the EMS Session /// and QueueBrowser in order to browse the queue and react to the contents. /// - /// Name of the queue to browse, + /// Name of the queue to browse, /// (to be resolved to an actual destination by a DestinationResolver) /// The action callback delegate that exposes the session/browser pair. /// If there is any problem accessing the EMS API @@ -550,13 +548,13 @@ namespace Spring.Messaging.Ems.Core /// Browses messages in a EMS queue. The callback gives access to the EMS Session /// and QueueBrowser in order to browse the queue and react to the contents. /// - /// Name of the queue to browse, + /// Name of the queue to browse, /// (to be resolved to an actual destination by a DestinationResolver) /// The EMS message selector expression (or null if none). /// The action callback delegate that exposes the session/browser pair. /// /// If there is any problem accessing the EMS API object BrowseSelectedWithDelegate(string queueName, string messageSelector, BrowserDelegate action); - + } } diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IMessageCreator.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IMessageCreator.cs index 9f6f51c4..cce43236 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IMessageCreator.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IMessageCreator.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -19,7 +19,6 @@ #endregion using Spring.Messaging.Ems.Common; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Core { diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IMessagePostProcessor.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IMessagePostProcessor.cs index 3d6f9c90..a6b6b729 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IMessagePostProcessor.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/IMessagePostProcessor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,8 +18,6 @@ #endregion -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Core { /// To be used with EmsTemplate's send method that @@ -41,6 +39,6 @@ namespace Spring.Messaging.Ems.Core /// /// EMSException if thrown by EMS API methods Message PostProcessMessage(Message message); - + } } diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/MessageCreatorDelegate.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/MessageCreatorDelegate.cs index 71f0938a..40357972 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/MessageCreatorDelegate.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/MessageCreatorDelegate.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -19,7 +19,6 @@ #endregion using Spring.Messaging.Ems.Common; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Core { @@ -27,7 +26,7 @@ namespace Spring.Messaging.Ems.Core /// Delegate that creates a EMS message given a Session /// /// the EMS Session to be used to create the - /// Message (never null) + /// Message (never null) /// /// the Message to be sent /// diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/MessagePostProcessorDelegate.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/MessagePostProcessorDelegate.cs index 3286c610..acb5be52 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/MessagePostProcessorDelegate.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Core/MessagePostProcessorDelegate.cs @@ -18,8 +18,6 @@ #endregion -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Core { @@ -33,4 +31,4 @@ namespace Spring.Messaging.Ems.Core /// /// Mark Pollack public delegate Message MessagePostProcessorDelegate(Message message); -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiAccessor.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiAccessor.cs index 453d0a71..d713e0b7 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiAccessor.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiAccessor.cs @@ -21,7 +21,6 @@ using System.Collections; using Common.Logging; using Spring.Objects.Factory; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Jndi { @@ -102,4 +101,4 @@ namespace Spring.Messaging.Ems.Jndi } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLocatorSupport.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLocatorSupport.cs index e83bb0fd..21f51cba 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLocatorSupport.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLocatorSupport.cs @@ -18,15 +18,13 @@ #endregion -using System; using Spring.Objects.Factory; using Spring.Util; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Jndi { public abstract class JndiLocatorSupport : JndiAccessor - { + { protected virtual object Lookup(string jndiName) @@ -44,7 +42,7 @@ namespace Spring.Messaging.Ems.Jndi AssertUtils.ArgumentNotNull(jndiName, "jndiName"); object jndiObject = JndiLookupContext.Lookup(jndiName); - + if (requiredType != null && !ObjectUtils.IsAssignable(requiredType, jndiObject)) { @@ -61,4 +59,4 @@ namespace Spring.Messaging.Ems.Jndi } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLookupFactoryObject.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLookupFactoryObject.cs index 65b06056..b13c3469 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLookupFactoryObject.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiLookupFactoryObject.cs @@ -18,12 +18,10 @@ #endregion -using System; using Spring.Core.TypeResolution; using Spring.Objects.Factory; using Spring.Objects.Factory.Config; using Spring.Util; -using TIBCO.EMS; using Common.Logging; namespace Spring.Messaging.Ems.Jndi @@ -157,4 +155,4 @@ namespace Spring.Messaging.Ems.Jndi set { productTemplate = value; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiObjectLocator.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiObjectLocator.cs index 3d856a22..c1a1d920 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiObjectLocator.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/JndiObjectLocator.cs @@ -18,14 +18,12 @@ #endregion -using System; -using Spring.Objects.Factory; using Spring.Util; namespace Spring.Messaging.Ems.Jndi { /// - /// Convenient superclass for JNDI-based service locators, + /// Convenient superclass for JNDI-based service locators, /// providing configurable lookup of a specific JNDI resource. /// /// @@ -57,7 +55,7 @@ namespace Spring.Messaging.Ems.Jndi } /// - /// Gets or sets the type that the located JNDI object is supposed + /// Gets or sets the type that the located JNDI object is supposed /// to be assignable to, if any. /// /// The expected type. @@ -91,4 +89,4 @@ namespace Spring.Messaging.Ems.Jndi #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/LookupContextFactoryObject.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/LookupContextFactoryObject.cs index 330377bb..74c48b7c 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/LookupContextFactoryObject.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/LookupContextFactoryObject.cs @@ -18,9 +18,7 @@ #endregion -using System; using Spring.Objects.Factory; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Jndi { @@ -70,4 +68,4 @@ namespace Spring.Messaging.Ems.Jndi #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/TypeMismatchNamingException.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/TypeMismatchNamingException.cs index d6e81bdc..ce4dc70c 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/TypeMismatchNamingException.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Jndi/TypeMismatchNamingException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,36 +18,23 @@ #endregion -#region Imports - -using System; -using System.Globalization; -using System.Runtime.Serialization; -using System.Security.Permissions; -using System.Text; -using Spring.Core; -using Spring.Util; -using TIBCO.EMS; - -#endregion - namespace Spring.Objects.Factory { - /// - /// Exception thrown if a type mismatch is encountered for an object - /// located in a JNDI environment. + /// + /// Exception thrown if a type mismatch is encountered for an object + /// located in a JNDI environment. /// /// Juergen Hoeller /// Mark Pollack (.NET) - [Serializable] + [Serializable] public class TypeMismatchNamingException : NamingException - { - private Type requiredType; - + { + private Type requiredType; + private Type actualType; /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -56,39 +43,39 @@ namespace Spring.Objects.Factory public TypeMismatchNamingException(string message) : base(message) { - } - - /// - /// Initializes a new instance of the class - /// building an explanation text from the given arguments. - /// - /// The Jndi name. - /// Type required type of the lookup. - /// The actual type that the lookup returned. - public TypeMismatchNamingException(String jndiName, Type requiredType, Type actualType) : - base("Object of type [" + actualType + "] available at JNDI location [" + - jndiName + "] is not assignable to [" + requiredType.Name + "]") - { - this.requiredType = requiredType; - this.actualType = actualType; - } - - /// - /// Gets the actual type that the lookup returned, if available. - /// - /// The actual type that the lookup. - public Type ActualType - { - get { return actualType; } - } - - /// - /// Gets the required type for the lookup, if available. - /// - /// The equired type for the lookup + } + + /// + /// Initializes a new instance of the class + /// building an explanation text from the given arguments. + /// + /// The Jndi name. + /// Type required type of the lookup. + /// The actual type that the lookup returned. + public TypeMismatchNamingException(String jndiName, Type requiredType, Type actualType) : + base("Object of type [" + actualType + "] available at JNDI location [" + + jndiName + "] is not assignable to [" + requiredType.Name + "]") + { + this.requiredType = requiredType; + this.actualType = actualType; + } + + /// + /// Gets the actual type that the lookup returned, if available. + /// + /// The actual type that the lookup. + public Type ActualType + { + get { return actualType; } + } + + /// + /// Gets the required type for the lookup, if available. + /// + /// The equired type for the lookup public Type RequiredType - { + { get { return requiredType; } - } + } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/AbstractListenerContainer.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/AbstractListenerContainer.cs index 627b439f..a520c6de 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/AbstractListenerContainer.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/AbstractListenerContainer.cs @@ -18,7 +18,6 @@ #endregion -using System; using Common.Logging; using Spring.Context; using Spring.Messaging.Ems.Common; @@ -26,7 +25,6 @@ using Spring.Messaging.Ems.Connections; using Spring.Messaging.Ems.Support; using Spring.Messaging.Ems.Support.Destinations; using Spring.Objects.Factory; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Listener { @@ -59,9 +57,9 @@ namespace Spring.Messaging.Ems.Listener private String clientId; private bool autoStartup = true; - + private string objectName; - + private IConnection sharedConnection; private bool sharedConnectionStarted = false; @@ -70,9 +68,9 @@ namespace Spring.Messaging.Ems.Listener /// The monitor object to lock on when performing operations on the connection. /// protected object sharedConnectionMonitor = new object(); - + private volatile bool active = false; - + private bool running = false; /// @@ -181,7 +179,7 @@ namespace Spring.Messaging.Ems.Listener /// Return whether a shared EMS Connection should be maintained /// by this listener container base class. - /// + /// /// protected abstract bool SharedConnectionEnabled { get; } @@ -212,7 +210,7 @@ namespace Spring.Messaging.Ems.Listener } } } - + /// /// Call base class method, then and then /// @@ -229,7 +227,7 @@ namespace Spring.Messaging.Ems.Listener /// protected virtual void ValidateConfiguration() { - + } /// @@ -262,7 +260,7 @@ namespace Spring.Messaging.Ems.Listener DoStart(); } - DoInitialize(); + DoInitialize(); } catch (Exception) @@ -544,4 +542,4 @@ namespace Spring.Messaging.Ems.Listener { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/AbstractMessageListenerContainer.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/AbstractMessageListenerContainer.cs index 0162fafb..53ad49df 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/AbstractMessageListenerContainer.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/AbstractMessageListenerContainer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,13 +18,11 @@ #endregion -using System; using Common.Logging; using Spring.Messaging.Ems.Common; using Spring.Messaging.Ems.Core; using Spring.Messaging.Ems.Support; using Spring.Util; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Listener { @@ -85,7 +83,7 @@ namespace Spring.Messaging.Ems.Listener { PubSubDomain = true; } - + } } @@ -101,7 +99,7 @@ namespace Spring.Messaging.Ems.Listener get { return (this.destination is string ? (string) this.destination : null); - + } set { @@ -125,10 +123,10 @@ namespace Spring.Messaging.Ems.Listener /// /// Gets or sets the message listener to register. /// - /// + /// /// /// - /// This can be either a standard EMS MessageListener object or a + /// This can be either a standard EMS MessageListener object or a /// Spring object. /// /// @@ -181,7 +179,7 @@ namespace Spring.Messaging.Ems.Listener /// client id. Default is the class name of the specified message listener. /// Note: Only 1 concurrent consumer (which is the default of this /// message listener container) is allowed for each durable subscription. - /// + /// /// /// The name of the durable subscription. public string DurableSubscriptionName @@ -301,7 +299,7 @@ namespace Spring.Messaging.Ems.Listener /// - /// Executes the specified listener, + /// Executes the specified listener, /// committing or rolling back the transaction afterwards (if necessary). /// /// The session to operate on. @@ -323,7 +321,7 @@ namespace Spring.Messaging.Ems.Listener } /// - /// Executes the specified listener, + /// Executes the specified listener, /// committing or rolling back the transaction afterwards (if necessary). /// /// The session to operate on. @@ -417,7 +415,7 @@ namespace Spring.Messaging.Ems.Listener // Actually invoke the message listener if (logger.IsDebugEnabled) { - logger.Debug("Invoking listener with message of type [" + message.GetType() + + logger.Debug("Invoking listener with message of type [" + message.GetType() + "] and session [" + sessionToUse + "]"); } listener.OnMessage(message, sessionToUse); @@ -428,7 +426,7 @@ namespace Spring.Messaging.Ems.Listener { // Transacted session created by this container -> commit. EmsUtils.CommitIfNecessary(sessionToUse); - } + } } } finally { @@ -490,7 +488,7 @@ namespace Spring.Messaging.Ems.Listener /// protected virtual bool IsSessionLocallyTransacted(ISession session) { - return SessionTransacted; + return SessionTransacted; } @@ -603,7 +601,7 @@ namespace Spring.Messaging.Ems.Listener exListener.OnException(ex); } } - + #endregion /// diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/Adapter/ListenerExecutionFailedException.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/Adapter/ListenerExecutionFailedException.cs index 6fefbeab..f19707fc 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/Adapter/ListenerExecutionFailedException.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/Adapter/ListenerExecutionFailedException.cs @@ -18,9 +18,6 @@ #endregion -using System; -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Listener.Adapter { /// @@ -51,4 +48,4 @@ namespace Spring.Messaging.Ems.Listener.Adapter LinkedException = innerException; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/Adapter/MessageListenerAdapter.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/Adapter/MessageListenerAdapter.cs index 09a19d90..7ace77c0 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/Adapter/MessageListenerAdapter.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/Adapter/MessageListenerAdapter.cs @@ -1,6 +1,3 @@ -using System; -using System.Collections; -using System.Collections.Generic; using System.Reflection; using Common.Logging; using Spring.Expressions; @@ -9,7 +6,6 @@ using Spring.Messaging.Ems.Support; using Spring.Messaging.Ems.Support.Converter; using Spring.Messaging.Ems.Support.Destinations; using Spring.Util; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Listener.Adapter { @@ -221,7 +217,7 @@ namespace Spring.Messaging.Ems.Listener.Adapter /// /// /// In case of an exception, the method will be invoked. - /// Note + /// Note /// Does not support sending response messages based on /// result objects returned from listener methods. Use the /// entry point (typically through a Spring @@ -377,7 +373,7 @@ namespace Spring.Messaging.Ems.Listener.Adapter } /// - /// Handles the given result object returned from the listener method, sending a response message back. + /// Handles the given result object returned from the listener method, sending a response message back. /// /// The result object to handle (never null). /// The original request message. @@ -497,7 +493,7 @@ namespace Spring.Messaging.Ems.Listener.Adapter { return DestinationResolver.ResolveDestinationName(session, destNameHolder.Name, destNameHolder.IsTopic); } - + return null; } @@ -529,7 +525,7 @@ namespace Spring.Messaging.Ems.Listener.Adapter /// The outgoing message about to be sent. protected virtual void PostProcessProducer(IMessageProducer producer, Message response) { - + } } diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/ISessionAwareMessageListener.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/ISessionAwareMessageListener.cs index 55d30691..cde5f96a 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/ISessionAwareMessageListener.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/ISessionAwareMessageListener.cs @@ -19,7 +19,6 @@ #endregion using Spring.Messaging.Ems.Common; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Listener { @@ -36,7 +35,7 @@ namespace Spring.Messaging.Ems.Listener /// /// Juergen Hoeller /// Mark Pollack (.NET) - public interface ISessionAwareMessageListener + public interface ISessionAwareMessageListener { /// Callback for processing a received EMS message. /// Implementors are supposed to process the given Message, diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/RecoveryTimeExceededException.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/RecoveryTimeExceededException.cs index d6a88fed..d3f67382 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/RecoveryTimeExceededException.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/RecoveryTimeExceededException.cs @@ -18,9 +18,7 @@ #endregion -using System; using Spring.Messaging.Ems.Listener.Adapter; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Listener { @@ -51,4 +49,4 @@ namespace Spring.Messaging.Ems.Listener LinkedException = innerException; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/SimpleMessageListenerContainer.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/SimpleMessageListenerContainer.cs index e20dc009..37e7f31e 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/SimpleMessageListenerContainer.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Listener/SimpleMessageListenerContainer.cs @@ -18,15 +18,12 @@ #endregion -using System; -using System.Threading; using Common.Logging; using Spring.Collections; using Spring.Messaging.Ems.Common; using Spring.Messaging.Ems.Support; using Spring.Transaction.Support; using Spring.Util; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Listener { @@ -143,7 +140,7 @@ namespace Spring.Messaging.Ems.Listener #endregion /// - /// Call base class for valdation and then check that if the subscription is durable that the number of + /// Call base class for valdation and then check that if the subscription is durable that the number of /// concurrent consumers is equal to one. /// protected override void ValidateConfiguration() @@ -280,7 +277,7 @@ namespace Spring.Messaging.Ems.Listener /// in case of setup failure. protected virtual void InitializeConsumers() { - // Register Sessions and MessageConsumers + // Register Sessions and MessageConsumers lock (consumersMonitor) { if (this.consumers == null) @@ -314,7 +311,7 @@ namespace Spring.Messaging.Ems.Listener destination = ResolveDestinationName(session, DestinationName); } IMessageConsumer consumer = CreateConsumer(session, destination); - + consumer.MessageListener = new SimpleMessageListener(this, session); return consumer; } diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/IMessageConverter.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/IMessageConverter.cs index 978f98de..fb15233c 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/IMessageConverter.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/IMessageConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -19,13 +19,12 @@ #endregion using Spring.Messaging.Ems.Common; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Support.Converter { /// Strategy interface that specifies a IMessageConverter /// between .NET objects and EMS messages. - /// + /// /// /// Mark Pollack /// Juergen Hoeller diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/ITypeMapper.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/ITypeMapper.cs index a66af959..75ed03af 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/ITypeMapper.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/ITypeMapper.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Messaging.Ems.Support.Converter { /// @@ -51,4 +49,4 @@ namespace Spring.Messaging.Ems.Support.Converter /// Type ToType(string typeId); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/MessageConversionException.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/MessageConversionException.cs index b6d45d15..324af2b0 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/MessageConversionException.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/MessageConversionException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,9 +18,6 @@ #endregion -using System; -using TIBCO.EMS; - namespace Spring.Messaging.Ems.Support.Converter { /// Thrown by IMessageConverter implementations when the conversion diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/SimpleMessageConverter.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/SimpleMessageConverter.cs index 09d35cb4..b6f80c86 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/SimpleMessageConverter.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/SimpleMessageConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,10 +18,8 @@ #endregion -using System; using System.Collections; using Spring.Messaging.Ems.Common; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Support.Converter { diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/TypeMapper.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/TypeMapper.cs index 5a9824be..5acf29c7 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/TypeMapper.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/TypeMapper.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,8 +18,6 @@ #endregion - -using System; using System.Collections; using Spring.Core.TypeResolution; @@ -36,13 +34,13 @@ namespace Spring.Messaging.Ems.Support.Converter //Generics not used to support both 1.1 and 2.0 private IDictionary idTypeMapping; private IDictionary typeIdMapping; - + private string defaultHashtableTypeId = "Hashtable"; private Type defaultHashtableClass = typeof(Hashtable); /// - /// Initializes a new instance of the + /// Initializes a new instance of the /// public TypeMapper() { @@ -122,7 +120,7 @@ namespace Spring.Messaging.Ems.Support.Converter string fullyQualifiedTypeName = defaultNamespace + "." + typeId + ", " + DefaultAssemblyName; - return TypeResolutionUtils.ResolveType(fullyQualifiedTypeName); + return TypeResolutionUtils.ResolveType(fullyQualifiedTypeName); } } @@ -141,7 +139,7 @@ namespace Spring.Messaging.Ems.Support.Converter { defaultNamespace = value; } - + } /// @@ -192,9 +190,9 @@ namespace Spring.Messaging.Ems.Support.Converter } finalIdTypeMapping.Add(id,t); typeIdMapping.Add(t,id); - + } idTypeMapping = finalIdTypeMapping; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/XmlMessageConverter.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/XmlMessageConverter.cs index f0070c75..b56047a9 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/XmlMessageConverter.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Converter/XmlMessageConverter.cs @@ -1,11 +1,8 @@ -using System; using System.Collections; -using System.IO; using System.Text; using System.Xml; using System.Xml.Serialization; using Spring.Messaging.Ems.Common; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Support.Converter { @@ -113,7 +110,7 @@ namespace Spring.Messaging.Ems.Support.Converter } catch (Exception e) { throw new MessageConversionException("Can't convert object of type " + objectToConvert.GetType(), e); - } + } return xmlString; } @@ -197,4 +194,4 @@ namespace Spring.Messaging.Ems.Support.Converter return byteArray; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Destinations/DynamicDestinationResolver.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Destinations/DynamicDestinationResolver.cs index 98f2ae5f..07a38345 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Destinations/DynamicDestinationResolver.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Destinations/DynamicDestinationResolver.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -20,7 +20,6 @@ using Spring.Messaging.Ems.Common; using Spring.Util; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Support.Destinations { @@ -51,7 +50,7 @@ namespace Spring.Messaging.Ems.Support.Destinations { return ResolveTopic(session, destinationName); } - return ResolveQueue(session, destinationName); + return ResolveQueue(session, destinationName); } diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Destinations/EmsDestinationAccessor.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Destinations/EmsDestinationAccessor.cs index 49ce1847..7d6eb12c 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Destinations/EmsDestinationAccessor.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Destinations/EmsDestinationAccessor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -20,7 +20,6 @@ using Spring.Messaging.Ems.Common; using Spring.Util; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Support.Destinations { @@ -30,14 +29,14 @@ namespace Spring.Messaging.Ems.Support.Destinations /// /// ///

Not intended to be used directly. See EmsTemplate.

- /// + /// ///
/// Juergen Hoeller /// Mark Pollack (.NET) public class EmsDestinationAccessor : EmsAccessor { #region Fields - + private IDestinationResolver destinationResolver = new DynamicDestinationResolver(); private bool pubSubDomain = false; @@ -74,7 +73,7 @@ namespace Spring.Messaging.Ems.Support.Destinations /// Gets or sets a value indicating whether Publish/Subscribe /// domain (Topics) is used. Otherwise, the Point-to-Point domain /// (Queues) is used. - /// + /// ///
/// this /// setting tells what type of destination to create if dynamic destinations are enabled. @@ -93,7 +92,7 @@ namespace Spring.Messaging.Ems.Support.Destinations } } - + #endregion /// diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Destinations/IDestinationResolver.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Destinations/IDestinationResolver.cs index 0bb4366e..8235bb39 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Destinations/IDestinationResolver.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/Destinations/IDestinationResolver.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -19,7 +19,6 @@ #endregion using Spring.Messaging.Ems.Common; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Support.Destinations { @@ -30,7 +29,7 @@ namespace Spring.Messaging.Ems.Support.Destinations /// destination names from simple Strings to actual /// Destination implementation instances. /// - /// + /// /// The default DestinationResolver implementation used by /// EmsTemplate instances is the /// DynamicDestinationResolver class. Consider using the @@ -54,6 +53,6 @@ namespace Spring.Messaging.Ems.Support.Destinations /// /// EMSException if resolution failed Destination ResolveDestinationName(ISession session, string destinationName, bool pubSubDomain); - + } } diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/EmsAccessor.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/EmsAccessor.cs index 688bc298..1e2e4ed6 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/EmsAccessor.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/EmsAccessor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,11 +18,9 @@ #endregion -using System; using Common.Logging; using Spring.Messaging.Ems.Common; using Spring.Objects.Factory; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Support { @@ -42,9 +40,9 @@ namespace Spring.Messaging.Ems.Support private readonly ILog logger = LogManager.GetLogger(typeof(EmsAccessor)); #endregion - + #region Fields - + private IConnectionFactory connectionFactory; private bool sessionTransacted = false; @@ -103,12 +101,12 @@ namespace Spring.Messaging.Ems.Support /// /// Setting this flag to "true" will use a short local EMS transaction /// when running outside of a managed transaction, and a synchronized local - /// EMS transaction in case of a managed transaction being present. + /// EMS transaction in case of a managed transaction being present. /// The latter has the effect of a local EMS /// transaction being managed alongside the main transaction (which might /// be a native ADO.NET transaction), with the EMS transaction committing /// right after the main transaction. - /// + /// /// public bool SessionTransacted { @@ -126,8 +124,8 @@ namespace Spring.Messaging.Ems.Support } #endregion - - + + /// /// Verify that ConnectionFactory property has been set. /// diff --git a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/EmsUtils.cs b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/EmsUtils.cs index f0028640..46ebc782 100644 --- a/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/EmsUtils.cs +++ b/src/Spring/Spring.Messaging.Ems/Messaging/Ems/Support/EmsUtils.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2010 the original author or authors. + * Copyright � 2002-2010 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. @@ -18,11 +18,9 @@ #endregion -using System; using Common.Logging; using Spring.Messaging.Ems.Common; using Spring.Util; -using TIBCO.EMS; namespace Spring.Messaging.Ems.Support { @@ -88,7 +86,7 @@ namespace Spring.Messaging.Ems.Support } } } - + /// Close the given EMS Session and ignore any thrown exception. /// This is useful for typical finally blocks in manual EMS code. /// @@ -113,7 +111,7 @@ namespace Spring.Messaging.Ems.Support } } } - + /// Close the given EMS MessageProducer and ignore any thrown exception. /// This is useful for typical finally blocks in manual EMS code. /// @@ -199,11 +197,11 @@ namespace Spring.Messaging.Ems.Support public static void CommitIfNecessary(ISession session) { AssertUtils.ArgumentNotNull(session, "Session must not be null"); - + session.Commit(); // TODO Investigate - + // try { // session.Commit(); // } diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Config/MessageListenerContainerObjectDefinitionParser.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Config/MessageListenerContainerObjectDefinitionParser.cs index 51d4e2ef..57df1dac 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Config/MessageListenerContainerObjectDefinitionParser.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Config/MessageListenerContainerObjectDefinitionParser.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Xml; using Apache.NMS; using Spring.Core.TypeResolution; @@ -85,8 +84,8 @@ namespace Spring.Messaging.Nms.Config private readonly string RECOVERY_INTERVAL_ATTRIBUTE = "recovery-interval"; - private readonly string MAX_RECOVERY_TIME_ATTRIBUTE = "max-recovery-time"; - + private readonly string MAX_RECOVERY_TIME_ATTRIBUTE = "max-recovery-time"; + private readonly string CONNECTION_FACTORY_ATTRIBUTE = "connection-factory"; private readonly string CONTAINER_CUSTOM_TYPE = "container-custom-type"; @@ -98,7 +97,7 @@ namespace Spring.Messaging.Nms.Config private readonly string ERROR_HANDLER_ATTRIBUTE = "error-handler"; private readonly string EXCEPTION_LISTENER_ATTRIBUTE = "exception-listener"; - + #endregion #region IObjectDefinitionParser Members @@ -163,7 +162,7 @@ namespace Spring.Messaging.Nms.Config "Listener '" + METHOD_ATTRIBUTE + "' attribute contains empty value."); } - } + } } listenerDefBuilder.AddPropertyValue("DefaultHandlerMethod", handlerMethod); @@ -193,7 +192,7 @@ namespace Spring.Messaging.Nms.Config containerDefBuilder.AddPropertyValue("MessageListener", listenerDefBuilder.ObjectDefinition); string containerObjectName = listenerElement.GetAttribute(ID_ATTRIBUTE); - // If no object id is given auto generate one using the ReaderContext's ObjectNameGenerator + // If no object id is given auto generate one using the ReaderContext's ObjectNameGenerator if (!StringUtils.HasText(containerObjectName)) { containerObjectName = @@ -230,7 +229,7 @@ namespace Spring.Messaging.Nms.Config parserContext.ReaderContext.ReportException(containerElement, CONTAINER_CUSTOM_TYPE, "Invalid container-custom-type value [" + customType + "]", ex); } - } + } ObjectDefinitionBuilder containerDef = parserContext.ParserHelper.CreateRootObjectDefinitionBuilder(containerType); @@ -299,7 +298,7 @@ namespace Spring.Messaging.Nms.Config } containerDef.AddPropertyValue("RecoveryInterval", ParseRecoveryInterval(containerElement, parserContext)); - containerDef.AddPropertyValue("MaxRecoveryTime", ParseMaxRecoveryTime(containerElement, parserContext)); + containerDef.AddPropertyValue("MaxRecoveryTime", ParseMaxRecoveryTime(containerElement, parserContext)); return containerDef; } @@ -422,7 +421,7 @@ namespace Spring.Messaging.Nms.Config } else { return concurrency; - } + } } private string ParseRecoveryInterval(XmlElement ele, ParserContext parserContext) @@ -431,7 +430,7 @@ namespace Spring.Messaging.Nms.Config if (StringUtils.HasText(recoveryInterval)) { return recoveryInterval; - + } else { return SimpleMessageListenerContainer.DEFAULT_RECOVERY_INTERVAL; @@ -451,4 +450,4 @@ namespace Spring.Messaging.Nms.Config } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachedMessageConsumer .cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachedMessageConsumer .cs index 2d81a118..7b5ad99a 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachedMessageConsumer .cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachedMessageConsumer .cs @@ -18,7 +18,6 @@ #endregion -using System; using Apache.NMS; namespace Spring.Messaging.Nms.Connections @@ -53,7 +52,7 @@ namespace Spring.Messaging.Nms.Connections } /// - /// Register for message events. + /// Register for message events. /// public event MessageListener Listener { @@ -132,4 +131,4 @@ namespace Spring.Messaging.Nms.Connections return "Cached NMS MessageConsumer: " + this.target; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachedMessageProducer.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachedMessageProducer.cs index 2845dd5c..af084c57 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachedMessageProducer.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachedMessageProducer.cs @@ -18,7 +18,6 @@ #endregion -using System; using Apache.NMS; namespace Spring.Messaging.Nms.Connections @@ -322,4 +321,4 @@ namespace Spring.Messaging.Nms.Connections return "Cached NMS MessageProducer: " + this.target; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachedSession.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachedSession.cs index 145931d8..b65bc78f 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachedSession.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachedSession.cs @@ -14,13 +14,8 @@ * limitations under the License. */ -using System; -using System.Collections; -using System.Collections.Generic; - using Apache.NMS; using Common.Logging; -using Spring.Collections; using Spring.Util; using IQueue=Apache.NMS.IQueue; @@ -689,4 +684,4 @@ namespace Spring.Messaging.Nms.Connections return destination.GetHashCode(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachingConnectionFactory.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachingConnectionFactory.cs index 68737338..47ab6366 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachingConnectionFactory.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/CachingConnectionFactory.cs @@ -14,12 +14,8 @@ * limitations under the License. */ -using System; -using System.Collections; -using System.Collections.Generic; using Apache.NMS; using Common.Logging; -using Spring.Collections; using Spring.Util; namespace Spring.Messaging.Nms.Connections @@ -247,4 +243,4 @@ namespace Spring.Messaging.Nms.Connections return new CachedSession(targetSession, sessionList, this); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/ChainedExceptionListener.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/ChainedExceptionListener.cs index 99a8ce2a..eb1d598e 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/ChainedExceptionListener.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/ChainedExceptionListener.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,10 +18,6 @@ #endregion - -using System; -using System.Collections.Generic; - using Spring.Messaging.Nms.Core; using Spring.Util; @@ -68,4 +64,4 @@ namespace Spring.Messaging.Nms.Connections get { return listeners; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/ConnectionFactoryUtils.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/ConnectionFactoryUtils.cs index e28eb2bc..ff99fa5f 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/ConnectionFactoryUtils.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/ConnectionFactoryUtils.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using Apache.NMS; using Common.Logging; using Spring.Messaging.Nms.Support; @@ -44,7 +43,7 @@ namespace Spring.Messaging.Nms.Connections /// Releases the given connection, stopping it (if necessary) and eventually closing it. /// /// Checks , if available. - /// This is essentially a more sophisticated version of + /// This is essentially a more sophisticated version of /// /// /// The connection to release. (if this is null, the call will be ignored) @@ -75,7 +74,7 @@ namespace Spring.Messaging.Nms.Connections } catch (Exception ex) { LOG.Debug("Could not close NMS Connection", ex); - } + } } /// @@ -340,7 +339,7 @@ namespace Spring.Messaging.Nms.Connections /// committing right after the main transaction. /// Returns whether to allow for synchronizing a local NMS transaction /// - /// + /// bool SynchedLocalTransactionAllowed { get; } } @@ -415,4 +414,4 @@ namespace Spring.Messaging.Nms.Connections #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/NmsResourceHolder.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/NmsResourceHolder.cs index d7389ea2..534fc3ee 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/NmsResourceHolder.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/NmsResourceHolder.cs @@ -14,11 +14,7 @@ * limitations under the License. */ -using System; -using System.Collections; -using System.Collections.Generic; using Common.Logging; -using Spring.Collections; using Spring.Transaction.Support; using Spring.Util; using Apache.NMS; @@ -100,7 +96,7 @@ namespace Spring.Messaging.Nms.Connections } /// - /// Gets a value indicating whether this is frozen, namely that + /// Gets a value indicating whether this is frozen, namely that /// additional resources can be registered with the holder. If using any of the constructors with /// a Session, the holder will be set to the frozen state. /// @@ -244,7 +240,7 @@ namespace Spring.Messaging.Nms.Connections } connections.Clear(); sessions.Clear(); - sessionsPerIConnection.Clear(); + sessionsPerIConnection.Clear(); } /// diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/NmsTransactionManager.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/NmsTransactionManager.cs index fd6542fe..9c195e60 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/NmsTransactionManager.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/NmsTransactionManager.cs @@ -18,8 +18,6 @@ #endregion - -using System; using System.Data; using Apache.NMS; using Common.Logging; @@ -32,7 +30,7 @@ namespace Spring.Messaging.Nms.Connections { /// /// A implementation - /// for a single NMS ConnectionFactory. Binds a + /// for a single NMS ConnectionFactory. Binds a /// Connection/Session pair from the specified ConnecctionFactory to the thread, /// potentially allowing for one thread-bound Session per ConnectionFactory. /// @@ -40,7 +38,7 @@ namespace Spring.Messaging.Nms.Connections /// /// Application code is required to retrieve the transactional Session via /// . Spring's - /// will autodetect a thread-bound Session and + /// will autodetect a thread-bound Session and /// automatically participate in it. /// /// @@ -68,7 +66,7 @@ namespace Spring.Messaging.Nms.Connections /// /// Juergen Hoeller /// Mark Pollack (.NET) - public class NmsTransactionManager : AbstractPlatformTransactionManager, + public class NmsTransactionManager : AbstractPlatformTransactionManager, IResourceTransactionManager, IInitializingObject { @@ -76,7 +74,7 @@ namespace Spring.Messaging.Nms.Connections private static readonly ILog LOG = LogManager.GetLogger(typeof(NmsTransactionManager)); - #endregion + #endregion private IConnectionFactory connectionFactory; @@ -84,7 +82,7 @@ namespace Spring.Messaging.Nms.Connections /// Initializes a new instance of the class. /// /// - /// The ConnectionFactory has to be set before using the instance. + /// The ConnectionFactory has to be set before using the instance. /// This constructor can be used to prepare a NmsTemplate via a ApplicationContext, /// typically setting the ConnectionFactory via ConnectionFactory property. /// @@ -209,7 +207,7 @@ namespace Spring.Messaging.Nms.Connections txObject.ResourceHolder.TimeoutInSeconds = timeout; } TransactionSynchronizationManager.BindResource(ConnectionFactory, txObject.ResourceHolder); - + } catch (NMSException ex) @@ -231,7 +229,7 @@ namespace Spring.Messaging.Nms.Connections } throw new CannotCreateTransactionException("Could not create NMS Transaction", ex); } - + } /// @@ -296,7 +294,7 @@ namespace Spring.Messaging.Nms.Connections //See https://issues.apache.org/activemq/browse/AMQNET-93 } catch (NMSException ex) - { + { throw new TransactionSystemException("Could not commit NMS transaction.", ex); } } @@ -318,7 +316,7 @@ namespace Spring.Messaging.Nms.Connections { LOG.Debug("Rolling back NMS transaction on Session [" + session + "]"); } - session.Rollback(); + session.Rollback(); } catch (NMSException ex) { @@ -431,4 +429,4 @@ namespace Spring.Messaging.Nms.Connections #endregion } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/SingleConnectionFactory.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/SingleConnectionFactory.cs index e98ebc50..4de73816 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/SingleConnectionFactory.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/SingleConnectionFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using Apache.NMS; using Common.Logging; using Spring.Messaging.Nms.Core; @@ -31,7 +30,7 @@ namespace Spring.Messaging.Nms.Connections /// A ConnectionFactory adapter that returns the same Connection /// from all CreateConnection() calls, and ignores calls to /// Connection.Close(). According to the JMS Connection - /// model, this is perfectly thread-safe. The + /// model, this is perfectly thread-safe. The /// shared Connection can be automatically recovered in case of an Exception. /// /// @@ -85,7 +84,7 @@ namespace Spring.Messaging.Nms.Connections /// - /// Whether the shared Connection has been started + /// Whether the shared Connection has been started /// private bool started = false; @@ -366,7 +365,7 @@ namespace Spring.Messaging.Nms.Connections /// The connection to operate on. /// The session ack mode. /// the Session to use, or null to indicate - /// creation of a raw standard Session + /// creation of a raw standard Session public virtual ISession GetSession(IConnection con, AcknowledgementMode mode) { return null; @@ -398,7 +397,7 @@ namespace Spring.Messaging.Nms.Connections if (this.started) { this.started = false; - con.Stop(); + con.Stop(); } } finally { @@ -428,7 +427,7 @@ namespace Spring.Messaging.Nms.Connections /// /// Close the underlying shared connection. The provider of this ConnectionFactory needs to care for proper shutdown. - /// As this object implements an application context will automatically + /// As this object implements an application context will automatically /// invoke this on distruction o /// public void Dispose() @@ -495,9 +494,9 @@ namespace Spring.Messaging.Nms.Connections throw new ArgumentException( "Setting of 'ClientID' property not supported on wrapper for shared Connection since" + "this is a shared connection that may serve any number of clients concurrently." + - "Set the 'ClientId' property on the SingleConnectionFactory instead."); + "Set the 'ClientId' property on the SingleConnectionFactory instead."); } - + } } @@ -556,7 +555,7 @@ namespace Spring.Messaging.Nms.Connections #region Pass through implementations to the target connection - + public void PurgeTempDestinations() { target.PurgeTempDestinations(); @@ -570,7 +569,7 @@ namespace Spring.Messaging.Nms.Connections } remove { - target.ExceptionListener -= value; + target.ExceptionListener -= value; } } @@ -639,4 +638,4 @@ namespace Spring.Messaging.Nms.Connections return "Shared NMS Connection: " + this.target; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/SynchedLocalTransactionFailedException.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/SynchedLocalTransactionFailedException.cs index 12c432ce..023151a8 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/SynchedLocalTransactionFailedException.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/SynchedLocalTransactionFailedException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,11 @@ #endregion -using System; using System.Runtime.Serialization; using Apache.NMS; namespace Spring.Messaging.Nms.Connections -{ +{ /// Exception thrown when a synchronized local transaction failed to complete /// (after the main transaction has already completed). /// diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/UserCredentialsConnectionFactoryAdapter.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/UserCredentialsConnectionFactoryAdapter.cs index 82029bcc..46e1cbec 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/UserCredentialsConnectionFactoryAdapter.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Connections/UserCredentialsConnectionFactoryAdapter.cs @@ -17,8 +17,6 @@ */ #endregion -using System; -using System.Threading; using Apache.NMS; namespace Spring.Messaging.Nms.Connections @@ -36,7 +34,7 @@ namespace Spring.Messaging.Nms.Connections /// passing in username and password on every CreateConnection() call. /// If the "Username" is empty, this proxy will simply delegate to the standard /// CreateConnection() method of the target ConnectionFactory. - /// This can be used to keep a UserCredentialsConnectionFactoryAdapter + /// This can be used to keep a UserCredentialsConnectionFactoryAdapter /// definition just for the option of implicitly passing in user credentials /// if the particular target ConnectionFactory requires it. /// @@ -53,7 +51,7 @@ namespace Spring.Messaging.Nms.Connections /// - /// Set user credentials for this proxy and the current thread. + /// Set user credentials for this proxy and the current thread. /// The given username and password will be applied to all subsequent /// CreateConnection() calls on this ConnectionFactory proxy. /// This will override any statically specified user credentials, @@ -75,7 +73,7 @@ namespace Spring.Messaging.Nms.Connections private string _userName; - + /// /// Set the username that this adapter should use for retrieving Connections. /// diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Core/IExceptionListener.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Core/IExceptionListener.cs index 046cf8ce..2d6e9601 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Core/IExceptionListener.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Core/IExceptionListener.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Messaging.Nms.Core { /// @@ -34,4 +32,4 @@ namespace Spring.Messaging.Nms.Core /// The exception. void OnException(Exception exception); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Core/NmsGatewaySupport.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Core/NmsGatewaySupport.cs index 83ec0e5d..ba603596 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Core/NmsGatewaySupport.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Core/NmsGatewaySupport.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using Common.Logging; using Spring.Objects.Factory; using Apache.NMS; @@ -42,7 +41,7 @@ namespace Spring.Messaging.Nms.Core private readonly ILog logger = LogManager.GetLogger(typeof(NmsGatewaySupport)); #endregion - + private NmsTemplate nmsTemplate; @@ -112,7 +111,7 @@ namespace Spring.Messaging.Nms.Core /// protected virtual void InitGateway() { - + } } } diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Core/NmsTemplate.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Core/NmsTemplate.cs index 5a7a5bb0..cecbb894 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Core/NmsTemplate.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Core/NmsTemplate.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using Common.Logging; using Spring.Messaging.Nms.Connections; using Spring.Messaging.Nms.Support; diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/AbstractListenerContainer.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/AbstractListenerContainer.cs index a3c3ea66..b4b1bf91 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/AbstractListenerContainer.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/AbstractListenerContainer.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Apache.NMS; using Common.Logging; @@ -36,7 +35,7 @@ namespace Spring.Messaging.Nms.Listener /// Inherits basic Connection and Session configuration handling from the /// base class. /// - /// + /// /// /// This class provides basic lifecycle management, in particular management /// of a shared Connection. Subclasses are supposed to plug into this @@ -58,9 +57,9 @@ namespace Spring.Messaging.Nms.Listener private String clientId; private bool autoStartup = true; - + private string objectName; - + private IConnection sharedConnection; private bool sharedConnectionStarted = false; @@ -69,9 +68,9 @@ namespace Spring.Messaging.Nms.Listener /// The monitor object to lock on when performing operations on the connection. ///
protected object sharedConnectionMonitor = new object(); - + private volatile bool active = false; - + private bool running = false; /// @@ -180,7 +179,7 @@ namespace Spring.Messaging.Nms.Listener /// Return whether a shared NMS Connection should be maintained /// by this listener container base class. - /// + /// /// protected abstract bool SharedConnectionEnabled { get; } @@ -211,7 +210,7 @@ namespace Spring.Messaging.Nms.Listener } } } - + /// /// Call base class method, then and then /// @@ -228,7 +227,7 @@ namespace Spring.Messaging.Nms.Listener ///
protected virtual void ValidateConfiguration() { - + } /// @@ -261,7 +260,7 @@ namespace Spring.Messaging.Nms.Listener DoStart(); } - DoInitialize(); + DoInitialize(); } catch (Exception) @@ -571,4 +570,4 @@ namespace Spring.Messaging.Nms.Listener { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/AbstractMessageListenerContainer.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/AbstractMessageListenerContainer.cs index 9566cdcc..73adbebe 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/AbstractMessageListenerContainer.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/AbstractMessageListenerContainer.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; - using Common.Logging; using Spring.Messaging.Nms.Core; using Spring.Messaging.Nms.Support; @@ -85,7 +83,7 @@ namespace Spring.Messaging.Nms.Listener { PubSubDomain = true; } - + } } @@ -101,7 +99,7 @@ namespace Spring.Messaging.Nms.Listener get { return (this.destination is string ? (string) this.destination : null); - + } set { @@ -125,10 +123,10 @@ namespace Spring.Messaging.Nms.Listener /// /// Gets or sets the message listener to register. /// - /// + /// /// /// - /// This can be either a standard NMS MessageListener object or a + /// This can be either a standard NMS MessageListener object or a /// Spring object. /// /// @@ -181,7 +179,7 @@ namespace Spring.Messaging.Nms.Listener /// client id. Default is the class name of the specified message listener. /// Note: Only 1 concurrent consumer (which is the default of this /// message listener container) is allowed for each durable subscription. - /// + /// /// /// The name of the durable subscription. public string DurableSubscriptionName @@ -300,7 +298,7 @@ namespace Spring.Messaging.Nms.Listener /// - /// Executes the specified listener, + /// Executes the specified listener, /// committing or rolling back the transaction afterwards (if necessary). /// /// The session to operate on. @@ -322,7 +320,7 @@ namespace Spring.Messaging.Nms.Listener } /// - /// Executes the specified listener, + /// Executes the specified listener, /// committing or rolling back the transaction afterwards (if necessary). /// /// The session to operate on. @@ -415,7 +413,7 @@ namespace Spring.Messaging.Nms.Listener // Actually invoke the message listener if (logger.IsDebugEnabled) { - logger.Debug("Invoking listener with message of type [" + message.GetType() + + logger.Debug("Invoking listener with message of type [" + message.GetType() + "] and session [" + sessionToUse + "]"); } listener.OnMessage(message, sessionToUse); @@ -426,7 +424,7 @@ namespace Spring.Messaging.Nms.Listener { // Transacted session created by this container -> commit. NmsUtils.CommitIfNecessary(sessionToUse); - } + } } } finally { @@ -488,7 +486,7 @@ namespace Spring.Messaging.Nms.Listener /// protected virtual bool IsSessionLocallyTransacted(ISession session) { - return SessionTransacted; + return SessionTransacted; } @@ -588,7 +586,7 @@ namespace Spring.Messaging.Nms.Listener } else if(logger.IsWarnEnabled) { - logger.Warn("Execution of NMS message listener failed, and no ErrorHandler has been set.", exception); + logger.Warn("Execution of NMS message listener failed, and no ErrorHandler has been set.", exception); } } @@ -607,7 +605,7 @@ namespace Spring.Messaging.Nms.Listener } - + #endregion /// diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/Adapter/ListenerExecutionFailedException.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/Adapter/ListenerExecutionFailedException.cs index d4ff3715..3cb64c99 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/Adapter/ListenerExecutionFailedException.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/Adapter/ListenerExecutionFailedException.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Apache.NMS; @@ -68,4 +67,4 @@ namespace Spring.Messaging.Nms.Listener.Adapter { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/Adapter/MessageListenerAdapter.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/Adapter/MessageListenerAdapter.cs index 8a406616..d378b810 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/Adapter/MessageListenerAdapter.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/Adapter/MessageListenerAdapter.cs @@ -18,9 +18,6 @@ #endregion - -using System; -using System.Collections.Generic; using System.Reflection; using Common.Logging; using Spring.Expressions; @@ -237,7 +234,7 @@ namespace Spring.Messaging.Nms.Listener.Adapter /// /// /// In case of an exception, the method will be invoked. - /// Note + /// Note /// Does not support sending response messages based on /// result objects returned from listener methods. Use the /// entry point (typically through a Spring @@ -293,7 +290,7 @@ namespace Spring.Messaging.Nms.Listener.Adapter // Regular case: find a handler method reflectively. object convertedMessage = ExtractMessage(message); - + IDictionary vars = new Dictionary(); vars["convertedObject"] = convertedMessage; @@ -301,7 +298,7 @@ namespace Spring.Messaging.Nms.Listener.Adapter //expression processor caches target of first invocation. //TODO - check JIRA as I believe this has been fixed, otherwise, use regular reflection. -MLP //processingExpression = Expression.Parse(defaultHandlerMethod + "(#convertedObject)"); - + //Invoke message handler method and get result. object result; try @@ -398,7 +395,7 @@ namespace Spring.Messaging.Nms.Listener.Adapter } /// - /// Handles the given result object returned from the listener method, sending a response message back. + /// Handles the given result object returned from the listener method, sending a response message back. /// /// The result object to handle (never null). /// The original request message. @@ -518,7 +515,7 @@ namespace Spring.Messaging.Nms.Listener.Adapter { return DestinationResolver.ResolveDestinationName(session, destNameHolder.Name, destNameHolder.IsTopic); } - + return null; } @@ -550,7 +547,7 @@ namespace Spring.Messaging.Nms.Listener.Adapter /// The outgoing message about to be sent. protected virtual void PostProcessProducer(IMessageProducer producer, IMessage response) { - + } } diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/RecoveryTimeExceededException.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/RecoveryTimeExceededException.cs index eb5eea0a..0458ff38 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/RecoveryTimeExceededException.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/RecoveryTimeExceededException.cs @@ -20,7 +20,6 @@ #region -using System; using System.Runtime.Serialization; using Apache.NMS; @@ -71,4 +70,4 @@ namespace Spring.Messaging.Nms.Listener { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/SimpleMessageListenerContainer.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/SimpleMessageListenerContainer.cs index 18ed3b2b..dc10f481 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/SimpleMessageListenerContainer.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Listener/SimpleMessageListenerContainer.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Threading; using Common.Logging; using Spring.Collections; using Spring.Messaging.Nms.Core; @@ -69,7 +67,7 @@ namespace Spring.Messaging.Nms.Listener private TimeSpan recoveryInterval = new TimeSpan(0, 0, 0, 5, 0); private TimeSpan maxRecoveryTime = new TimeSpan(0, 0, 10, 0, 0); - + #endregion @@ -140,7 +138,7 @@ namespace Spring.Messaging.Nms.Listener #endregion /// - /// Call base class for valdation and then check that if the subscription is durable that the number of + /// Call base class for valdation and then check that if the subscription is durable that the number of /// concurrent consumers is equal to one. /// protected override void ValidateConfiguration() @@ -251,9 +249,9 @@ namespace Spring.Messaging.Nms.Listener if (totalTryTime > maxRecoveryTime) { logger.Info("Could not refresh Connection after " + totalTryTime + ". Stopping reconnection attempts."); - throw new RecoveryTimeExceededException("Could not recover after " + totalTryTime); + throw new RecoveryTimeExceededException("Could not recover after " + totalTryTime); } - + DateTime startTime = DateTime.Now; SleepInBetweenRecoveryAttempts(); TimeSpan sleepTimeSpan = DateTime.Now - startTime; @@ -275,7 +273,7 @@ namespace Spring.Messaging.Nms.Listener /// in case of setup failure. protected virtual void InitializeConsumers() { - // Register Sessions and MessageConsumers + // Register Sessions and MessageConsumers lock (consumersMonitor) { if (this.consumers == null) @@ -309,8 +307,8 @@ namespace Spring.Messaging.Nms.Listener destination = ResolveDestinationName(session, DestinationName); } IMessageConsumer consumer = CreateConsumer(session, destination); - - + + SimpleMessageListener listener = new SimpleMessageListener(this, session); // put in explicit registration with 'new' for compilation on .NET 1.1 consumer.Listener += listener.OnMessage; diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/ITypeMapper.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/ITypeMapper.cs index b4217f00..b95674a3 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/ITypeMapper.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/ITypeMapper.cs @@ -1,4 +1,4 @@ - + #region License @@ -20,8 +20,6 @@ #endregion -using System; - namespace Spring.Messaging.Nms.Support.Converter { /// @@ -53,4 +51,4 @@ namespace Spring.Messaging.Nms.Support.Converter /// Type ToType(string typeId); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/MessageConversionException.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/MessageConversionException.cs index de286094..329e92be 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/MessageConversionException.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/MessageConversionException.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; using Apache.NMS; diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/SimpleMessageConverter.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/SimpleMessageConverter.cs index 03345939..318dfbd3 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/SimpleMessageConverter.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/SimpleMessageConverter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using Apache.NMS; diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/TypeMapper.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/TypeMapper.cs index 746bc064..bed1788b 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/TypeMapper.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/TypeMapper.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion - -using System; using System.Collections; using Spring.Core.TypeResolution; @@ -36,7 +34,7 @@ namespace Spring.Messaging.Nms.Support.Converter //Generics not used to support both 1.1 and 2.0 private IDictionary idTypeMapping; private IDictionary typeIdMapping; - + private string defaultHashtableTypeId = "Hashtable"; private Type defaultHashtableClass = typeof(Hashtable); @@ -132,9 +130,9 @@ namespace Spring.Messaging.Nms.Support.Converter } /// - /// Convert from a string to a type. Will look into the IdTypeMapping dictionary first to resolve the + /// Convert from a string to a type. Will look into the IdTypeMapping dictionary first to resolve the /// type, then check if it is the well known typeId of 'Hashtable' followed by a strategy to resolve a fully qualfied - /// name from a simple type name. This strategy requires that + /// name from a simple type name. This strategy requires that /// /// The type id. /// The type associated with the string. @@ -150,16 +148,16 @@ namespace Spring.Messaging.Nms.Support.Converter if (typeId.Equals(defaultHashtableTypeId)) { return defaultHashtableClass; - } + } if (defaultNamespace != null) { string fullyQualifiedTypeName = defaultNamespace + "." + typeId + ", " + DefaultAssemblyName; - return TypeResolutionUtils.ResolveType(fullyQualifiedTypeName); + return TypeResolutionUtils.ResolveType(fullyQualifiedTypeName); } - return TypeResolutionUtils.ResolveType(typeId); + return TypeResolutionUtils.ResolveType(typeId); } } @@ -178,7 +176,7 @@ namespace Spring.Messaging.Nms.Support.Converter { defaultNamespace = value; } - + } /// @@ -229,9 +227,9 @@ namespace Spring.Messaging.Nms.Support.Converter } finalIdTypeMapping.Add(id,t); typeIdMapping.Add(t,id); - + } idTypeMapping = finalIdTypeMapping; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/XmlMessageConverter.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/XmlMessageConverter.cs index 7ed00351..87864e7f 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/XmlMessageConverter.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/Converter/XmlMessageConverter.cs @@ -1,6 +1,4 @@ -using System; using System.Collections; -using System.IO; using System.Text; using System.Xml; using System.Xml.Serialization; @@ -146,7 +144,7 @@ namespace Spring.Messaging.Nms.Support.Converter { XmlSerializer xs = new XmlSerializer(GetTargetType(textMessage)); - XmlTextWriter xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.UTF8); + XmlTextWriter xmlTextWriter = new XmlTextWriter(memoryStream, Encoding.UTF8); return xs.Deserialize(memoryStream); } } catch (Exception e) @@ -195,4 +193,4 @@ namespace Spring.Messaging.Nms.Support.Converter return byteArray; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/MessageUtils.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/MessageUtils.cs index 1ec611f3..b2a29f08 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/MessageUtils.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/MessageUtils.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using Common.Logging; using Spring.Util; using Apache.NMS; @@ -87,7 +86,7 @@ namespace Spring.Messaging.Nms.Support } } } - + /// Close the given NMS Session and ignore any thrown exception. /// This is useful for typical finally blocks in manual NMS code. /// @@ -112,7 +111,7 @@ namespace Spring.Messaging.Nms.Support } } } - + /// Close the given NMS MessageProducer and ignore any thrown exception. /// This is useful for typical finally blocks in manual NMS code. /// @@ -198,11 +197,11 @@ namespace Spring.Messaging.Nms.Support public static void CommitIfNecessary(ISession session) { AssertUtils.ArgumentNotNull(session, "ISession must not be null"); - + session.Commit(); // TODO Investigate - + // try { // session.Commit(); // } @@ -238,6 +237,6 @@ namespace Spring.Messaging.Nms.Support // // Ignore -> can only happen in case of a JTA transaction. // } } - + } } diff --git a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/NmsAccessor.cs b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/NmsAccessor.cs index 8edd03e2..11bc2867 100644 --- a/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/NmsAccessor.cs +++ b/src/Spring/Spring.Messaging.Nms/Messaging/Nms/Support/NmsAccessor.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using Common.Logging; using Spring.Messaging.Nms.Core; using Spring.Objects.Factory; @@ -42,9 +41,9 @@ namespace Spring.Messaging.Nms.Support private readonly ILog logger = LogManager.GetLogger(typeof(NmsAccessor)); #endregion - + #region Fields - + private IConnectionFactory connectionFactory; private AcknowledgementMode sessionAcknowledgeMode = AcknowledgementMode.AutoAcknowledge; @@ -101,12 +100,12 @@ namespace Spring.Messaging.Nms.Support /// /// Setting this flag to "true" will use a short local NMS transaction /// when running outside of a managed transaction, and a synchronized local - /// NMS transaction in case of a managed transaction being present. + /// NMS transaction in case of a managed transaction being present. /// The latter has the effect of a local NMS /// transaction being managed alongside the main transaction (which might /// be a native ADO.NET transaction), with the NMS transaction committing /// right after the main transaction. - /// + /// /// public bool SessionTransacted { @@ -124,8 +123,8 @@ namespace Spring.Messaging.Nms.Support } #endregion - - + + /// /// Verify that ConnectionFactory property has been set. /// diff --git a/src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.csproj b/src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.csproj index 31edc972..9272f2f8 100644 --- a/src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.csproj +++ b/src/Spring/Spring.Messaging.Nms/Spring.Messaging.Nms.csproj @@ -1,20 +1,27 @@  + netstandard2.0;$(TargetFullFrameworkVersion) ActiveMQ support + + + - - - + + + + + + diff --git a/src/Spring/Spring.Messaging/Messaging/Core/DefaultMessageQueueFactory.cs b/src/Spring/Spring.Messaging/Messaging/Core/DefaultMessageQueueFactory.cs index 8b1cc67e..76635175 100644 --- a/src/Spring/Spring.Messaging/Messaging/Core/DefaultMessageQueueFactory.cs +++ b/src/Spring/Spring.Messaging/Messaging/Core/DefaultMessageQueueFactory.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using Common.Logging; using Spring.Context; using Spring.Messaging.Support; @@ -38,8 +36,8 @@ namespace Spring.Messaging.Core { /// /// A implementation that caches MessageQueue and IMessageConverter - /// instances. The MessageQueue objects are created by retrieving them by-name from the - /// ApplicationContext. + /// instances. The MessageQueue objects are created by retrieving them by-name from the + /// ApplicationContext. /// /// Mark Pollack public class DefaultMessageQueueFactory : IMessageQueueFactory, IApplicationContextAware @@ -76,7 +74,7 @@ namespace Spring.Messaging.Core foreach (KeyValuePair entry in caches) { entry.Value.Insert(mqfo.Path, new MessageQueueMetadata(mqfo.RemoteQueue, mqfo.RemoteQueueIsTransactional)); - } + } } /// @@ -155,7 +153,7 @@ namespace Spring.Messaging.Core converters.Add(messageConverterObjectName, mc.Clone()); } else - { + { converters.Add(messageConverterObjectName, mc); } } @@ -224,4 +222,4 @@ namespace Spring.Messaging.Core #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Core/MessageQueueGatewaySupport.cs b/src/Spring/Spring.Messaging/Messaging/Core/MessageQueueGatewaySupport.cs index 5272ea09..cfb77f93 100644 --- a/src/Spring/Spring.Messaging/Messaging/Core/MessageQueueGatewaySupport.cs +++ b/src/Spring/Spring.Messaging/Messaging/Core/MessageQueueGatewaySupport.cs @@ -18,8 +18,6 @@ #endregion -using System; - using Spring.Objects.Factory; namespace Spring.Messaging.Core @@ -86,4 +84,4 @@ namespace Spring.Messaging.Core } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Core/MessageQueueMetadataCache.cs b/src/Spring/Spring.Messaging/Messaging/Core/MessageQueueMetadataCache.cs index c3f7490a..5539e9b0 100644 --- a/src/Spring/Spring.Messaging/Messaging/Core/MessageQueueMetadataCache.cs +++ b/src/Spring/Spring.Messaging/Messaging/Core/MessageQueueMetadataCache.cs @@ -1,6 +1,4 @@ -using System; using System.Collections; -using System.Collections.Generic; using Common.Logging; using Spring.Context; using Spring.Messaging.Support; @@ -218,4 +216,4 @@ namespace Spring.Messaging.Core } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Core/MessageQueueTemplate.cs b/src/Spring/Spring.Messaging/Messaging/Core/MessageQueueTemplate.cs index 30dad734..8bcf74bc 100644 --- a/src/Spring/Spring.Messaging/Messaging/Core/MessageQueueTemplate.cs +++ b/src/Spring/Spring.Messaging/Messaging/Core/MessageQueueTemplate.cs @@ -18,8 +18,6 @@ #endregion -using System; - using Spring.Context; using Spring.Messaging.Support.Converters; using Spring.Objects.Factory; @@ -43,7 +41,7 @@ namespace Spring.Messaging.Core /// /// Using the System.Messaging.MessageQueue class directly in application code has a number of /// shortcomings, namely that most operations are not thread safe (in particular Send) and - /// IMessageFormatter classes are not thread safe either. + /// IMessageFormatter classes are not thread safe either. /// /// /// The MessageQueueTemplate class overcomes these limitations letting you use a single instance @@ -57,7 +55,7 @@ namespace Spring.Messaging.Core /// via the Property DefaultMessageQueue. /// /// - /// The template's Send methods will select an appropriate transaction delivery settings so + /// The template's Send methods will select an appropriate transaction delivery settings so /// calling code does not need to explicitly manage this responsibility themselves and thus /// allowing for greater portability of code across different, but common, transactional usage scenarios. /// @@ -162,14 +160,14 @@ namespace Spring.Messaging.Core /// /// Gets the default message queue to be used on send/receive operations that do not /// have a destination parameter. The MessageQueue instance is resolved using - /// the template's , the default implementaion + /// the template's , the default implementaion /// will return an unique instance per thread. /// /// The default message queue. public MessageQueue DefaultMessageQueue { get - { + { return MessageQueueFactory.CreateMessageQueue(DefaultMessageQueueObjectName); } } @@ -181,7 +179,7 @@ namespace Spring.Messaging.Core /// from ReceiveAndConvert methods. /// /// - /// The default + /// The default /// /// The message converter. public IMessageConverter MessageConverter @@ -193,7 +191,7 @@ namespace Spring.Messaging.Core throw new InvalidOperationException( "No MessageConverter registered. Check configuration of MessageQueueTemplate."); } - return messageQueueFactory.CreateMessageConverter(MessageConverterObjectName); + return messageQueueFactory.CreateMessageConverter(MessageConverterObjectName); } } @@ -275,10 +273,10 @@ namespace Spring.Messaging.Core /// after it has injected all of an object's dependencies. /// /// - /// Ensure that the DefaultMessageQueueObjectName property is set, creates + /// Ensure that the DefaultMessageQueueObjectName property is set, creates /// a default implementation of the interface /// () that retrieves instances on a per-thread - /// basis, and registers in the Spring container a default implementation of + /// basis, and registers in the Spring container a default implementation of /// () with a /// simple System.String as its TargetType. /// @@ -287,7 +285,7 @@ namespace Spring.Messaging.Core if (MessageQueueFactory == null) { AssertUtils.ArgumentNotNull(applicationContext, "MessageQueueTemplate requires the ApplicationContext property to be set if the MessageQueueFactory property is not set for automatic create of the DefaultMessageQueueFactory"); - + DefaultMessageQueueFactory mqf = new DefaultMessageQueueFactory(); mqf.ApplicationContext = applicationContext; messageQueueFactory = mqf; @@ -330,7 +328,7 @@ namespace Spring.Messaging.Core { LOG.Warn( "The ApplicationContext property has not been set, so the MessageQueueMetadataCache can not be automatically generated. " + - "Please explictly set the MessageQueueMetadataCache using the property MetadataCache or set the ApplicationContext property. " + + "Please explictly set the MessageQueueMetadataCache using the property MetadataCache or set the ApplicationContext property. " + "This will only effect the use of MessageQueueTemplate when publishing to remote queues."); } @@ -527,24 +525,24 @@ namespace Spring.Messaging.Core /// /// /// - /// If the message queue is transactional and there is an ambient MessageQueueTransaction - /// in thread local storage (put there via the use of Spring's MessageQueueTransactionManager - /// or TransactionalMessageListenerContainer), the message will be sent transactionally using the - /// MessageQueueTransaction object in thread local storage. This lets you group together multiple - /// messaging operations within the same transaction without having to explicitly pass around the + /// If the message queue is transactional and there is an ambient MessageQueueTransaction + /// in thread local storage (put there via the use of Spring's MessageQueueTransactionManager + /// or TransactionalMessageListenerContainer), the message will be sent transactionally using the + /// MessageQueueTransaction object in thread local storage. This lets you group together multiple + /// messaging operations within the same transaction without having to explicitly pass around the /// MessageQueueTransaction object. /// /// - /// If the message queue is transactional but there is no ambient MessageQueueTransaction, - /// then a single message transaction is created on each messaging operation. - /// (MessageQueueTransactionType = Single). + /// If the message queue is transactional but there is no ambient MessageQueueTransaction, + /// then a single message transaction is created on each messaging operation. + /// (MessageQueueTransactionType = Single). /// /// - /// If there is an ambient System.Transactions transaction then that transaction will - /// be used (MessageQueueTransactionType = Automatic). + /// If there is an ambient System.Transactions transaction then that transaction will + /// be used (MessageQueueTransactionType = Automatic). /// /// - /// If the queue is not transactional, then a non-transactional send + /// If the queue is not transactional, then a non-transactional send /// (MessageQueueTransactionType = None) is used. /// /// @@ -575,7 +573,7 @@ namespace Spring.Messaging.Core if (LOG.IsWarnEnabled) { LOG.Warn("MetadataCache has not been initialized. Set the MetadataCache explicitly in standalone usage and/or " + - "configure the MessageQueueTemplate in an ApplicationContext. If deployed in an ApplicationContext by default " + + "configure the MessageQueueTemplate in an ApplicationContext. If deployed in an ApplicationContext by default " + "the MetadataCache will automaticaly populated."); } } @@ -612,11 +610,11 @@ namespace Spring.Messaging.Core else { /* From MSDN documentation - * If a non-transactional message is sent to a transactional queue, - * this component creates a single-message transaction for it, - * except in the case of referencing a queue on a remote computer - * using a direct format name. In this situation, if you do not specify a - * transaction context when sending a message, one is not created for you + * If a non-transactional message is sent to a transactional queue, + * this component creates a single-message transaction for it, + * except in the case of referencing a queue on a remote computer + * using a direct format name. In this situation, if you do not specify a + * transaction context when sending a message, one is not created for you * and the message will be sent to the dead-letter queue.*/ LOG.Warn("Sending message using implicit single-message transaction to transactional queue queue with path [" + mq.Path + "]."); mq.Send(msg, MessageQueueTransactionType.Single); @@ -639,7 +637,7 @@ namespace Spring.Messaging.Core else { if (LOG.IsDebugEnabled) - { + { LOG.Debug("Sending messsage without MSMQ transaction to non-transactional queue with path [" + mq.Path + "]."); } //Typical case, non TLS transaction, non-tx queue. @@ -688,4 +686,4 @@ namespace Spring.Messaging.Core #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Core/QueueUtils.cs b/src/Spring/Spring.Messaging/Messaging/Core/QueueUtils.cs index ea1830d2..c4e300be 100644 --- a/src/Spring/Spring.Messaging/Messaging/Core/QueueUtils.cs +++ b/src/Spring/Spring.Messaging/Messaging/Core/QueueUtils.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Context; using Spring.Messaging.Support.Converters; using Spring.Objects.Factory.Support; @@ -42,11 +41,11 @@ namespace Spring.Messaging.Core /// Registers the default message converter with the application context. /// /// The application context. - /// The name of the message converter to use for lookups with + /// The name of the message converter to use for lookups with /// . /// public static string RegisterDefaultMessageConverter(IApplicationContext applicationContext) - { + { //Create a default message converter to use. RootObjectDefinition rod = new RootObjectDefinition(typeof(XmlMessageConverter)); rod.PropertyValues.Add("TargetTypes", new Type[] { typeof(String) }); @@ -59,7 +58,7 @@ namespace Spring.Messaging.Core of.RegisterObjectDefinition(messageConverterObjectName, rod); } return messageConverterObjectName; - + } /// @@ -80,7 +79,7 @@ namespace Spring.Messaging.Core else { return null; - } + } } } @@ -127,7 +126,7 @@ namespace Spring.Messaging.Core public void BeforeCommit(bool readOnly) { - + } public void AfterCommit() @@ -156,4 +155,4 @@ namespace Spring.Messaging.Core /// bool SynchedLocalTransactionAllowed { get; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/AbstractListenerContainer.cs b/src/Spring/Spring.Messaging/Messaging/Listener/AbstractListenerContainer.cs index f819309f..8d6f65d2 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/AbstractListenerContainer.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/AbstractListenerContainer.cs @@ -18,9 +18,6 @@ #endregion - -using System; -using System.Threading; using Common.Logging; using Spring.Objects.Factory; @@ -37,7 +34,7 @@ namespace Spring.Messaging.Listener /// For a concrete listener programming model, check out the /// subclass. For a concrete listener /// invoker mechanism, check out the , - /// , or + /// , or /// classes. /// /// @@ -88,7 +85,7 @@ namespace Spring.Messaging.Listener /// - /// Gets a value indicating whether this Container is running, + /// Gets a value indicating whether this Container is running, /// that is whether it has been started and not stopped yet. /// /// true if running; otherwise, false. @@ -156,7 +153,7 @@ namespace Spring.Messaging.Listener /// Initializes this container. Calls the abstract method to /// initialize the listening infrastructure (i.e. subclasses will typically /// resolve a MessageQueue instance from a MessageQueueObjectName) and then calls - /// the abstract method DoStart if the property is set to true, + /// the abstract method DoStart if the property is set to true, ///
public virtual void Initialize() { @@ -174,7 +171,7 @@ namespace Spring.Messaging.Listener } /// - /// Sets the container state to inactive and not running, calls template method + /// Sets the container state to inactive and not running, calls template method /// /// public virtual void Shutdown() @@ -234,7 +231,7 @@ namespace Spring.Messaging.Listener ///
/// /// This implementation always returns true; the default 'running' - /// state is purely determined by and + /// state is purely determined by and /// /// Subclasses may override this method to check against temporary /// conditions that prevent listeners from actually running. In other words, @@ -264,4 +261,4 @@ namespace Spring.Messaging.Listener #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/AbstractMessageListenerContainer.cs b/src/Spring/Spring.Messaging/Messaging/Listener/AbstractMessageListenerContainer.cs index 377c5b84..a3ca0d10 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/AbstractMessageListenerContainer.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/AbstractMessageListenerContainer.cs @@ -18,7 +18,6 @@ #endregion -using System; using Common.Logging; using Spring.Context; using Spring.Messaging.Core; @@ -36,9 +35,9 @@ namespace Spring.Messaging.Listener /// /// Defines a minimal programming model for message listener containers. They are expected to /// invoke a upon asynchronous receives of a MSMQ message. Access to - /// obtain MessageQueue and instances is available through the - /// property, the default implementation - /// provides per-thread instances of these classes. + /// obtain MessageQueue and instances is available through the + /// property, the default implementation + /// provides per-thread instances of these classes. /// /// Mark Pollack public abstract class AbstractMessageListenerContainer : AbstractListenerContainer, IApplicationContextAware @@ -58,7 +57,7 @@ namespace Spring.Messaging.Listener /// /// Most operations within the MessageListener container hierarchy use methods on the - /// MessageQueue instance which are thread safe (BeginPeek, BeginReceive, + /// MessageQueue instance which are thread safe (BeginPeek, BeginReceive, /// EndPeek, EndReceive, GetAllMessages, Peek, and Receive). When using another /// method on the shared MessageQueue instance, wrap calls with a lock on this object. /// @@ -83,7 +82,7 @@ namespace Spring.Messaging.Listener } /// - /// Gets or sets the name of the message queue object, as refered to in the + /// Gets or sets the name of the message queue object, as refered to in the /// Spring configuration, that will be used to create a DefaultMessageQueue instance /// for consuming messages in the container. /// @@ -185,7 +184,7 @@ namespace Spring.Messaging.Listener /// /// Template method that execute listener with the provided message if /// is true. Subclasses will call - /// this method at the appropriate point in their processing lifecycle, for example + /// this method at the appropriate point in their processing lifecycle, for example /// committing or rolling back a transaction if needed. /// /// Calls the template method @@ -207,7 +206,7 @@ namespace Spring.Messaging.Listener /// /// Invokes the listener if it is not null. Invokes the method . /// Can be overridden in subclasses. - /// + ///
/// The message. protected virtual void InvokeListener(Message message) { @@ -247,4 +246,4 @@ namespace Spring.Messaging.Listener #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/AbstractPeekingMessageListenerContainer.cs b/src/Spring/Spring.Messaging/Messaging/Listener/AbstractPeekingMessageListenerContainer.cs index a57a4539..4b1ca7fd 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/AbstractPeekingMessageListenerContainer.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/AbstractPeekingMessageListenerContainer.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Threading; using Common.Logging; #if NETSTANDARD @@ -32,7 +30,7 @@ namespace Spring.Messaging.Listener { /// /// Base class for listener container implementations which are based on Peeking for messages on - /// a MessageQueue. Peeking is the only resource efficient approach that can be used in + /// a MessageQueue. Peeking is the only resource efficient approach that can be used in /// order to have MessageQueue receipt in conjunction with transactions, either local MSMQ transactions, /// local ADO.NET based transactions, or DTC transactions. See SimpleMessageListenerContainer for /// an implementation based on a synchronous receives and you do not require transactional support. @@ -41,9 +39,9 @@ namespace Spring.Messaging.Listener /// The number of threads that will be created for processing messages after the Peek occurs /// is set via the property MaxConcurrentListeners. Each processing thread will continue to listen /// for messages up until the the timeout value specified by ListenerTimeLimit or until - /// there are no more messages on the queue (which ver comes first). + /// there are no more messages on the queue (which ver comes first). /// - /// The default value of + /// The default value of /// ListenerTimeLimit is TimeSpan.Zero, meaning that only one attempt to recieve a message from the /// queue will be performed by each listener thread. /// @@ -82,8 +80,8 @@ namespace Spring.Messaging.Listener #region Properties /// - /// Gets or sets the listener time limit to continuously receive messages. - /// The value is specified in milliseconds. The default value is TimeSpan.Zero, + /// Gets or sets the listener time limit to continuously receive messages. + /// The value is specified in milliseconds. The default value is TimeSpan.Zero, /// indicating to only perform one Receive operation per Peek trigger. /// /// The listener time limit in millis. @@ -239,7 +237,7 @@ namespace Spring.Messaging.Listener int numberOfListenersToSchedule = 0; - // lock also prevents listeners that are about to exit from invoking + // lock also prevents listeners that are about to exit from invoking // StartPeeking while new listeners are being scheduled. lock (activeListenerMonitor) { @@ -273,7 +271,7 @@ namespace Spring.Messaging.Listener { switch ((int) mex.MessageQueueErrorCode) { - case -1073741536: // = 0xc0000120 "STATUS_CANCELLED". + case -1073741536: // = 0xc0000120 "STATUS_CANCELLED". LOG.Info("Asynchronous Peek Thread sent STATUS_CANCELLED."); break; default: @@ -302,7 +300,7 @@ namespace Spring.Messaging.Listener /// Execute the listener for a message received from the given queue /// wrapping the entire operation in an external transaction if demanded. /// - /// The DefaultMessageQueue upon which the call to receive should be + /// The DefaultMessageQueue upon which the call to receive should be /// called. protected virtual void ReceiveAndExecute(object state) { @@ -425,7 +423,7 @@ namespace Spring.Messaging.Listener /// - /// Configures the initial peek thread, setting it to be a background thread. + /// Configures the initial peek thread, setting it to be a background thread. /// Can be overridden in subclasses. /// /// The peek thread. @@ -447,9 +445,9 @@ namespace Spring.Messaging.Listener /// /// Template method that gets called right before a new message is received, i.e. - /// messageQueue.Receive(). + /// messageQueue.Receive(). /// - /// It allows subclasses to modify the state of the MessageQueue + /// It allows subclasses to modify the state of the MessageQueue /// before receiving which maybe required when using remote queues /// protected virtual void BeforeMessageReceived(MessageQueue messageQueue) @@ -458,4 +456,4 @@ namespace Spring.Messaging.Listener #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/AbstractSendToQueueExceptionHandler.cs b/src/Spring/Spring.Messaging/Messaging/Listener/AbstractSendToQueueExceptionHandler.cs index 86e5fb70..b990a8ae 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/AbstractSendToQueueExceptionHandler.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/AbstractSendToQueueExceptionHandler.cs @@ -1,4 +1,3 @@ -using System; using System.Collections; using Spring.Context; using Spring.Messaging.Core; @@ -13,7 +12,7 @@ using System.Messaging; namespace Spring.Messaging.Listener { /// - /// Provides common functionality to exception handlers that will send the exceptional message to + /// Provides common functionality to exception handlers that will send the exceptional message to /// another queue. /// /// Allows for setting of MaxRetry limit and contains an internal dictionary to keep track @@ -110,7 +109,7 @@ namespace Spring.Messaging.Listener #region IInitializingObject Members /// - /// Ensure that the MessageQueueObject name is set and creates a + /// Ensure that the MessageQueueObject name is set and creates a /// if no /// is specified. /// @@ -132,10 +131,10 @@ namespace Spring.Messaging.Listener mqf.ApplicationContext = applicationContext; messageQueueFactory = mqf; } - //Create an instance so we can 'fail-fast' if there isn't an DefaultMessageQueue unde + //Create an instance so we can 'fail-fast' if there isn't an DefaultMessageQueue unde MessageQueue mq = MessageQueueFactory.CreateMessageQueue(messageQueueObjectName); } #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/AbstractTransactionalMessageListenerContainer.cs b/src/Spring/Spring.Messaging/Messaging/Listener/AbstractTransactionalMessageListenerContainer.cs index 6b6400ef..bf5961f4 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/AbstractTransactionalMessageListenerContainer.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/AbstractTransactionalMessageListenerContainer.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Threading; using Common.Logging; using Spring.Data.Core; using Spring.Messaging.Core; @@ -35,15 +33,15 @@ using System.Messaging; namespace Spring.Messaging.Listener { /// - /// An implementation of a Peeking based MessageListener container that starts a transaction + /// An implementation of a Peeking based MessageListener container that starts a transaction /// before recieving a message. The implementation determines /// the type of transaction that will be started. An exception while processing the message will /// result in a rollback, otherwise a transaction commit will be performed. /// /// - /// The type of transaction that can be started can either be local transaction, + /// The type of transaction that can be started can either be local transaction, /// (e.g. , a local messaging transaction - /// (e.g. or a DTC based transaction, + /// (e.g. or a DTC based transaction, /// (eg. . /// /// Transaction properties can be set using the property @@ -116,7 +114,7 @@ namespace Spring.Messaging.Listener Thread.Sleep(RecoveryTimeSpan); throw; } - //if status has indicated rollback only, will rollback. + //if status has indicated rollback only, will rollback. PlatformTransactionManager.Commit(status); return messageReceived; } @@ -149,4 +147,4 @@ namespace Spring.Messaging.Listener } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/DistributedTxMessageListenerContainer.cs b/src/Spring/Spring.Messaging/Messaging/Listener/DistributedTxMessageListenerContainer.cs index ce699a12..3fb0fc29 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/DistributedTxMessageListenerContainer.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/DistributedTxMessageListenerContainer.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Transactions; using Common.Logging; using Spring.Transaction; @@ -42,9 +41,9 @@ namespace Spring.Messaging.Listener /// Database and messaging operations will commit or rollback together. /// /// - /// If you only want local message based transactions use the + /// If you only want local message based transactions use the /// . With some simple programming - /// you may also achieve 'exactly once' processing using the + /// you may also achieve 'exactly once' processing using the /// . /// /// @@ -201,7 +200,7 @@ namespace Spring.Messaging.Listener } /// - /// Handles the distributed transaction listener exception by calling the + /// Handles the distributed transaction listener exception by calling the /// if not null. /// /// The exception. @@ -215,4 +214,4 @@ namespace Spring.Messaging.Listener } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/IDistributedTransactionExceptionHandler.cs b/src/Spring/Spring.Messaging/Messaging/Listener/IDistributedTransactionExceptionHandler.cs index f1bdcd6b..584b1f6f 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/IDistributedTransactionExceptionHandler.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/IDistributedTransactionExceptionHandler.cs @@ -18,8 +18,6 @@ #endregion -using System; - #if NETSTANDARD using Experimental.System.Messaging; #else @@ -68,4 +66,4 @@ namespace Spring.Messaging.Listener /// The message. void OnException(Exception exception, Message message); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/IExceptionHandler.cs b/src/Spring/Spring.Messaging/Messaging/Listener/IExceptionHandler.cs index f911245e..5cdee42d 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/IExceptionHandler.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/IExceptionHandler.cs @@ -18,8 +18,6 @@ #endregion -using System; - #if NETSTANDARD using Experimental.System.Messaging; #else @@ -35,10 +33,10 @@ namespace Spring.Messaging.Listener /// /// A non-transactional receive will remove the message from the queue. Non-transactional /// receivers do not suffer from poison messages since there is no redelivery by MSMQ. - /// Typical actions to perform are to log the message or place it in another queue. + /// Typical actions to perform are to log the message or place it in another queue. /// If placed in another queue, another message listener container can be used to /// process the message later, assuming the root cause of the original exception is - /// transient in nature. + /// transient in nature. /// public interface IExceptionHandler { @@ -49,4 +47,4 @@ namespace Spring.Messaging.Listener /// The message. void OnException(Exception exception, Message message); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/IMessageTransactionExceptionHandler.cs b/src/Spring/Spring.Messaging/Messaging/Listener/IMessageTransactionExceptionHandler.cs index 47a392be..8560c8dd 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/IMessageTransactionExceptionHandler.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/IMessageTransactionExceptionHandler.cs @@ -18,8 +18,6 @@ #endregion -using System; - #if NETSTANDARD using Experimental.System.Messaging; #else @@ -29,11 +27,11 @@ using System.Messaging; namespace Spring.Messaging.Listener { /// - /// The exception handler within a transactional context. + /// The exception handler within a transactional context. /// /// - /// The return value indicates to the invoker (typically a - /// ) whether the + /// The return value indicates to the invoker (typically a + /// ) whether the /// MessageTransaction that is associated with the delivery of this message /// should be rolled back (placing the message back on the transactional queue /// for redelivery) or commited (removing the message from the transactional queue) @@ -54,4 +52,4 @@ namespace Spring.Messaging.Listener TransactionAction OnException(Exception exception, Message message, MessageQueueTransaction messageQueueTransaction); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/ListenerExecutionFailedException.cs b/src/Spring/Spring.Messaging/Messaging/Listener/ListenerExecutionFailedException.cs index 76faa9de..7f7d3231 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/ListenerExecutionFailedException.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/ListenerExecutionFailedException.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Runtime.Serialization; namespace Spring.Messaging.Listener @@ -62,4 +61,4 @@ namespace Spring.Messaging.Listener { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/MessageListenerAdapter.cs b/src/Spring/Spring.Messaging/Messaging/Listener/MessageListenerAdapter.cs index 756c8cf4..66dac0d8 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/MessageListenerAdapter.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/MessageListenerAdapter.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using Common.Logging; using Spring.Context; using Spring.Expressions; @@ -37,7 +36,7 @@ namespace Spring.Messaging.Listener { /// /// Message listener adapter that delegates the handling of messages to target - /// listener methods via reflection , + /// listener methods via reflection , /// with flexible message type conversion. /// Allows listener methods to operate on message content types, completely /// independent from the MSMQ API. @@ -48,8 +47,8 @@ namespace Spring.Messaging.Listener /// being passed into the target handler method, to let the target method /// operate on message content types such as String or business object instead of /// . Message type conversion is delegated to a Spring - /// By default, an - /// with TargetType set to System.String is used. If you do not want such automatic + /// By default, an + /// with TargetType set to System.String is used. If you do not want such automatic /// message conversion taking place, then be sure to set the /// MessageConverter property to null. /// @@ -57,7 +56,7 @@ namespace Spring.Messaging.Listener /// If a target handler method returns a non-null object (for example, with a /// message content type such as String), it will get /// wrapped in a MSMQ Message and sent to the response destination - /// (either using the MSMQ Message.ResponseQueue property or + /// (either using the MSMQ Message.ResponseQueue property or /// ) specified default response queue /// destination). /// @@ -85,7 +84,7 @@ namespace Spring.Messaging.Listener /// /// If your implementation will return multiple object /// types, overloading the handler method is perfectly acceptible, the most specific matching - /// method will be used. A method with an object signature would be consider a + /// method will be used. A method with an object signature would be consider a /// 'catch-all' method /// /// @@ -96,7 +95,7 @@ namespace Spring.Messaging.Listener /// void DoWork(InvoiceRequest invoiceRequest); /// void DoWork(object obj); /// } - /// + /// /// /// The last example shows how to send a message to the ResponseQueue for those /// methods that do not return void. @@ -193,7 +192,7 @@ namespace Spring.Messaging.Listener public string DefaultHandlerMethod { get { return defaultHandlerMethod; } - set { + set { defaultHandlerMethod = value; ProcessingExpression = Expression.Parse(defaultHandlerMethod + "(#convertedObject)"); } @@ -326,7 +325,7 @@ namespace Spring.Messaging.Listener /// result objects, which will be wrapped in a response message and sent to a /// response destination. /// - /// Alternatively, specify a "DefaultResponseQueueName" + /// Alternatively, specify a "DefaultResponseQueueName" /// to be dynamically resolved via the MessageQueueFactory. /// /// @@ -404,8 +403,8 @@ namespace Spring.Messaging.Listener string methodName = GetHandlerMethodName(message, convertedMessage); object[] listenerArguments = BuildListenerArguments(convertedMessage); object result = InvokeListenerMethod(methodName, listenerArguments); - - + + //Invoke message handler method and get result. //object result = processingExpression.GetValue(handlerObject, vars); if (result != null) @@ -442,7 +441,7 @@ namespace Spring.Messaging.Listener /// method having a corresponding single argument of the array's type declared.

///

This can be overridden to treat special message content such as arrays /// differently, for example passing in each element of the message array - /// as distinct method argument.

+ /// as distinct method argument.

///
/// The converted message. /// the array of arguments to be passed into the @@ -454,7 +453,7 @@ namespace Spring.Messaging.Listener } /// - /// Invokes the specified listener method. This default implementation can only handle invoking a + /// Invokes the specified listener method. This default implementation can only handle invoking a /// single argument method. /// /// Name of the listener method. @@ -468,7 +467,7 @@ namespace Spring.Messaging.Listener if (methodName.CompareTo(DefaultHandlerMethod) != 0) { //This is just to handle the case of overriding GetHandlerMethodName in a subclass and nothing else. - return ExpressionEvaluator.GetValue(handlerObject, methodName + "(#convertedObject)", vars); + return ExpressionEvaluator.GetValue(handlerObject, methodName + "(#convertedObject)", vars); } // the normal case of using the cached expression. return processingExpression.GetValue(handlerObject, vars); @@ -523,7 +522,7 @@ namespace Spring.Messaging.Listener /// The outgoing message about to be sent. protected virtual void SendResponse(MessageQueue destination, Message response) { - //Will send with appropriate transaction semantics + //Will send with appropriate transaction semantics if (logger.IsDebugEnabled) { logger.Debug("Sending response message to path = [" + destination.Path + "]"); @@ -543,7 +542,7 @@ namespace Spring.Messaging.Listener if (converter != null) { // This is the default Message converter registered in QueueUtils.RegisterDefaultMessageConverter - // and used by MessageQueueTemplate and the MessageListenerAdapter if no other Message converage is + // and used by MessageQueueTemplate and the MessageListenerAdapter if no other Message converage is // set via the property MessageConverteryObjectName. if (messageConverterObjectName.Equals("__XmlMessageConverter__")) { @@ -607,4 +606,4 @@ namespace Spring.Messaging.Listener return replyTo; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/NonTransactionalMessageListenerContainer.cs b/src/Spring/Spring.Messaging/Messaging/Listener/NonTransactionalMessageListenerContainer.cs index 18197c99..d1730af8 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/NonTransactionalMessageListenerContainer.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/NonTransactionalMessageListenerContainer.cs @@ -18,8 +18,6 @@ #endregion -using System; - using Common.Logging; #if NETSTANDARD @@ -35,7 +33,7 @@ namespace Spring.Messaging.Listener /// receive operation with a transaction. ///
/// - /// Exceptions that occur during message processing are handled by an instance + /// Exceptions that occur during message processing are handled by an instance /// of . /// /// Mark Pollack @@ -179,4 +177,4 @@ namespace Spring.Messaging.Listener return true; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/SendToQueueDistributedTransactionExceptionHandler.cs b/src/Spring/Spring.Messaging/Messaging/Listener/SendToQueueDistributedTransactionExceptionHandler.cs index 2dc46dac..0585d21d 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/SendToQueueDistributedTransactionExceptionHandler.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/SendToQueueDistributedTransactionExceptionHandler.cs @@ -18,8 +18,6 @@ #endregion - -using System; using Common.Logging; #if NETSTANDARD @@ -31,8 +29,8 @@ using System.Messaging; namespace Spring.Messaging.Listener { /// - /// detects poison messages by tracking the Message Id property in memory with a count of how many - /// times an exception has occurred. If that count is greater than the handler's MaxRetry count it + /// detects poison messages by tracking the Message Id property in memory with a count of how many + /// times an exception has occurred. If that count is greater than the handler's MaxRetry count it /// will be sent to another queue. The queue to send the message to is specified via the property M /// essageQueueObjectName. /// @@ -152,4 +150,4 @@ namespace Spring.Messaging.Listener } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/SendToQueueExceptionHandler.cs b/src/Spring/Spring.Messaging/Messaging/Listener/SendToQueueExceptionHandler.cs index fd69ff05..61514185 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/SendToQueueExceptionHandler.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/SendToQueueExceptionHandler.cs @@ -18,8 +18,6 @@ #endregion - -using System; using Common.Logging; #if NETSTANDARD @@ -215,4 +213,4 @@ namespace Spring.Messaging.Listener set { count = value; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Listener/TransactionalMessageListenerContainer.cs b/src/Spring/Spring.Messaging/Messaging/Listener/TransactionalMessageListenerContainer.cs index fbb25cd0..a245d289 100644 --- a/src/Spring/Spring.Messaging/Messaging/Listener/TransactionalMessageListenerContainer.cs +++ b/src/Spring/Spring.Messaging/Messaging/Listener/TransactionalMessageListenerContainer.cs @@ -18,7 +18,6 @@ #endregion -using System; using Common.Logging; using Spring.Data.Core; using Spring.Messaging.Core; @@ -41,47 +40,47 @@ namespace Spring.Messaging.Listener /// /// This container distinguishes between two types of /// implementations. - /// + /// /// If you specify a then - /// a MSMQ will be started - /// before receiving the message and used as part of the container's recieve operation. The - /// binds the - /// to thread local storage and as such will implicitly be used by + /// a MSMQ will be started + /// before receiving the message and used as part of the container's recieve operation. The + /// binds the + /// to thread local storage and as such will implicitly be used by /// send and receive operations to a transactional queue. /// /// /// Service layer operations that are called inside the message listener will typically /// be transactional based on using standard Spring declarative transaction management - /// functionality. In case of exceptions in the service layer, the database operation - /// will have been rolled back and the - /// that is later invoked should decide to either commit the surrounding local - /// MSMQ based transaction (removing the message from the queue) or to rollback + /// functionality. In case of exceptions in the service layer, the database operation + /// will have been rolled back and the + /// that is later invoked should decide to either commit the surrounding local + /// MSMQ based transaction (removing the message from the queue) or to rollback /// (placing the message back on the queue for redelivery). /// /// - /// The use of a transactional service layer in combination with + /// The use of a transactional service layer in combination with /// a container managed is a powerful combination - /// that can be used to achieve "exactly one" transaction message processing with - /// database operations that are commonly associated with using transactional messaging and + /// that can be used to achieve "exactly one" transaction message processing with + /// database operations that are commonly associated with using transactional messaging and /// distributed transactions (i.e. both the messaging and database operation commit or rollback - /// together). + /// together). /// /// /// The additional programming logic needed to achieve this is to keep track of the Message.Id - /// that has been processed successfully within the transactional service layer. - /// This is needed as there may be a system failure (e.g. power goes off) + /// that has been processed successfully within the transactional service layer. + /// This is needed as there may be a system failure (e.g. power goes off) /// between the 'inner' database commit and the 'outer' messaging commit, resulting /// in message redelivery. The transactional service layer needs logic to detect if incoming /// message was processed successfully. It can do this by checking the database for an /// indication of successfull processing, perhaps by recording the Message.Id itself in a - /// status table. If the transactional service layer determines that the message has - /// already been processed, it can throw a specific exception for thise case. The - /// container's exception handler will recognize this exception type and vote to commit - /// (remove from the queue) the 'outer' messaging transaction. - /// Spring provides an exception handler with this functionality, + /// status table. If the transactional service layer determines that the message has + /// already been processed, it can throw a specific exception for thise case. The + /// container's exception handler will recognize this exception type and vote to commit + /// (remove from the queue) the 'outer' messaging transaction. + /// Spring provides an exception handler with this functionality, /// see for more information. /// - /// If you specify an implementation of + /// If you specify an implementation of /// (e.g. or HibernateTransactionManager) then /// an local database transaction will be started before receiving the message. By default, /// the container will also start a local @@ -91,24 +90,24 @@ namespace Spring.Messaging.Listener /// to false. Also by default, the /// will be bound to thread local storage such that any /// send or recieve operations will participate transparently in the same - /// . If you do not want this behavior + /// . If you do not want this behavior /// set the property to false. /// /// In case of exceptions during processing - /// when using an implementation of - /// (e.g. and starting a container managed + /// when using an implementation of + /// (e.g. and starting a container managed /// ) the container's - /// will determine if the + /// will determine if the /// should commit (removing it from the queue) - /// or rollback (placing it back on the queue for redelivery). The listener + /// or rollback (placing it back on the queue for redelivery). The listener /// exception will always - /// trigger a rollback in the 'outer' (e.g. + /// trigger a rollback in the 'outer' (e.g. /// or HibernateTransactionManager) based transaction. /// /// /// PoisonMessage handing, that is endless redelivery of a message due to exceptions - /// during processing, can be detected using implementatons of the - /// interface. A specific implementation + /// during processing, can be detected using implementatons of the + /// interface. A specific implementation /// is provided that will move the poison message to another queue after a maximum number /// of redelivery attempts. See for more information. /// @@ -170,7 +169,7 @@ namespace Spring.Messaging.Listener } /// - /// Gets or sets a value indicating whether expose the + /// Gets or sets a value indicating whether expose the /// container managed to thread local storage /// where it will be automatically used by send /// and receive operations. @@ -178,7 +177,7 @@ namespace Spring.Messaging.Listener /// /// Using an will always exposes a /// to thread local storage. This property - /// only has effect when using a non-DTC based + /// only has effect when using a non-DTC based /// /// /// true if [expose container managed message queue transaction]; otherwise, false. @@ -218,12 +217,12 @@ namespace Spring.Messaging.Listener if (!isRtm && !isQtm) { - throw new ArgumentException("Can not use the provied IPlatformTransactionManager of type " - + PlatformTransactionManager.GetType() + throw new ArgumentException("Can not use the provied IPlatformTransactionManager of type " + + PlatformTransactionManager.GetType() + ". It must implement IResourceTransactionManager or be a MessageQueueTransactionManager."); } - //Set useContainerManagedMessageQueueTransaction = true when using + //Set useContainerManagedMessageQueueTransaction = true when using // 1. non-DTC based transaction manager // 2. not the MessageQueueTransactionManager. if (!useMessageQueueTransactionManagerCalled && isRtm && !isQtm) @@ -664,7 +663,7 @@ namespace Spring.Messaging.Listener /// The exception thrown during message processing. /// The message. /// The message queue transaction. - /// TransactionAction.Rollback if no exception handler is defined, otherwise the + /// TransactionAction.Rollback if no exception handler is defined, otherwise the /// TransactionAction returned by the exception handler protected virtual TransactionAction InvokeTransactionalExceptionListener(Exception e, Message message, MessageQueueTransaction @@ -684,4 +683,4 @@ namespace Spring.Messaging.Listener #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/MessagingException.cs b/src/Spring/Spring.Messaging/Messaging/MessagingException.cs index 7ecf25c2..ad261557 100644 --- a/src/Spring/Spring.Messaging/Messaging/MessagingException.cs +++ b/src/Spring/Spring.Messaging/Messaging/MessagingException.cs @@ -1,4 +1,3 @@ -using System; using System.Runtime.Serialization; namespace Spring.Messaging @@ -51,4 +50,4 @@ namespace Spring.Messaging #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Support/Converters/IMessageConverter.cs b/src/Spring/Spring.Messaging/Messaging/Support/Converters/IMessageConverter.cs index 6533ce81..1652f5f6 100644 --- a/src/Spring/Spring.Messaging/Messaging/Support/Converters/IMessageConverter.cs +++ b/src/Spring/Spring.Messaging/Messaging/Support/Converters/IMessageConverter.cs @@ -18,8 +18,6 @@ #endregion -using System; - #if NETSTANDARD using Experimental.System.Messaging; #else @@ -47,4 +45,4 @@ namespace Spring.Messaging.Support.Converters /// the object object FromMessage(Message message); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Support/Converters/MessageConverterFactoryObject.cs b/src/Spring/Spring.Messaging/Messaging/Support/Converters/MessageConverterFactoryObject.cs index 92446196..5580f8c9 100644 --- a/src/Spring/Spring.Messaging/Messaging/Support/Converters/MessageConverterFactoryObject.cs +++ b/src/Spring/Spring.Messaging/Messaging/Support/Converters/MessageConverterFactoryObject.cs @@ -18,14 +18,12 @@ #endregion - -using System; using Spring.Objects.Factory.Config; namespace Spring.Messaging.Support.Converters { /// - /// Internal class to that users can specify a delegate function to register with the application context that + /// Internal class to that users can specify a delegate function to register with the application context that /// will create a IMessageConverter instance easily at runtime. /// /// Mark Pollack @@ -77,4 +75,4 @@ namespace Spring.Messaging.Support.Converters #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Support/Converters/XmlMessageConverter.cs b/src/Spring/Spring.Messaging/Messaging/Support/Converters/XmlMessageConverter.cs index 3b1cbb62..7fb3b744 100644 --- a/src/Spring/Spring.Messaging/Messaging/Support/Converters/XmlMessageConverter.cs +++ b/src/Spring/Spring.Messaging/Messaging/Support/Converters/XmlMessageConverter.cs @@ -18,8 +18,6 @@ #endregion - -using System; using Spring.Util; #if NETSTANDARD @@ -32,7 +30,7 @@ namespace Spring.Messaging.Support.Converters { /// /// An implementation that delegates to an instance of - /// to convert messages. + /// to convert messages. /// /// Mark Pollack public class XmlMessageConverter : IMessageConverter @@ -128,4 +126,4 @@ namespace Spring.Messaging.Support.Converters #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Messaging/Messaging/Support/MessageQueueFactoryObject.cs b/src/Spring/Spring.Messaging/Messaging/Support/MessageQueueFactoryObject.cs index 651f1c04..7cf08ec0 100644 --- a/src/Spring/Spring.Messaging/Messaging/Support/MessageQueueFactoryObject.cs +++ b/src/Spring/Spring.Messaging/Messaging/Support/MessageQueueFactoryObject.cs @@ -18,7 +18,6 @@ #endregion -using System; using Spring.Objects.Factory; using Spring.Objects.Factory.Config; @@ -93,7 +92,7 @@ namespace Spring.Messaging.Support /// - /// Gets or sets a value indicating whether to create the MessageQueue instance with + /// Gets or sets a value indicating whether to create the MessageQueue instance with /// exclusive read access to the first application that accesses the queue /// /// @@ -154,7 +153,7 @@ namespace Spring.Messaging.Support /// - /// Sets a value indicating whether to set the filter values of common Message Queuing properties + /// Sets a value indicating whether to set the filter values of common Message Queuing properties /// to true and the integer-valued properties to their default values.. /// /// @@ -166,10 +165,10 @@ namespace Spring.Messaging.Support } /// - /// Gets or sets a value indicating whether the queue is a remote queue. + /// Gets or sets a value indicating whether the queue is a remote queue. /// /// - /// The operations that one can perform on the MessageQueue depend on if it is local or remote, for + /// The operations that one can perform on the MessageQueue depend on if it is local or remote, for /// example checking if it is transactional. This is very difficult to determine programmatically. /// The property was made virtual so it can be overridden to take into account custom heuristics you /// may want to use to determine this programmatically. @@ -275,4 +274,4 @@ namespace Spring.Messaging.Support get { return ObjectName; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/AdaptableJobFactory.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/AdaptableJobFactory.cs index 28df74f9..14a5268f 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/AdaptableJobFactory.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/AdaptableJobFactory.cs @@ -14,16 +14,13 @@ * limitations under the License. */ -using System; -using System.Threading; -using System.Threading.Tasks; using Quartz; using Quartz.Spi; using Quartz.Util; namespace Spring.Scheduling.Quartz { - /// + /// /// JobFactory implementation that supports /// objects as well as standard Quartz instances. /// @@ -50,7 +47,7 @@ namespace Spring.Scheduling.Quartz /// and other info relating to the trigger firing can be obtained. /// The scheduler instance. /// the newly instantiated Job - /// SchedulerException if there is a problem instantiating the Job. + /// SchedulerException if there is a problem instantiating the Job. public virtual IJob NewJob(TriggerFiredBundle bundle, IScheduler scheduler) { try @@ -71,7 +68,7 @@ namespace Spring.Scheduling.Quartz { } - /// + /// /// Create an instance of the specified job class. ///

/// Can be overridden to post-process the job instance. @@ -87,7 +84,7 @@ namespace Spring.Scheduling.Quartz return ObjectUtils.InstantiateType(bundle.JobDetail.JobType); } - /// + /// /// Adapt the given job object to the Quartz Job interface. /// /// @@ -126,4 +123,4 @@ namespace Spring.Scheduling.Quartz throw new ArgumentException(message); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/CronTriggerObject.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/CronTriggerObject.cs index a4623c6d..6a439dd2 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/CronTriggerObject.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/CronTriggerObject.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Collections; using System.Reflection; using Quartz; @@ -60,7 +59,7 @@ namespace Spring.Scheduling.Quartz private string objectName; private TimeSpan startDelay; - /// + /// /// Register objects in the JobDataMap via a given Map. /// /// @@ -79,7 +78,7 @@ namespace Spring.Scheduling.Quartz } } - /// + /// /// Set the misfire instruction via the name of the corresponding /// constant in the CronTrigger class. /// Default is . @@ -109,7 +108,7 @@ namespace Spring.Scheduling.Quartz set => objectName = value; } - /// + /// /// Set the JobDetail that this trigger should be associated with. /// /// @@ -129,7 +128,7 @@ namespace Spring.Scheduling.Quartz /// /// /// - /// The start delay is added to the current system UTC time + /// The start delay is added to the current system UTC time /// (when the object starts) to control the /// of the trigger. /// @@ -232,4 +231,4 @@ namespace Spring.Scheduling.Quartz throw new Exception($"Unknown field '{field}'"); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/DelegatingJob.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/DelegatingJob.cs index 07a44e04..e41896ca 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/DelegatingJob.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/DelegatingJob.cs @@ -14,14 +14,12 @@ * limitations under the License. */ -using System.Threading; -using System.Threading.Tasks; using Quartz; using Spring.Util; namespace Spring.Scheduling.Quartz { - /// + /// /// Simple Quartz IJob adapter that delegates to a /// given instance. /// @@ -38,7 +36,7 @@ namespace Spring.Scheduling.Quartz { private readonly ThreadStart delegateInstance; - /// + /// /// Create a new DelegatingJob. /// /// @@ -50,7 +48,7 @@ namespace Spring.Scheduling.Quartz this.delegateInstance = delegateInstance; } - /// + /// /// Delegates execution to the underlying ThreadStart. /// public virtual Task Execute(IJobExecutionContext context) @@ -59,4 +57,4 @@ namespace Spring.Scheduling.Quartz return Task.FromResult(true); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/ITaskExecutor.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/ITaskExecutor.cs index c59eee19..d8acdca1 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/ITaskExecutor.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/ITaskExecutor.cs @@ -14,12 +14,10 @@ * limitations under the License. */ -using System.Threading; - namespace Spring.Scheduling { /// - /// + /// /// public interface ITaskExecutor { @@ -28,4 +26,4 @@ namespace Spring.Scheduling /// void Execute(ThreadStart runnable); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/IThreadRunnable.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/IThreadRunnable.cs index 93b2377c..6a872c7e 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/IThreadRunnable.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/IThreadRunnable.cs @@ -16,8 +16,6 @@ // */ #endregion -using System.Threading.Tasks; - namespace Spring.Scheduling.Quartz { /// @@ -30,4 +28,4 @@ namespace Spring.Scheduling.Quartz /// Task Run(); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/JobDetailObject.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/JobDetailObject.cs index 9cc9be26..bb8b5028 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/JobDetailObject.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/JobDetailObject.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Collections; using Quartz; using Quartz.Impl; @@ -23,7 +22,7 @@ using Spring.Objects.Factory; namespace Spring.Scheduling.Quartz { - /// + /// /// Convenience subclass of Quartz' JobDetail class that eases properties based /// usage. /// @@ -34,7 +33,7 @@ namespace Spring.Scheduling.Quartz /// /// Juergen Hoeller /// - /// + /// public class JobDetailObject : JobDetailImpl, IObjectNameAware, IApplicationContextAware, IInitializingObject { private Type actualJobType; @@ -42,7 +41,7 @@ namespace Spring.Scheduling.Quartz private IApplicationContext applicationContext; private string applicationContextJobDataKey; - /// + /// /// Overridden to support any job class, to allow a custom JobFactory /// to adapt the given job class to the Quartz Job interface. /// @@ -65,7 +64,7 @@ namespace Spring.Scheduling.Quartz } } - /// + /// /// Register objects in the JobDataMap via a given Map. /// /// @@ -164,7 +163,7 @@ namespace Spring.Scheduling.Quartz /// the JobDataMap but rather into the SchedulerContext. ///

///
- /// + /// /// public virtual string ApplicationContextJobDataKey { @@ -221,4 +220,4 @@ namespace Spring.Scheduling.Quartz } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/JobMethodInvocationFailedException.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/JobMethodInvocationFailedException.cs index 648dfb7f..36837525 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/JobMethodInvocationFailedException.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/JobMethodInvocationFailedException.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using Spring.Objects.Support; namespace Spring.Scheduling.Quartz @@ -39,4 +38,4 @@ namespace Spring.Scheduling.Quartz { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/LocalTaskExecutorThreadPool.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/LocalTaskExecutorThreadPool.cs index 1ac44cba..b0c91c3b 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/LocalTaskExecutorThreadPool.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/LocalTaskExecutorThreadPool.cs @@ -14,15 +14,13 @@ * limitations under the License. */ -using System; -using System.Threading.Tasks; using Common.Logging; using Quartz; using Quartz.Spi; namespace Spring.Scheduling.Quartz { - /// + /// /// Quartz ThreadPool adapter that delegates to a Spring-managed /// TaskExecutor instance, specified on SchedulerFactoryObject. /// @@ -108,4 +106,4 @@ namespace Spring.Scheduling.Quartz return 1; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/MethodInvokingJob.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/MethodInvokingJob.cs index aefe1de1..8bca5922 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/MethodInvokingJob.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/MethodInvokingJob.cs @@ -14,9 +14,7 @@ * limitations under the License. */ -using System; using System.Reflection; -using System.Threading.Tasks; using Common.Logging; using Quartz; using Spring.Objects.Support; @@ -82,4 +80,4 @@ namespace Spring.Scheduling.Quartz return Task.FromResult(true); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/MethodInvokingJobDetailFactoryObject.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/MethodInvokingJobDetailFactoryObject.cs index b0766105..6277980e 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/MethodInvokingJobDetailFactoryObject.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/MethodInvokingJobDetailFactoryObject.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using Quartz; using Quartz.Impl; using Spring.Objects.Factory; @@ -23,7 +22,7 @@ using Spring.Objects.Support; namespace Spring.Scheduling.Quartz { - /// + /// /// IFactoryObject that exposes a JobDetail object that delegates job execution /// to a specified (static or non-static) method. Avoids the need to implement /// a one-line Quartz Job that just invokes an existing service method. @@ -72,7 +71,7 @@ namespace Spring.Scheduling.Quartz group = SchedulerConstants.DefaultGroup; } - /// + /// /// Set the name of the job. /// Default is the object name of this FactoryObject. /// @@ -82,7 +81,7 @@ namespace Spring.Scheduling.Quartz set => name = value; } - /// + /// /// Set the group of the job. /// Default is the default group of the Scheduler. /// @@ -93,7 +92,7 @@ namespace Spring.Scheduling.Quartz set => group = value; } - /// + /// /// Specify whether or not multiple jobs should be run in a concurrent /// fashion. The behavior when one does not want concurrent jobs to be /// executed is realized through adding the attribute. @@ -114,7 +113,7 @@ namespace Spring.Scheduling.Quartz /// The job detail. protected IJobDetail JobDetail => jobDetail; - /// + /// /// Set a list of JobListener names for this job, referring to /// non-global JobListeners registered with the Scheduler. /// @@ -281,4 +280,4 @@ namespace Spring.Scheduling.Quartz { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/MethodInvokingRunnable.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/MethodInvokingRunnable.cs index a462a2e5..db63cd5b 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/MethodInvokingRunnable.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/MethodInvokingRunnable.cs @@ -14,9 +14,7 @@ * limitations under the License. */ -using System; using System.Reflection; -using System.Threading.Tasks; using Common.Logging; using Spring.Objects.Factory; using Spring.Objects.Support; @@ -118,4 +116,4 @@ namespace Spring.Scheduling.Quartz return Task.FromResult(true); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/QuartzJobObject.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/QuartzJobObject.cs index a79ce7b0..369bceac 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/QuartzJobObject.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/QuartzJobObject.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System.Threading.Tasks; using Quartz; using Spring.Objects; @@ -83,4 +82,4 @@ namespace Spring.Scheduling.Quartz /// protected abstract Task ExecuteInternal(IJobExecutionContext context); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulerAccessor.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulerAccessor.cs index b7a427bb..f5709192 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulerAccessor.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulerAccessor.cs @@ -14,15 +14,11 @@ * limitations under the License. */ -using System; using System.Collections; -using System.Collections.Generic; -using System.Threading.Tasks; using Common.Logging; using Quartz; using Quartz.Simpl; using Quartz.Xml; -using Spring.Collections; using Spring.Context; using Spring.Core.IO; using Spring.Transaction; @@ -452,4 +448,4 @@ namespace Spring.Scheduling.Quartz /// protected abstract IScheduler GetScheduler(); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulerAccessorObject.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulerAccessorObject.cs index 1da2cfa0..b0166f7d 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulerAccessorObject.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulerAccessorObject.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using Quartz; using Quartz.Impl; using Spring.Objects.Factory; @@ -150,4 +149,4 @@ namespace Spring.Scheduling.Quartz return schedulerInRepo; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulerFactoryObject.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulerFactoryObject.cs index 75da6c9e..70eceaeb 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulerFactoryObject.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulerFactoryObject.cs @@ -14,12 +14,8 @@ * limitations under the License. */ -using System; using System.Collections; using System.Collections.Specialized; -using System.IO; -using System.Linq; -using System.Threading.Tasks; using Quartz; using Quartz.Impl; using Quartz.Simpl; @@ -838,4 +834,4 @@ namespace Spring.Scheduling.Quartz } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulingException.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulingException.cs index c70afc77..5e43c466 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulingException.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SchedulingException.cs @@ -1,5 +1,3 @@ -using System; - namespace Spring.Scheduling.Quartz { /// @@ -24,4 +22,4 @@ namespace Spring.Scheduling.Quartz { } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SimpleTriggerObject.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SimpleTriggerObject.cs index 8817cce8..4d1b631c 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SimpleTriggerObject.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SimpleTriggerObject.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Collections; using Quartz; using Quartz.Impl.Triggers; @@ -210,4 +209,4 @@ namespace Spring.Scheduling.Quartz } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SpringDbProviderAdapter.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SpringDbProviderAdapter.cs index b5c2bd1f..09238e9e 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SpringDbProviderAdapter.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/Quartz/SpringDbProviderAdapter.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Data; using System.Data.Common; using System.Reflection; @@ -264,4 +263,4 @@ namespace Spring.Scheduling.Quartz set => throw new NotSupportedException(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/TaskRejectedException.cs b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/TaskRejectedException.cs index cf9adf77..70fcaf12 100644 --- a/src/Spring/Spring.Scheduling.Quartz3/Scheduling/TaskRejectedException.cs +++ b/src/Spring/Spring.Scheduling.Quartz3/Scheduling/TaskRejectedException.cs @@ -1,5 +1,3 @@ -using System; - namespace Spring.Scheduling { /// @@ -8,4 +6,4 @@ namespace Spring.Scheduling public class TaskRejectedException : ApplicationException { } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Services/EnterpriseServices/EnterpriseServicesExporter.cs b/src/Spring/Spring.Services/EnterpriseServices/EnterpriseServicesExporter.cs index c87e1ac5..68c03c34 100644 --- a/src/Spring/Spring.Services/EnterpriseServices/EnterpriseServicesExporter.cs +++ b/src/Spring/Spring.Services/EnterpriseServices/EnterpriseServicesExporter.cs @@ -18,11 +18,9 @@ #endregion -using System; using System.Collections; using System.Diagnostics; using System.EnterpriseServices; -using System.IO; using System.Reflection; using System.Reflection.Emit; @@ -43,9 +41,9 @@ namespace Spring.EnterpriseServices /// First you need to generate and register your components. This is done by writing a simple e.g. console application using a configuration as shown below: /// /// <!-- actual objects 'calculatorService' and 'simpleCalculatorService' are defined elsewhere --> - /// + /// /// <!-- Define the component for exporting 'calculatorService' --> - /// <object id="calculatorComponent" type="Spring.EnterpriseServices.ServicedComponentExporter, + /// <object id="calculatorComponent" type="Spring.EnterpriseServices.ServicedComponentExporter, /// Spring.Services"> /// <property name="TargetName" value="calculatorService" /> /// <property name="TypeAttributes"> @@ -63,25 +61,25 @@ namespace Spring.EnterpriseServices /// </dictionary> /// </property> /// </object> - /// + /// /// <!-- Define the component for exporting 'simpleCalculatorService' --> - /// <object id="simpleCalculatorComponent" type="Spring.EnterpriseServices.ServicedComponentExporter, + /// <object id="simpleCalculatorComponent" type="Spring.EnterpriseServices.ServicedComponentExporter, /// Spring.Services"> /// <property name="TargetName" value="simpleCalculatorService" /> /// </object> - /// + /// /// <!-- Export components into assembly and autoregister with COM+ --> - /// <object type="Spring.EnterpriseServices.EnterpriseServicesExporter, Spring.Services"> + /// <object type="Spring.EnterpriseServices.EnterpriseServicesExporter, Spring.Services"> /// <!-- assembly name to generated - will generate 'Spring.Calculator.EnterpriseServices.dll' --> /// <property name="Assembly" value="Spring.Calculator.EnterpriseServices" /> - /// - /// <!-- - /// use Spring's ContextRegistry for managing services. If true, requires a file - /// 'Spring.Calculator.EnterpriseServices.dll.spring-context.xml' containing a + /// + /// <!-- + /// use Spring's ContextRegistry for managing services. If true, requires a file + /// 'Spring.Calculator.EnterpriseServices.dll.spring-context.xml' containing a /// <spring/context /> section placed next to the generated assembly. /// --> /// <property name="UseSpring" value="true" /> - /// + /// /// <property name="ApplicationName" value="Spring Calculator Application" /> /// <property name="ActivationMode" value="Library" /> /// <property name="Description" value="Spring Calculator application" /> @@ -95,8 +93,8 @@ namespace Spring.EnterpriseServices /// /// /// - /// To load your objectdefinitions at runtime of the components, place a configuration file next to the assembly - /// generated by the exporter, using the filename of the exported assembly, postfixing it with '.spring-context.config'. + /// To load your objectdefinitions at runtime of the components, place a configuration file next to the assembly + /// generated by the exporter, using the filename of the exported assembly, postfixing it with '.spring-context.config'. /// Taking the example above, the file must be named 'Spring.Calculator.EnterpriseServices.dll.spring-context.xml' and look like: /// /// <-- --> @@ -305,7 +303,7 @@ namespace Spring.EnterpriseServices } /// - /// Generates service types from the list of instances + /// Generates service types from the list of instances /// into the given assembly. /// /// the module to export types to @@ -334,7 +332,7 @@ namespace Spring.EnterpriseServices } /// - /// + /// /// /// public void RegisterServicedComponents(FileInfo assemblyFile) @@ -349,7 +347,7 @@ namespace Spring.EnterpriseServices } /// - /// + /// /// /// public void UnregisterServicedComponents(FileInfo assemblyFile) @@ -464,9 +462,9 @@ namespace Spring.EnterpriseServices /// internal class SpringServicedComponent: BaseType /// { /// protected delegate object GetObjectHandler(ServicedComponent servicedComponent, string targetName); - /// + /// /// protected static readonly GetObjectHandler getObjectRef; - /// + /// /// static SpringServicedComponent() /// { /// // first look for a local copy @@ -480,11 +478,11 @@ namespace Spring.EnterpriseServices /// // then let the normal loader handle the typeload /// servicesAssembly = System.Reflection.Assembly.Load("Spring.Services, culture=neutral, version=x.x.x.x, publicKey=xxxxxxxx"); /// } - /// + /// /// Type componentHelperType = servicesAssembly.GetType("Spring.EnterpriseServices.ServicedComponentHelper"); /// getObjectRef = (GetObjectHandler) Delegate.CreateDelegate(typeof(GetObjectHandler) /// , componentHelperType.GetMethod("GetObject")); - /// } + /// } /// } /// /// @@ -540,7 +538,7 @@ namespace Spring.EnterpriseServices il.Emit(OpCodes.Ldtoken, delegateType); il.Emit(OpCodes.Call, typeof(Type).GetMethod("GetTypeFromHandle")); - il.Emit(OpCodes.Ldloc, fldType); + il.Emit(OpCodes.Ldloc, fldType); il.Emit(OpCodes.Ldstr, "GetObject"); il.Emit(OpCodes.Callvirt, typeof(Type).GetMethod("GetMethod", new Type[] { typeof(string) })); il.Emit(OpCodes.Call, typeof(Delegate).GetMethod("CreateDelegate", new Type[] { typeof(Type), typeof(MethodInfo) })); diff --git a/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentExporter.cs b/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentExporter.cs index 2bee18b1..184fe7e9 100644 --- a/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentExporter.cs +++ b/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentExporter.cs @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Collections; using System.EnterpriseServices; using System.Reflection; @@ -29,8 +26,6 @@ using Spring.Core.TypeResolution; using Spring.Objects.Factory; using Spring.Proxy; -#endregion - namespace Spring.EnterpriseServices { /// @@ -41,7 +36,7 @@ namespace Spring.EnterpriseServices /// /// Instances of this class should be used as elements in the Components /// list of the class, which will - /// register them with COM+ Services. For a full description on how to export + /// register them with COM+ Services. For a full description on how to export /// and use services with COM+, see the reference. /// /// @@ -178,7 +173,7 @@ namespace Spring.EnterpriseServices /// /// class MyServicedComponent { /// TargetType target = new TargetType(); - /// + /// /// void MethodX() { /// target.MethodX(); /// } @@ -186,7 +181,7 @@ namespace Spring.EnterpriseServices /// ///
/// The differences are of course that in the former case, the target lifecycle is entirely managed by Spring, thus avoiding - /// issues with ServiceComponent activation/deactivation as well as removing the need for default constructors. + /// issues with ServiceComponent activation/deactivation as well as removing the need for default constructors. /// public Type CreateWrapperType(ModuleBuilder module, Type baseType, Type targetType, bool springManagedLifecycle) { @@ -196,7 +191,7 @@ namespace Spring.EnterpriseServices IProxyTypeBuilder proxyBuilder; if (springManagedLifecycle) { - proxyBuilder = new SpringManagedServicedComponentProxyTypeBuilder(module, baseType, this); + proxyBuilder = new SpringManagedServicedComponentProxyTypeBuilder(module, baseType, this); } else { @@ -331,7 +326,7 @@ namespace Spring.EnterpriseServices #region IProxyTypeGenerator Members /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the target instance on which calls should be delegated to. /// /// The IL generator to use. diff --git a/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentFactory.cs b/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentFactory.cs index 1e6a673c..ebb902ef 100644 --- a/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentFactory.cs +++ b/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentFactory.cs @@ -20,15 +20,10 @@ #if !MONO -#region Imports - -using System; using System.Reflection; using Spring.Objects.Factory; using Spring.Objects.Factory.Config; -#endregion - namespace Spring.EnterpriseServices { /// diff --git a/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentHelper.cs b/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentHelper.cs index c7c34f6f..c746139b 100644 --- a/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentHelper.cs +++ b/src/Spring/Spring.Services/EnterpriseServices/ServicedComponentHelper.cs @@ -18,12 +18,8 @@ #endregion -#region Imports - -using System; using System.Diagnostics; using System.EnterpriseServices; -using System.IO; using System.Reflection; using Spring.Context; using Spring.Context.Support; @@ -31,8 +27,6 @@ using Spring.Core.IO; using Spring.Objects.Factory.Config; using Spring.Util; -#endregion - namespace Spring.EnterpriseServices { /// @@ -98,13 +92,13 @@ namespace Spring.EnterpriseServices { Trace.WriteLine(string.Format("configuring COM InProc Server '{0}' using section from app.config", componentAssemblyFile.FullName, componentType.Name)); _appContext = ContextRegistry.GetContext(componentType.Name); - } + } else { Trace.WriteLine(string.Format("configuring COM InProc Server '{0}' using section from file '{1}'", componentAssemblyFile.FullName, configFile.FullName)); - _appContext = ContextRegistry.GetContext(); + _appContext = ContextRegistry.GetContext(); } - return; + return; } throw ConfigurationUtils.CreateConfigurationException("Spring-exported COM components require section in configuration file '" + configFile.FullName + "'"); } @@ -118,7 +112,7 @@ namespace Spring.EnterpriseServices Trace.WriteLine(string.Format("configuring COM OutProc Server '{0}' using '{1}'", componentAssemblyFile.FullName, configFile.FullName)); // read in config file ExeConfigurationSystem comConfig = new ExeConfigurationSystem(assemblyFile.FullName); - // make the config "global" for this process, replacing any + // make the config "global" for this process, replacing any // existing configuration that might already have been loaded ConfigurationUtils.SetConfigurationSystem(comConfig, true); _appContext = ContextRegistry.GetContext(); @@ -149,7 +143,7 @@ namespace Spring.EnterpriseServices } /// - /// Called by a exported by + /// Called by a exported by /// to obtain a reference to the service it proxies. /// public static object GetObject(ServicedComponent sender, string targetName) diff --git a/src/Spring/Spring.Services/Remoting/CaoExporter.cs b/src/Spring/Spring.Services/Remoting/CaoExporter.cs index 2febd3fa..72ac3e64 100644 --- a/src/Spring/Spring.Services/Remoting/CaoExporter.cs +++ b/src/Spring/Spring.Services/Remoting/CaoExporter.cs @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Runtime.Remoting; using Spring.Context; @@ -28,8 +25,6 @@ using Spring.Objects.Factory; using Spring.Objects.Factory.Support; using Spring.Remoting.Support; -#endregion - namespace Spring.Remoting { /// @@ -85,7 +80,7 @@ namespace Spring.Remoting /// Gets or sets the list of interfaces whose methods should be exported. /// /// - /// The default value of this property is all the interfaces + /// The default value of this property is all the interfaces /// implemented or inherited by the target type. /// /// The interfaces to export. @@ -97,34 +92,34 @@ namespace Spring.Remoting #endregion - #region IApplicationContextAware Members - - /// - /// Sets the that this - /// object runs in. - /// - /// - /// - ///

- /// Normally this call will be used to initialize the object. - ///

- ///

- /// Invoked after population of normal object properties but before an - /// init callback such as - /// 's - /// - /// or a custom init-method. Invoked after the setting of any - /// 's - /// - /// property. - ///

- ///
- /// - /// In the case of application context initialization errors. - /// - /// - /// If thrown by any application context methods. - /// + #region IApplicationContextAware Members + + /// + /// Sets the that this + /// object runs in. + /// + /// + /// + ///

+ /// Normally this call will be used to initialize the object. + ///

+ ///

+ /// Invoked after population of normal object properties but before an + /// init callback such as + /// 's + /// + /// or a custom init-method. Invoked after the setting of any + /// 's + /// + /// property. + ///

+ ///
+ /// + /// In the case of application context initialization errors. + /// + /// + /// If thrown by any application context methods. + /// /// public IApplicationContext ApplicationContext { @@ -148,7 +143,7 @@ namespace Spring.Remoting #region IInitializingObject Members /// - /// Publish the object + /// Publish the object /// public void AfterPropertiesSet() { @@ -235,7 +230,7 @@ namespace Spring.Remoting /// /// Create a new instance of the RemoteFactory. /// - public CaoRemoteFactory(ILifetime lifetime, string targetName, + public CaoRemoteFactory(ILifetime lifetime, string targetName, string[] interfaces, AbstractObjectFactory objectFactory) { this.targetName = targetName; @@ -261,20 +256,20 @@ namespace Spring.Remoting public object GetObject() { remoteObjectFactory.Target = objectFactory.GetObject(targetName); - + return remoteObjectFactory.GetObject(); } /// /// Returns the CAO proxy using the - /// argument list to call the constructor. + /// argument list to call the constructor. /// /// /// The matching of arguments to call the constructor is done /// by type. The alternative ways, by index and by constructor /// name are not supported. /// - /// Constructor + /// Constructor /// arguments used to create the object. /// The remote object. public object GetObject(object[] constructorArguments) @@ -309,4 +304,4 @@ namespace Spring.Remoting #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Services/Remoting/CaoFactoryObject.cs b/src/Spring/Spring.Services/Remoting/CaoFactoryObject.cs index 3f70d11a..3c5b9747 100644 --- a/src/Spring/Spring.Services/Remoting/CaoFactoryObject.cs +++ b/src/Spring/Spring.Services/Remoting/CaoFactoryObject.cs @@ -2,13 +2,13 @@ /* * Copyright 2002-2010 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,30 +18,24 @@ #endregion -#region Imports - -using System; - using Spring.Objects.Factory; using Spring.Remoting.Support; -#endregion - namespace Spring.Remoting { /// - /// Factory for creating a reference to a + /// Factory for creating a reference to a /// client activated object (CAO). /// /// Aleksandar Seovic /// Mark Pollack /// Bruno Baia public class CaoFactoryObject : IFactoryObject, IInitializingObject - { - #region Logging - - private static readonly Common.Logging.ILog LOG = Common.Logging.LogManager.GetLogger(typeof(CaoFactoryObject)); - + { + #region Logging + + private static readonly Common.Logging.ILog LOG = Common.Logging.LogManager.GetLogger(typeof(CaoFactoryObject)); + #endregion #region Fields @@ -138,14 +132,14 @@ namespace Spring.Remoting ///
/// the CAO proxy public object GetObject() - { + { string url = serviceUrl.TrimEnd('/') + '/' + remoteTargetName; if (LOG.IsDebugEnabled) - { - LOG.Debug("Accessing CAO object of type ICaoRemoteFactory object at url = [" + url + "]"); + { + LOG.Debug("Accessing CAO object of type ICaoRemoteFactory object at url = [" + url + "]"); } ICaoRemoteFactory remoteFactory = (ICaoRemoteFactory) Activator.GetObject(typeof(ICaoRemoteFactory), url); - + if (constructorArguments != null) { return remoteFactory.GetObject(constructorArguments); @@ -158,4 +152,4 @@ namespace Spring.Remoting #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Services/Remoting/Config/RemotingNamespaceParser.cs b/src/Spring/Spring.Services/Remoting/Config/RemotingNamespaceParser.cs index 71615e57..20b2f4f0 100644 --- a/src/Spring/Spring.Services/Remoting/Config/RemotingNamespaceParser.cs +++ b/src/Spring/Spring.Services/Remoting/Config/RemotingNamespaceParser.cs @@ -18,8 +18,6 @@ #endregion -#region Imports - using System.Xml; using Spring.Core.TypeResolution; @@ -29,8 +27,6 @@ using Spring.Objects.Factory.Config; using Spring.Objects.Factory.Xml; using Spring.Util; -#endregion - namespace Spring.Remoting.Config { /// @@ -59,13 +55,13 @@ namespace Spring.Remoting.Config RemotingTypePrefix + CaoFactoryObjectConstants.CaoFactoryObjectElement, typeof(CaoFactoryObject)); TypeRegistry.RegisterType( - RemotingTypePrefix + RemoteObjectFactoryConstants.RemoteObjectFactoryElement, + RemotingTypePrefix + RemoteObjectFactoryConstants.RemoteObjectFactoryElement, typeof(RemoteObjectFactory)); TypeRegistry.RegisterType( - RemotingTypePrefix + SaoExporterConstants.SaoExporterElement, + RemotingTypePrefix + SaoExporterConstants.SaoExporterElement, typeof(SaoExporter)); TypeRegistry.RegisterType( - RemotingTypePrefix + CaoExporterConstants.CaoExporterElement, + RemotingTypePrefix + CaoExporterConstants.CaoExporterElement, typeof(CaoExporter)); } @@ -486,4 +482,4 @@ namespace Spring.Remoting.Config #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Services/Remoting/RemoteObjectFactory.cs b/src/Spring/Spring.Services/Remoting/RemoteObjectFactory.cs index b228a918..a8ab2820 100644 --- a/src/Spring/Spring.Services/Remoting/RemoteObjectFactory.cs +++ b/src/Spring/Spring.Services/Remoting/RemoteObjectFactory.cs @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Reflection; using Spring.Proxy; @@ -28,8 +25,6 @@ using Spring.Objects.Factory; using Spring.Remoting.Support; using Spring.Core.TypeResolution; -#endregion - namespace Spring.Remoting { /// @@ -71,7 +66,7 @@ namespace Spring.Remoting } /// - /// Gets or sets the class or subclass + /// Gets or sets the class or subclass /// that the proxy must inherit from. /// public Type BaseType @@ -84,7 +79,7 @@ namespace Spring.Remoting /// Gets or sets the list of interfaces to wrap. /// /// - /// The default value of this property is all the interfaces + /// The default value of this property is all the interfaces /// implemented or inherited by the target type. /// /// The interfaces to export. @@ -178,4 +173,4 @@ namespace Spring.Remoting #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Services/Remoting/RemotingConfigurer.cs b/src/Spring/Spring.Services/Remoting/RemotingConfigurer.cs index 500c08e3..104e69ef 100644 --- a/src/Spring/Spring.Services/Remoting/RemotingConfigurer.cs +++ b/src/Spring/Spring.Services/Remoting/RemotingConfigurer.cs @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Runtime.Remoting; using Common.Logging; @@ -28,8 +25,6 @@ using Spring.Core; using Spring.Core.IO; using Spring.Objects.Factory.Config; -#endregion - namespace Spring.Remoting { /// @@ -66,7 +61,7 @@ namespace Spring.Remoting /// Gets or sets the name of the remoting configuration file. /// /// - /// If filename is or not set, + /// If filename is or not set, /// current AppDomain's configuration file will be used. /// public IResource Filename @@ -99,7 +94,7 @@ namespace Spring.Remoting get { return _ensureSecurity; } set { _ensureSecurity = value; } } - + #endregion #region IObjectFactoryPostProcessor Members @@ -117,13 +112,13 @@ namespace Spring.Remoting string filename = null; if (UseConfigFile) { - filename = (Filename == null) - ? AppDomain.CurrentDomain.SetupInformation.ConfigurationFile + filename = (Filename == null) + ? AppDomain.CurrentDomain.SetupInformation.ConfigurationFile : Filename.File.FullName; } RemotingConfiguration.Configure(filename, EnsureSecurity); - + #region Instrumentation if (log.IsDebugEnabled) @@ -146,7 +141,7 @@ namespace Spring.Remoting #region IOrdered Members /// - /// Return the order value of this object, + /// Return the order value of this object, /// where a higher value means greater in terms of sorting. /// public int Order @@ -156,4 +151,4 @@ namespace Spring.Remoting #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Services/Remoting/SaoExporter.cs b/src/Spring/Spring.Services/Remoting/SaoExporter.cs index bb88bd1b..af05fabf 100644 --- a/src/Spring/Spring.Services/Remoting/SaoExporter.cs +++ b/src/Spring/Spring.Services/Remoting/SaoExporter.cs @@ -1,26 +1,23 @@ #region License -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. +/* + * Copyright 2002-2010 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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.Collections; using System.Reflection; using System.Reflection.Emit; @@ -31,8 +28,6 @@ using Spring.Objects.Factory; using Spring.Remoting.Support; using Spring.Util; -#endregion - namespace Spring.Remoting { /// @@ -40,8 +35,8 @@ namespace Spring.Remoting /// a given url as a Server Activated Object (SAO). /// /// - /// Remoting servers exported by always correspond to . - /// Objects can be exported either as SingleCall or Singleton by marking the exported object identified by + /// Remoting servers exported by always correspond to . + /// Objects can be exported either as SingleCall or Singleton by marking the exported object identified by /// as either singleton or prototype. /// /// Aleksandar Seovic @@ -153,7 +148,7 @@ namespace Spring.Remoting /// Gets or sets the list of interfaces whose methods should be exported. /// /// - /// The default value of this property is all the interfaces + /// The default value of this property is all the interfaces /// implemented or inherited by the target type. /// /// The interfaces to export. @@ -180,7 +175,7 @@ namespace Spring.Remoting #region IInitializingObject Members /// - /// Publish the object + /// Publish the object /// public void AfterPropertiesSet() { @@ -252,7 +247,7 @@ namespace Spring.Remoting Type targetType = this.objectFactory.GetType( targetName ); if (targetType == null) { - // perform full object retrieval if type cannot be predicted - this will + // perform full object retrieval if type cannot be predicted - this will // also cause any object creation exceptions to be thrown targetType = this.objectFactory.GetObject(targetName).GetType(); } @@ -294,7 +289,7 @@ namespace Spring.Remoting #region SaoRemoteObjectProxyTypeBuilder inner class definition /// - /// Builds a proxy type based on to wrap a target object + /// Builds a proxy type based on to wrap a target object /// that is intended to be remotable. /// /// @@ -313,7 +308,7 @@ namespace Spring.Remoting #region Constructor(s) / Destructor /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -333,7 +328,7 @@ namespace Spring.Remoting #region IProxyTypeGenerator Members /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the target instance on which calls should be delegated to. /// /// The IL generator to use. @@ -381,4 +376,4 @@ namespace Spring.Remoting #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Services/Remoting/SaoFactoryObject.cs b/src/Spring/Spring.Services/Remoting/SaoFactoryObject.cs index cbafbe29..c85fc3ab 100644 --- a/src/Spring/Spring.Services/Remoting/SaoFactoryObject.cs +++ b/src/Spring/Spring.Services/Remoting/SaoFactoryObject.cs @@ -2,13 +2,13 @@ /* * Copyright 2002-2010 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,24 +18,19 @@ #endregion -#region Imports - -using System; using Spring.Objects.Factory; -#endregion - namespace Spring.Remoting { /// - /// Factory for creating a reference to a + /// Factory for creating a reference to a /// remote server activated object (SAO). /// /// /// This is useful alternative to adminstrative type registration on - /// the client when you would like the client to have only + /// the client when you would like the client to have only /// a reference to the interface that an SAO implements and not the - /// actual SAO implentation. + /// actual SAO implentation. /// /// Aleksandar Seovic /// Mark Pollack @@ -137,4 +132,4 @@ namespace Spring.Remoting #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Services/Remoting/Support/BaseRemoteObject.cs b/src/Spring/Spring.Services/Remoting/Support/BaseRemoteObject.cs index c2e678b7..f7580c93 100644 --- a/src/Spring/Spring.Services/Remoting/Support/BaseRemoteObject.cs +++ b/src/Spring/Spring.Services/Remoting/Support/BaseRemoteObject.cs @@ -18,13 +18,8 @@ #endregion -#region Imports - -using System; using System.Runtime.Remoting.Lifetime; -#endregion - namespace Spring.Remoting.Support { /// @@ -34,7 +29,7 @@ namespace Spring.Remoting.Support /// ///

/// Remoting exporters uses this class as a base proxy class - /// in order to support lifecycle configuration when exporting + /// in order to support lifecycle configuration when exporting /// a remote object. ///

///
@@ -66,7 +61,7 @@ namespace Spring.Remoting.Support /// Gets or sets a value indicating whether this instance has infinite lifetime. ///
/// - /// if this instance has infinite lifetime; + /// if this instance has infinite lifetime; /// otherwise, . /// public bool IsInfinite @@ -86,10 +81,10 @@ namespace Spring.Remoting.Support } /// - /// Gets or sets the amount of time lease should be + /// Gets or sets the amount of time lease should be /// extended for on each call to this object. /// - /// The amount of time lease should be + /// The amount of time lease should be /// extended for on each call to this object. public TimeSpan RenewOnCallTime { @@ -160,4 +155,4 @@ namespace Spring.Remoting.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Services/Remoting/Support/ConfigurableLifetime.cs b/src/Spring/Spring.Services/Remoting/Support/ConfigurableLifetime.cs index 06cbf700..7d4aff89 100644 --- a/src/Spring/Spring.Services/Remoting/Support/ConfigurableLifetime.cs +++ b/src/Spring/Spring.Services/Remoting/Support/ConfigurableLifetime.cs @@ -18,12 +18,6 @@ #endregion -#region Imports - -using System; - -#endregion - namespace Spring.Remoting.Support { /// @@ -66,10 +60,10 @@ namespace Spring.Remoting.Support } /// - /// Gets or sets the amount of time lease + /// Gets or sets the amount of time lease /// should be extended for on each call to this object. /// - /// The amount of time lease should be + /// The amount of time lease should be /// extended for on each call to this object. public TimeSpan RenewOnCallTime { @@ -78,7 +72,7 @@ namespace Spring.Remoting.Support } /// - /// Gets or sets the amount of time lease manager + /// Gets or sets the amount of time lease manager /// will for this object's sponsors to respond. /// /// The amount of time lease manager will for this object's diff --git a/src/Spring/Spring.Services/Remoting/Support/ICaoRemoteFactory.cs b/src/Spring/Spring.Services/Remoting/Support/ICaoRemoteFactory.cs index 5f0ba23b..4e31db74 100644 --- a/src/Spring/Spring.Services/Remoting/Support/ICaoRemoteFactory.cs +++ b/src/Spring/Spring.Services/Remoting/Support/ICaoRemoteFactory.cs @@ -16,11 +16,6 @@ * limitations under the License. */ -#endregion - -#region Imports - - #endregion namespace Spring.Remoting.Support @@ -47,14 +42,14 @@ namespace Spring.Remoting.Support /// /// Returns the CAO proxy using the - /// argument list to call the constructor. + /// argument list to call the constructor. /// /// /// The matching of arguments to call the constructor is done /// by type. The alternative ways, by index and by constructor /// name are not supported. /// - /// Constructor + /// Constructor /// arguments used to create the object. /// The remote object. object GetObject(object[] constructorArguments); diff --git a/src/Spring/Spring.Services/Remoting/Support/ILifetime.cs b/src/Spring/Spring.Services/Remoting/Support/ILifetime.cs index 09e5185f..5d1b0b20 100644 --- a/src/Spring/Spring.Services/Remoting/Support/ILifetime.cs +++ b/src/Spring/Spring.Services/Remoting/Support/ILifetime.cs @@ -18,12 +18,6 @@ #endregion -#region Imports - -using System; - -#endregion - namespace Spring.Remoting.Support { /// @@ -47,15 +41,15 @@ namespace Spring.Remoting.Support TimeSpan InitialLeaseTime { get; } /// - /// Gets the amount of time lease + /// Gets the amount of time lease /// should be extended for on each call to this object. /// - /// The amount of time lease should be + /// The amount of time lease should be /// extended for on each call to this object. TimeSpan RenewOnCallTime { get; } /// - /// Gets the amount of time lease manager + /// Gets the amount of time lease manager /// will for this object's sponsors to respond. /// /// The amount of time lease manager will for this object's diff --git a/src/Spring/Spring.Services/Remoting/Support/RemoteObjectProxyTypeBuilder.cs b/src/Spring/Spring.Services/Remoting/Support/RemoteObjectProxyTypeBuilder.cs index 07af356d..dd7b697e 100644 --- a/src/Spring/Spring.Services/Remoting/Support/RemoteObjectProxyTypeBuilder.cs +++ b/src/Spring/Spring.Services/Remoting/Support/RemoteObjectProxyTypeBuilder.cs @@ -18,20 +18,15 @@ #endregion -#region Imports - -using System; using System.Reflection; using System.Reflection.Emit; using Spring.Proxy; -#endregion - namespace Spring.Remoting.Support { /// - /// Builds a proxy type based on to wrap a target object + /// Builds a proxy type based on to wrap a target object /// that is intended to be remotable. /// /// Bruno Baia @@ -61,7 +56,7 @@ namespace Spring.Remoting.Support #region Constructor(s) / Destructor /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// @@ -71,7 +66,7 @@ namespace Spring.Remoting.Support { this.lifetime = lifetime; - Name = "RemoteObjectProxy"; + Name = "RemoteObjectProxy"; } #endregion diff --git a/src/Spring/Spring.Services/ServiceModel/Activation/ServiceHostFactory.cs b/src/Spring/Spring.Services/ServiceModel/Activation/ServiceHostFactory.cs index 0c563107..746871d6 100644 --- a/src/Spring/Spring.Services/ServiceModel/Activation/ServiceHostFactory.cs +++ b/src/Spring/Spring.Services/ServiceModel/Activation/ServiceHostFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,35 +18,30 @@ #endregion -#region Imports - -using System; using System.ServiceModel; using Spring.Util; using Spring.Context.Support; using Spring.Context; -#endregion - namespace Spring.ServiceModel.Activation { /// - /// Factory that provides instances of + /// Factory that provides instances of /// to host objects created by Spring's IoC container. /// /// Bruno Baia public class ServiceHostFactory : System.ServiceModel.Activation.ServiceHostFactory { /// - /// Creates a for + /// Creates a for /// a specified Spring-managed object with a specific base address. /// /// /// A reference to a Spring-managed object or to a service type. /// /// - /// The of type that contains + /// The of type that contains /// the base addresses for the service hosted. /// /// diff --git a/src/Spring/Spring.Services/ServiceModel/Activation/ServiceHostFactoryObject.cs b/src/Spring/Spring.Services/ServiceModel/Activation/ServiceHostFactoryObject.cs index 459d2979..38a83f0f 100644 --- a/src/Spring/Spring.Services/ServiceModel/Activation/ServiceHostFactoryObject.cs +++ b/src/Spring/Spring.Services/ServiceModel/Activation/ServiceHostFactoryObject.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,19 +18,14 @@ #endregion -#region Imports - -using System; using System.ServiceModel; using Spring.Objects.Factory; -#endregion - namespace Spring.ServiceModel.Activation { /// - /// Factory that provides instances of + /// Factory that provides instances of /// to host objects created with Spring's IoC container. /// /// Bruno Baia @@ -101,7 +96,7 @@ namespace Spring.ServiceModel.Activation #region Constructor(s) / Destructor /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// public ServiceHostFactoryObject() @@ -142,11 +137,11 @@ namespace Spring.ServiceModel.Activation #region IFactoryObject Members /// - /// Return a instance + /// Return a instance /// managed by this factory. /// /// - /// An instance of + /// An instance of /// managed by this factory. /// public virtual object GetObject() diff --git a/src/Spring/Spring.Services/ServiceModel/Activation/WebServiceHostFactory.cs b/src/Spring/Spring.Services/ServiceModel/Activation/WebServiceHostFactory.cs index b7c386ac..4e6fe1f1 100644 --- a/src/Spring/Spring.Services/ServiceModel/Activation/WebServiceHostFactory.cs +++ b/src/Spring/Spring.Services/ServiceModel/Activation/WebServiceHostFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,17 +18,12 @@ #endregion -#region Imports - -using System; using System.ServiceModel; using Spring.Util; using Spring.Context.Support; using Spring.Context; -#endregion - namespace Spring.ServiceModel.Activation { /// @@ -39,14 +34,14 @@ namespace Spring.ServiceModel.Activation public class WebServiceHostFactory : System.ServiceModel.Activation.WebServiceHostFactory { /// - /// Creates a for + /// Creates a for /// a specified Spring-managed object with a specific base address. /// /// /// A reference to a Spring-managed object or to a service type. /// /// - /// The of type that contains + /// The of type that contains /// the base addresses for the service hosted. /// /// diff --git a/src/Spring/Spring.Services/ServiceModel/ChannelFactoryObject.cs b/src/Spring/Spring.Services/ServiceModel/ChannelFactoryObject.cs index d29a080f..ddbf6c1f 100644 --- a/src/Spring/Spring.Services/ServiceModel/ChannelFactoryObject.cs +++ b/src/Spring/Spring.Services/ServiceModel/ChannelFactoryObject.cs @@ -18,20 +18,14 @@ #endregion -#region Imports - -using System; using System.ServiceModel; using Spring.Objects.Factory; - -#endregion - namespace Spring.ServiceModel { /// - /// that creates a channel that is used by clients + /// that creates a channel that is used by clients /// to send messages to a specified endpoint address. /// /// The type of channel produced by the channel factory. diff --git a/src/Spring/Spring.Services/ServiceModel/Config/ChannelFactoryObjectDefinitionParser.cs b/src/Spring/Spring.Services/ServiceModel/Config/ChannelFactoryObjectDefinitionParser.cs index c35e0280..3287ec0b 100644 --- a/src/Spring/Spring.Services/ServiceModel/Config/ChannelFactoryObjectDefinitionParser.cs +++ b/src/Spring/Spring.Services/ServiceModel/Config/ChannelFactoryObjectDefinitionParser.cs @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Xml; using Spring.Util; @@ -30,8 +27,6 @@ using Spring.Objects.Factory.Support; using Spring.Core.TypeResolution; using Spring.Objects; -#endregion - namespace Spring.ServiceModel.Config { /// @@ -79,8 +74,8 @@ namespace Spring.ServiceModel.Config { // Try to resolve type later (Can be a type alias) channelFactoryDefinition = new RootObjectDefinition( - String.Format("Spring.ServiceModel.ChannelFactoryObject<{0}>, Spring.Services", unresolvedChannelType), - new ConstructorArgumentValues(), + String.Format("Spring.ServiceModel.ChannelFactoryObject<{0}>, Spring.Services", unresolvedChannelType), + new ConstructorArgumentValues(), new MutablePropertyValues()); } diff --git a/src/Spring/Spring.Services/ServiceModel/Config/WcfNamespaceParser.cs b/src/Spring/Spring.Services/ServiceModel/Config/WcfNamespaceParser.cs index b2b98fe3..4aa163a3 100644 --- a/src/Spring/Spring.Services/ServiceModel/Config/WcfNamespaceParser.cs +++ b/src/Spring/Spring.Services/ServiceModel/Config/WcfNamespaceParser.cs @@ -18,12 +18,8 @@ #endregion -#region Imports - using Spring.Objects.Factory.Xml; -#endregion - namespace Spring.ServiceModel.Config { /// diff --git a/src/Spring/Spring.Services/ServiceModel/ServiceExporter.cs b/src/Spring/Spring.Services/ServiceModel/ServiceExporter.cs index 79bc1a40..63f630d5 100644 --- a/src/Spring/Spring.Services/ServiceModel/ServiceExporter.cs +++ b/src/Spring/Spring.Services/ServiceModel/ServiceExporter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,11 +18,7 @@ #endregion -#region Imports - -using System; using System.Collections; -using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; using System.ServiceModel; @@ -35,8 +31,6 @@ using Spring.Objects.Factory.Support; using Spring.Proxy; using Spring.ServiceModel.Support; -#endregion - namespace Spring.ServiceModel { /// @@ -109,7 +103,7 @@ namespace Spring.ServiceModel /// Gets or sets the service contract interface type. /// /// - /// If not set, uses the unique interface implemented or inherited by the target type. + /// If not set, uses the unique interface implemented or inherited by the target type. /// An error will be thrown if the target type implements more than one interface. /// /// The service contract interface type. @@ -120,7 +114,7 @@ namespace Spring.ServiceModel } /// - /// Gets or sets a list of custom attributes + /// Gets or sets a list of custom attributes /// that should be applied to the WCF service class. /// public IList TypeAttributes @@ -130,12 +124,12 @@ namespace Spring.ServiceModel } /// - /// Gets or sets a dictionary of custom attributes + /// Gets or sets a dictionary of custom attributes /// that should be applied to the WCF service members. /// /// - /// Dictionary key is an expression that members can be matched against. - /// Value is a list of attributes that should be applied + /// Dictionary key is an expression that members can be matched against. + /// Value is a list of attributes that should be applied /// to each member that matches expression. /// public IDictionary MemberAttributes @@ -155,11 +149,11 @@ namespace Spring.ServiceModel } /// - /// Gets or sets the name for the <portType> element in + /// Gets or sets the name for the <portType> element in /// Web Services Description Language (WSDL). /// /// - /// The default value is the name of the class or interface to which the + /// The default value is the name of the class or interface to which the /// System.ServiceModel.ServiceContractAttribute is applied. /// public string Name @@ -169,7 +163,7 @@ namespace Spring.ServiceModel } /// - /// Gets or sets the namespace of the <portType> element in + /// Gets or sets the namespace of the <portType> element in /// Web Services Description Language (WSDL). /// /// @@ -185,7 +179,7 @@ namespace Spring.ServiceModel /// Gets or sets the name used to locate the service in an application configuration file. /// /// - /// The name used to locate the service element in an application configuration file. + /// The name used to locate the service element in an application configuration file. /// The default is the name of the service implementation class. /// public string ConfigurationName @@ -211,7 +205,7 @@ namespace Spring.ServiceModel /// the ProtectionLevel property. /// /// - /// One of the values. + /// One of the values. /// The default is . /// public ProtectionLevel ProtectionLevel @@ -224,7 +218,7 @@ namespace Spring.ServiceModel /// Gets or sets whether sessions are allowed, not allowed or required. /// /// - /// A that indicates whether sessions are allowed, + /// A that indicates whether sessions are allowed, /// not allowed, or required. /// public SessionMode SessionMode @@ -277,7 +271,7 @@ namespace Spring.ServiceModel #region IInitializingObject Members /// - /// Publish the object + /// Publish the object /// public void AfterPropertiesSet() { @@ -377,7 +371,7 @@ namespace Spring.ServiceModel protected virtual void GenerateProxy() { IProxyTypeBuilder builder = new ConfigurableServiceProxyTypeBuilder( - TargetName, this.objectName, this.objectFactory, _useServiceProxyTypeCache, ContractInterface, + TargetName, this.objectName, this.objectFactory, _useServiceProxyTypeCache, ContractInterface, Name, Namespace, ConfigurationName, CallbackContract, ProtectionLevel, SessionMode); builder.TypeAttributes = TypeAttributes; @@ -549,14 +543,14 @@ namespace Spring.ServiceModel objectDefinition.IsSingleton = false; string objectName = ObjectDefinitionReaderUtils.GenerateObjectName(objectDefinition, objectFactory); objectFactory.RegisterObjectDefinition(objectName, objectDefinition); - - //find constructor and constructor arg values to create this attribute. + + //find constructor and constructor arg values to create this attribute. ConstructorResolver constructorResolver = new ConstructorResolver(objectFactory, objectFactory, new SimpleInstantiationStrategy(), new ObjectDefinitionValueResolver(objectFactory)); - + ConstructorInstantiationInfo ci = constructorResolver.GetConstructorInstantiationInfo(objectName, objectDefinition, null, null); @@ -578,14 +572,14 @@ namespace Spring.ServiceModel propertyValues[i] = wrappedAttributeInstance.GetPropertyValue(namedProperties[i].Name); } - CustomAttributeBuilder cab = new CustomAttributeBuilder(ci.ConstructorInfo, ci.ArgInstances, + CustomAttributeBuilder cab = new CustomAttributeBuilder(ci.ConstructorInfo, ci.ArgInstances, namedProperties, propertyValues); typeBuilder.SetCustomAttribute(cab); } } - + } } } diff --git a/src/Spring/Spring.Services/ServiceModel/SpringServiceHost.cs b/src/Spring/Spring.Services/ServiceModel/SpringServiceHost.cs index 33f0e44a..fcf09067 100644 --- a/src/Spring/Spring.Services/ServiceModel/SpringServiceHost.cs +++ b/src/Spring/Spring.Services/ServiceModel/SpringServiceHost.cs @@ -18,17 +18,12 @@ #endregion -#region Imports - -using System; using Spring.Util; using Spring.Context; using Spring.Context.Support; using Spring.ServiceModel.Support; using Spring.Objects.Factory; -#endregion - namespace Spring.ServiceModel { /// @@ -108,7 +103,7 @@ namespace Spring.ServiceModel } return new ServiceProxyTypeBuilder(serviceName, objectFactory, useServiceProxyTypeCache) - .BuildProxyType(); + .BuildProxyType(); } #endregion diff --git a/src/Spring/Spring.Services/ServiceModel/SpringWebServiceHost.cs b/src/Spring/Spring.Services/ServiceModel/SpringWebServiceHost.cs index 8c48aeb7..73a2a3ef 100644 --- a/src/Spring/Spring.Services/ServiceModel/SpringWebServiceHost.cs +++ b/src/Spring/Spring.Services/ServiceModel/SpringWebServiceHost.cs @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using Spring.Util; using Spring.Context; using Spring.Context.Support; @@ -28,8 +25,6 @@ using Spring.ServiceModel.Support; using Spring.Objects.Factory; using System.ServiceModel.Web; -#endregion - namespace Spring.ServiceModel { /// @@ -109,7 +104,7 @@ namespace Spring.ServiceModel } return new ServiceProxyTypeBuilder(serviceName, objectFactory, useServiceProxyTypeCache) - .BuildProxyType(); + .BuildProxyType(); } #endregion diff --git a/src/Spring/Spring.Services/ServiceModel/Support/ServiceProxyTypeBuilder.cs b/src/Spring/Spring.Services/ServiceModel/Support/ServiceProxyTypeBuilder.cs index fbf3561f..e0c8f894 100644 --- a/src/Spring/Spring.Services/ServiceModel/Support/ServiceProxyTypeBuilder.cs +++ b/src/Spring/Spring.Services/ServiceModel/Support/ServiceProxyTypeBuilder.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Reflection; using System.Reflection.Emit; @@ -29,8 +26,6 @@ using Spring.Objects.Factory; using Spring.Proxy; using Spring.Util; -#endregion - namespace Spring.ServiceModel.Support { /// @@ -61,7 +56,7 @@ namespace Spring.ServiceModel.Support #region Constructor(s) / Destructor /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// The name of the service within Spring's IoC container. @@ -74,7 +69,7 @@ namespace Spring.ServiceModel.Support /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// The name of the service within Spring's IoC container. @@ -96,8 +91,8 @@ namespace Spring.ServiceModel.Support #region Protected Methods /// - /// Creates a proxy that delegates calls to an instance of the target object. - /// This overriden implementation caches the generated proxy type + /// Creates a proxy that delegates calls to an instance of the target object. + /// This overriden implementation caches the generated proxy type /// and sets the '__objectFactory' field. /// /// @@ -134,8 +129,8 @@ namespace Spring.ServiceModel.Support /// Implements constructors for the proxy class. /// /// - /// This implementation generates a constructor - /// that gets instance of the target object using + /// This implementation generates a constructor + /// that gets instance of the target object using /// . /// /// diff --git a/src/Spring/Spring.Services/Spring.Services.csproj b/src/Spring/Spring.Services/Spring.Services.csproj index 734c1797..40cdae7c 100644 --- a/src/Spring/Spring.Services/Spring.Services.csproj +++ b/src/Spring/Spring.Services/Spring.Services.csproj @@ -1,11 +1,14 @@  + $(TargetFullFrameworkVersion) Interfaces and classes that provide portable service abstractions in Spring.Net + + @@ -14,10 +17,16 @@ + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.Services/Web/Services/WebServiceProxyFactory.cs b/src/Spring/Spring.Services/Web/Services/WebServiceProxyFactory.cs index 6ad87df6..915e5198 100644 --- a/src/Spring/Spring.Services/Web/Services/WebServiceProxyFactory.cs +++ b/src/Spring/Spring.Services/Web/Services/WebServiceProxyFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Collections; using System.Xml.Schema; using System.Xml.Serialization; @@ -37,8 +34,6 @@ using Spring.Proxy; using Spring.Util; using Spring.Core.IO; -#endregion - namespace Spring.Web.Services { /// @@ -47,7 +42,7 @@ namespace Spring.Web.Services /// ///

/// This factory object should be used to obtain reference to a web service - /// that can be safely cast to a service interface, which allows client code to code + /// that can be safely cast to a service interface, which allows client code to code /// against interface, and not directly against the web service. ///

///

@@ -88,7 +83,7 @@ namespace Spring.Web.Services #region Constructor(s) / Destructor ///

- /// Creates a new instance of the + /// Creates a new instance of the /// class. /// public WebServiceProxyFactory() @@ -112,7 +107,7 @@ namespace Spring.Web.Services } /// - /// Gets or sets the URI for an + /// Gets or sets the URI for an /// that contains the web service description (WSDL). /// public IResource ServiceUri @@ -140,7 +135,7 @@ namespace Spring.Web.Services } /// - /// Gets or sets the instance + /// Gets or sets the instance /// to use when connecting to a server that requires authentication. /// public NetworkCredential Credential @@ -167,7 +162,7 @@ namespace Spring.Web.Services } /// - /// Gets or sets the instance + /// Gets or sets the instance /// to use when connecting to a proxy server that requires authentication. /// /// @@ -191,7 +186,7 @@ namespace Spring.Web.Services } /// - /// Gets or sets a list of custom attributes + /// Gets or sets a list of custom attributes /// that should be applied to a proxy class. /// public IList TypeAttributes @@ -201,12 +196,12 @@ namespace Spring.Web.Services } /// - /// Gets or sets a dictionary of custom attributes + /// Gets or sets a dictionary of custom attributes /// that should be applied to web service members. /// /// - /// Dictionary key is an expression that members can be matched against. - /// Value is a list of attributes that should be applied + /// Dictionary key is an expression that members can be matched against. + /// Value is a list of attributes that should be applied /// to each member that matches expression. /// public IDictionary MemberAttributes @@ -250,7 +245,7 @@ namespace Spring.Web.Services } /// - /// Gets or sets the template object definition + /// Gets or sets the template object definition /// that should be used to configure proxy instance. /// public virtual IObjectDefinition ProductTemplate @@ -358,7 +353,7 @@ namespace Spring.Web.Services { try { - if (ServiceUri is UrlResource || + if (ServiceUri is UrlResource || ServiceUri is FileSystemResource) { DiscoveryClientProtocol dcProtocol = new DiscoveryClientProtocol(); @@ -428,7 +423,7 @@ namespace Spring.Web.Services #region SoapHttpClientProxyTypeBuilder inner class implementation /// - /// Proxy type builder that can be used to create a proxy for + /// Proxy type builder that can be used to create a proxy for /// derived classes. /// private sealed class SoapHttpClientProxyTypeBuilder : AbstractProxyTypeBuilder @@ -460,7 +455,7 @@ namespace Spring.Web.Services #region Constructor(s) / Destructor /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// /// The URI that contains the Web Service meta info (WSDL). @@ -517,7 +512,7 @@ namespace Spring.Web.Services #region IProxyTypeGenerator Members /// - /// Generates the IL instructions that pushes + /// Generates the IL instructions that pushes /// the target instance on which calls should be delegated to. /// /// The IL generator to use. @@ -808,7 +803,7 @@ namespace Spring.Web.Services } /// - /// Search and returns the type mapping between method parameters/return value + /// Search and returns the type mapping between method parameters/return value /// and the element parts of a literal-use SOAP message. /// private XmlMembersMapping GetMembersMapping(string messageName, MessagePartCollection messageParts, SoapBodyBinding soapBodyBinding, SoapBindingStyle soapBindingStyle) @@ -938,7 +933,7 @@ namespace Spring.Web.Services #region SoapHttpClientProxyMethodBuilder inner class implementation /// - /// Proxy method builder that can be used to create a proxy method + /// Proxy method builder that can be used to create a proxy method /// for web services operation invocation. /// private sealed class SoapHttpClientProxyMethodBuilder : AbstractProxyMethodBuilder @@ -1086,7 +1081,7 @@ namespace Spring.Web.Services #region WebServiceProxyProxyTypeBuilder inner class implementation /// - /// Proxy type builder that can be used to create a proxy for + /// Proxy type builder that can be used to create a proxy for /// .Net-generated proxy class that can be safely cast to a service interface. /// private sealed class WebServiceProxyProxyTypeBuilder : InheritanceProxyTypeBuilder @@ -1094,7 +1089,7 @@ namespace Spring.Web.Services #region Constructor(s) / Destructor /// - /// Creates a new instance of the + /// Creates a new instance of the /// class. /// public WebServiceProxyProxyTypeBuilder() @@ -1108,13 +1103,13 @@ namespace Spring.Web.Services #region Protected Methods /// - /// Gets the mapping of the interface to proxy - /// into the actual methods on the target type + /// Gets the mapping of the interface to proxy + /// into the actual methods on the target type /// that does not need to implement that interface. /// /// ///

- /// As the proxy type does not implement the interface, + /// As the proxy type does not implement the interface, /// we try to find matching methods. ///

///
@@ -1144,4 +1139,4 @@ namespace Spring.Web.Services #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Template.Velocity.Castle/Spring.Template.Velocity.Castle.csproj b/src/Spring/Spring.Template.Velocity.Castle/Spring.Template.Velocity.Castle.csproj index 828b7bbb..70ea6543 100644 --- a/src/Spring/Spring.Template.Velocity.Castle/Spring.Template.Velocity.Castle.csproj +++ b/src/Spring/Spring.Template.Velocity.Castle/Spring.Template.Velocity.Castle.csproj @@ -1,32 +1,28 @@  + $(TargetFullFrameworkVersion) + + + - - Template\Velocity\CommonsLoggingLogSystem.cs - - - Template\Velocity\VelocityConstants.cs - - - Template\Velocity\VelocityEngineFactory.cs - - - Template\Velocity\VelocityEngineFactoryObject.cs - - - Template\Velocity\VelocityEngineUtils.cs - - - Template\Velocity\Config\spring-nvelocity-1.3.xsd - Designer - + + + + + + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.Template.Velocity.Castle/Template/Velocity/Config/TemplateNamespaceParser.cs b/src/Spring/Spring.Template.Velocity.Castle/Template/Velocity/Config/TemplateNamespaceParser.cs index 394ccdfa..d09f23af 100644 --- a/src/Spring/Spring.Template.Velocity.Castle/Template/Velocity/Config/TemplateNamespaceParser.cs +++ b/src/Spring/Spring.Template.Velocity.Castle/Template/Velocity/Config/TemplateNamespaceParser.cs @@ -20,9 +20,7 @@ #region Imports -using System; using System.Collections; -using System.Collections.Generic; using System.Xml; using NVelocity.Runtime; @@ -470,4 +468,4 @@ namespace Spring.Template.Velocity.Config { public const string SpringResourceLoaderClass = "Spring.Template.Velocity.SpringResourceLoader; Spring.Template.Velocity.Castle"; } #endregion -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Template.Velocity.Castle/Template/Velocity/SpringResourceLoader.cs b/src/Spring/Spring.Template.Velocity.Castle/Template/Velocity/SpringResourceLoader.cs index 8b3f139b..5633f5ef 100644 --- a/src/Spring/Spring.Template.Velocity.Castle/Template/Velocity/SpringResourceLoader.cs +++ b/src/Spring/Spring.Template.Velocity.Castle/Template/Velocity/SpringResourceLoader.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.IO; using Common.Logging; using Commons.Collections; using NVelocity.Runtime.Resource; @@ -174,4 +172,4 @@ namespace Spring.Template.Velocity return 0; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Template.Velocity/Template/Velocity/CommonsLoggingLogSystem.cs b/src/Spring/Spring.Template.Velocity/Template/Velocity/CommonsLoggingLogSystem.cs index 35f09e90..ea808a35 100644 --- a/src/Spring/Spring.Template.Velocity/Template/Velocity/CommonsLoggingLogSystem.cs +++ b/src/Spring/Spring.Template.Velocity/Template/Velocity/CommonsLoggingLogSystem.cs @@ -18,8 +18,6 @@ #endregion -using System; - using Common.Logging; using NVelocity.Runtime; using NVelocity.Runtime.Log; @@ -29,11 +27,11 @@ using LogManager=Common.Logging.LogManager; namespace Spring.Template.Velocity { /// - /// NVelocity LogSystem implementation for Commons Logging. + /// NVelocity LogSystem implementation for Commons Logging. /// /// Erez Mazor public class CommonsLoggingLogSystem : ILogSystem { - + /// /// Shared logger instance. /// @@ -70,4 +68,4 @@ namespace Spring.Template.Velocity } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Template.Velocity/Template/Velocity/Config/TemplateNamespaceParser.cs b/src/Spring/Spring.Template.Velocity/Template/Velocity/Config/TemplateNamespaceParser.cs index 0333de52..f060584e 100644 --- a/src/Spring/Spring.Template.Velocity/Template/Velocity/Config/TemplateNamespaceParser.cs +++ b/src/Spring/Spring.Template.Velocity/Template/Velocity/Config/TemplateNamespaceParser.cs @@ -20,9 +20,7 @@ #region Imports -using System; using System.Collections; -using System.Collections.Generic; using System.Xml; using NVelocity.Runtime; @@ -39,7 +37,7 @@ using Spring.Util; namespace Spring.Template.Velocity.Config { /// /// Implementation of the custom configuration parser for template configurations - /// based on + /// based on /// /// /// Erez Mazor @@ -90,7 +88,7 @@ namespace Spring.Template.Velocity.Config { } /// - /// Parses the object definition for the engine object, configures a single NVelocity template engine based + /// Parses the object definition for the engine object, configures a single NVelocity template engine based /// on the element definitions. /// /// the root element defining the velocity engine @@ -226,7 +224,7 @@ namespace Spring.Template.Velocity.Config { /// the properties used to initialize the velocity engine private void AppendFileLoaderProperties(XmlNodeList elements, IDictionary properties) { IList paths = new List(elements.Count); - foreach (XmlElement element in elements) + foreach (XmlElement element in elements) { paths.Add(GetAttributeValue(element, VelocityConstants.Path)); } @@ -252,7 +250,7 @@ namespace Spring.Template.Velocity.Config { /// /// Creates a spring resource loader by setting the ResourceLoaderPaths of the - /// engine factory (the resource loader itself will be created internally either as + /// engine factory (the resource loader itself will be created internally either as /// spring or as file resource loader based on the value of prefer-file-system-access /// attribute). /// @@ -268,7 +266,7 @@ namespace Spring.Template.Velocity.Config { } /// - /// Create a custom resource loader from an nv:custom element + /// Create a custom resource loader from an nv:custom element /// generates the 4 required nvelocity props for a resource loader (name, description, class and path). /// /// the nv:custom xml definition element @@ -285,7 +283,7 @@ namespace Spring.Template.Velocity.Config { } /// - /// Parses the nvelocity properties map using ObjectNamespaceParserHelper + /// Parses the nvelocity properties map using ObjectNamespaceParserHelper /// and appends it to the properties dictionary /// /// root element of the map element @@ -351,7 +349,7 @@ namespace Spring.Template.Velocity.Config { } } - + #region Element & Attribute Name Constants @@ -445,12 +443,12 @@ namespace Spring.Template.Velocity.Config { public const string PropertyVelocityProperties = "VelocityProperties"; /// - /// resource.loader.cache property of the resource loader configuration + /// resource.loader.cache property of the resource loader configuration /// public const string PropertyResourceLoaderCaching = "resource.loader.cache"; /// - /// resource.loader.modificationCheckInterval property of the resource loader configuration + /// resource.loader.modificationCheckInterval property of the resource loader configuration /// public const string PropertyResourceLoaderModificationCheckInterval = "resource.loader.modificationCheckInterval"; @@ -470,4 +468,4 @@ namespace Spring.Template.Velocity.Config { public const string SpringResourceLoaderClass = "Spring.Template.Velocity.SpringResourceLoader; Spring.Template.Velocity"; } #endregion -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Template.Velocity/Template/Velocity/SpringResourceLoader.cs b/src/Spring/Spring.Template.Velocity/Template/Velocity/SpringResourceLoader.cs index 99922dec..deeaaceb 100644 --- a/src/Spring/Spring.Template.Velocity/Template/Velocity/SpringResourceLoader.cs +++ b/src/Spring/Spring.Template.Velocity/Template/Velocity/SpringResourceLoader.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.IO; using Common.Logging; using Commons.Collections; using NVelocity.Runtime.Resource; @@ -29,19 +27,19 @@ using Spring.Core.IO; namespace Spring.Template.Velocity { /// /// NVelocity's abstract ResourceLoader extension which serves - /// as an adapter that loads templates via a Spring IResourceLoader. - /// + /// as an adapter that loads templates via a Spring IResourceLoader. + /// ///
- /// Used by VelocityEngineFactory for any resource loader path that - /// cannot be resolved to a File or an Assembly or for - /// implementations which rely on spring's IResourceLoader + /// Used by VelocityEngineFactory for any resource loader path that + /// cannot be resolved to a File or an Assembly or for + /// implementations which rely on spring's IResourceLoader /// mechanism. - /// + /// ///
/// Important: this loader does not allow for modification detection. ///
- /// Expects "spring.resource.loader" (IResourceLoader implementations) - /// and "spring.resource.loader.path" application attributes in the + /// Expects "spring.resource.loader" (IResourceLoader implementations) + /// and "spring.resource.loader.path" application attributes in the /// NVelocity runtime. ///
/// @@ -62,7 +60,7 @@ namespace Spring.Template.Velocity { public const string SPRING_RESOURCE_LOADER_CLASS = "spring.resource.loader.class"; /// - /// A flag indicating weather a template cache is used + /// A flag indicating weather a template cache is used /// public const string SPRING_RESOURCE_LOADER_CACHE = "spring.resource.loader.cache"; @@ -157,4 +155,4 @@ namespace Spring.Template.Velocity { return 0; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineFactory.cs b/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineFactory.cs index 63fbd4de..123fb192 100644 --- a/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineFactory.cs +++ b/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineFactory.cs @@ -18,10 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; -using System.IO; using Common.Logging; using Commons.Collections; using NVelocity.App; @@ -35,7 +32,7 @@ using Spring.Util; namespace Spring.Template.Velocity { /// /// Factory that configures a VelocityEngine. Can be used standalone, - /// but typically you will use VelocityEngineFactoryObject + /// but typically you will use VelocityEngineFactoryObject /// for preparing a VelocityEngine as bean reference. /// ///
@@ -55,8 +52,8 @@ namespace Spring.Template.Velocity { /// CommonsLoggingLogSystem as log system. /// ///
- /// The simplest way to use this class is to specify a ResourceLoaderPath - /// property. the VelocityEngine typically then does not need any further + /// The simplest way to use this class is to specify a ResourceLoaderPath + /// property. the VelocityEngine typically then does not need any further /// configuration. /// ///
@@ -85,8 +82,8 @@ namespace Spring.Template.Velocity { private bool overrideLogging = true; /// - /// Set the location of the Velocity config file. Alternatively, you can specify all properties locally. - /// + /// Set the location of the Velocity config file. Alternatively, you can specify all properties locally. + ///
/// /// public IResource ConfigLocation { @@ -121,8 +118,8 @@ namespace Spring.Template.Velocity { /// "file". If the specified resource cannot be resolved to a File, /// a generic SpringResourceLoader will be used under the name "spring", without /// modification detection. - ///
- /// Take notice that resource caching will be enabled in any case. With the file + ///
+ /// Take notice that resource caching will be enabled in any case. With the file /// resource loader, the last-modified timestamp will be checked on access to /// detect changes. With SpringResourceLoader, the resource will be throughout /// the life time of the application context (for example for class path resources). @@ -134,27 +131,27 @@ namespace Spring.Template.Velocity { ///
/// To enforce the use of SpringResourceLoader, i.e. to not resolve a path /// as file system resource in any case, turn off the "preferFileSystemAccess" - /// flag. See the latter's documentation for details. + /// flag. See the latter's documentation for details. ///
/// /// /// /// /// - public IList ResourceLoaderPaths + public IList ResourceLoaderPaths { set { resourceLoaderPaths = value; } } /// - /// Set the Spring ResourceLoader to use for loading Velocity template files. + /// Set the Spring ResourceLoader to use for loading Velocity template files. /// The default is DefaultResourceLoader. Will get overridden by the /// ApplicationContext if running in a context. - /// + /// /// /// /// - /// + /// public IResourceLoader ResourceLoader { get { return resourceLoader; } set { resourceLoader = value; } @@ -179,7 +176,7 @@ namespace Spring.Template.Velocity { } /// - /// Set whether Velocity should log via Commons Logging, i.e. whether Velocity's + /// Set whether Velocity should log via Commons Logging, i.e. whether Velocity's /// log system should be set to CommonsLoggingLogSystem. Default value is true /// /// @@ -246,14 +243,14 @@ namespace Spring.Template.Velocity { } /// - /// This is to overcome an issue with the current NVelocity library, it seems the + /// This is to overcome an issue with the current NVelocity library, it seems the /// default runetime properties/directives (nvelocity.properties and directive.properties - /// files) are not being properly located in the library at load time. A jira should - /// be filed but for now we attempt to do this on our own. Particularly our - /// concern here is with several required properties which I don't want + /// files) are not being properly located in the library at load time. A jira should + /// be filed but for now we attempt to do this on our own. Particularly our + /// concern here is with several required properties which I don't want /// to require users to re-defined. e.g.,: ///
- /// + /// /// Pre-requisites:
/// resource.manager.class=NVelocity.Runtime.Resource.ResourceManagerImpl
/// directive.manager=NVelocity.Runtime.Directive.DirectiveManager
@@ -304,11 +301,11 @@ namespace Spring.Template.Velocity { } extendedProperties.SetProperty(RuntimeConstants.RESOURCE_LOADER, VelocityConstants.File); - extendedProperties.SetProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, + extendedProperties.SetProperty(RuntimeConstants.FILE_RESOURCE_LOADER_PATH, StringUtils.CollectionToCommaDelimitedString(resolvedPaths)); } catch (IOException ex) { if (log.IsDebugEnabled) { - log.Error(string.Format("Cannot resolve resource loader path [{0}] to [File]: using SpringResourceLoader", + log.Error(string.Format("Cannot resolve resource loader path [{0}] to [File]: using SpringResourceLoader", StringUtils.CollectionToCommaDelimitedString(resolvedPaths)), ex); } @@ -326,8 +323,8 @@ namespace Spring.Template.Velocity { /// /// Initialize a SpringResourceLoader for the given VelocityEngine. ///
Called by InitVelocityResourceLoader. - /// - /// Important: the NVeloctity ResourceLoaderFactory.getLoader + /// + /// Important: the NVeloctity ResourceLoaderFactory.getLoader /// method replaces ';' with ',' when attempting to construct our resource /// loader. The name on the SPRING_RESOURCE_LOADER_CLASS property /// has to be in the form of "ClassFullName; AssemblyName" in replacement @@ -385,4 +382,4 @@ namespace Spring.Template.Velocity { } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineFactoryObject.cs b/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineFactoryObject.cs index 0e83d4c1..21eab4f1 100644 --- a/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineFactoryObject.cs +++ b/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineFactoryObject.cs @@ -18,7 +18,6 @@ #endregion -using System; using NVelocity.App; using Spring.Context; using Spring.Objects.Factory; @@ -26,9 +25,9 @@ using Spring.Objects.Factory; namespace Spring.Template.Velocity { /// - /// FactoryObject implementation that configures a VelocityEngine and provides it + /// FactoryObject implementation that configures a VelocityEngine and provides it /// as an object reference. This object is intended for any kind of usage of Velocity in - /// application code, e.g. for generating email content. + /// application code, e.g. for generating email content. /// /// See the base class VelocityEngineFactory for configuration details. /// @@ -61,10 +60,10 @@ namespace Spring.Template.Velocity } /// - /// Facilitate the creation of the velocity engine object + /// Facilitate the creation of the velocity engine object /// public void AfterPropertiesSet() { velocityEngine = CreateVelocityEngine(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineUtils.cs b/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineUtils.cs index a5a5f01b..4c60c61a 100644 --- a/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineUtils.cs +++ b/src/Spring/Spring.Template.Velocity/Template/Velocity/VelocityEngineUtils.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.IO; using Common.Logging; using NVelocity; using NVelocity.App; @@ -48,7 +46,7 @@ namespace Spring.Template.Velocity{ /// encoding the encoding of the template file /// the Hashtable that contains model names as keys and model objects /// writer the TextWriter to write the result to - /// thrown if any exception is thrown by the velocity engine + /// thrown if any exception is thrown by the velocity engine public static void MergeTemplate( VelocityEngine velocityEngine, string templateLocation, string encoding, Hashtable model, TextWriter writer) { @@ -68,9 +66,9 @@ namespace Spring.Template.Velocity{ /// VelocityEngine to work with /// the location of template, relative to Velocity's resource loader path /// the encoding string to use for the merge - /// the Hashtable that contains model names as keys and model objects + /// the Hashtable that contains model names as keys and model objects /// the result as string - /// thrown if any exception is thrown by the velocity engine + /// thrown if any exception is thrown by the velocity engine public static string MergeTemplateIntoString( VelocityEngine velocityEngine, string templateLocation, string encoding, Hashtable model) { @@ -79,4 +77,4 @@ namespace Spring.Template.Velocity{ return result.ToString(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.csproj b/src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.csproj index 1038bee0..af7e48be 100644 --- a/src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.csproj +++ b/src/Spring/Spring.Testing.Microsoft/Spring.Testing.Microsoft.csproj @@ -1,13 +1,21 @@  + $(TargetFullFrameworkVersion) Interfaces and classes that provide Microsoft Unit Testing integration in Spring.Net + + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractDependencyInjectionSpringContextTests.cs b/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractDependencyInjectionSpringContextTests.cs index 2169cd22..1d5a78cc 100644 --- a/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractDependencyInjectionSpringContextTests.cs +++ b/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractDependencyInjectionSpringContextTests.cs @@ -2,13 +2,13 @@ /* /// Copyright 2002-2010 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. /// You may obtain a copy of the License at -/// +/// /// http://www.apache.org/licenses/LICENSE-2.0 -/// +/// /// Unless required by applicable law or agreed to in writing, software /// distributed under the License is distributed on an "AS IS" BASIS, /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Reflection; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -35,7 +33,7 @@ namespace Spring.Testing.Microsoft /// Convenient superclass for tests depending on a Spring context. /// The test instance itself is populated by Dependency Injection. ///
- /// + /// /// ///

Really for integration testing, not unit testing. /// You should not normally use the Spring container @@ -70,7 +68,7 @@ namespace Spring.Testing.Microsoft /// assembly resource URLs. Else, you may see misleading failures when changing /// context locations.

///
- /// + /// /// Rod Johnson /// Rob Harrop /// Rick Evans @@ -99,11 +97,11 @@ namespace Spring.Testing.Microsoft {} /// - /// Gets or sets a flag specifying whether to populate protected + /// Gets or sets a flag specifying whether to populate protected /// variables of this test case. /// /// - /// A flag specifying whether to populate protected variables of this test case. + /// A flag specifying whether to populate protected variables of this test case. /// Default is false. /// public bool PopulateProtectedVariables @@ -126,11 +124,11 @@ namespace Spring.Testing.Microsoft } /// - /// Gets or sets a flag specifying whether or not dependency checking + /// Gets or sets a flag specifying whether or not dependency checking /// should be performed for test properties set by Dependency Injection. /// /// - ///

A flag specifying whether or not dependency checking + ///

A flag specifying whether or not dependency checking /// should be performed for test properties set by Dependency Injection.

///

The default is true, meaning that tests cannot be run /// unless all properties are populated.

@@ -329,7 +327,7 @@ namespace Spring.Testing.Microsoft } /// - /// Subclasses can override this method in order to + /// Subclasses can override this method in order to /// add custom test setup logic. /// protected virtual void OnTestInitialize() @@ -352,7 +350,7 @@ namespace Spring.Testing.Microsoft } /// - /// Subclasses can override this method in order to + /// Subclasses can override this method in order to /// add custom test teardown logic. /// protected virtual void OnTestCleanup() @@ -366,4 +364,4 @@ namespace Spring.Testing.Microsoft /// An array of config locations protected abstract string[] ConfigLocations { get; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractSpringContextTests.cs b/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractSpringContextTests.cs index dcffac9b..c233fe08 100644 --- a/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractSpringContextTests.cs +++ b/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractSpringContextTests.cs @@ -1,24 +1,23 @@ #region License -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. +/* + * Copyright 2002-2010 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 +#endregion -using System; using System.Collections; using Common.Logging; using Spring.Context; @@ -32,7 +31,7 @@ namespace Spring.Testing.Microsoft ///
/// ///

Maintains a cache of contexts by key. This has significant performance - /// benefit if initializing the context would take time. While initializing a + /// benefit if initializing the context would take time. While initializing a /// Spring context itself is very quick, some objects in a context, such as /// a LocalSessionFactoryObject for working with NHibernate, may take time to /// initialize. Hence it often makes sense to do that initializing once.

@@ -41,7 +40,7 @@ namespace Spring.Testing.Microsoft ///
/// Rod Johnson /// Aleksandar Seovic (.NET) - public abstract class AbstractSpringContextTests + public abstract class AbstractSpringContextTests { /// /// Map of context keys returned by subclasses of this class, to @@ -107,30 +106,30 @@ namespace Spring.Testing.Microsoft /// object, potentially affecting future tests. /// /// Locations - protected void SetDirty(string[] locations) + protected void SetDirty(string[] locations) { String keyString = ContextKeyString(locations); IConfigurableApplicationContext ctx = (IConfigurableApplicationContext) contextKeyToContextMap[keyString]; contextKeyToContextMap.Remove(keyString); - if (ctx != null) + if (ctx != null) { ctx.Dispose(); } } /// - /// Returns true if context for the specified + /// Returns true if context for the specified /// is cached. /// /// Context key to check. /// - /// true if context for the specified - /// is cached, + /// true if context for the specified + /// is cached, /// false otherwise. /// - protected bool HasCachedContext(object contextKey) + protected bool HasCachedContext(object contextKey) { string keyString = ContextKeyString(contextKey); return contextKeyToContextMap.Contains(keyString); @@ -145,20 +144,20 @@ namespace Spring.Testing.Microsoft /// /// Context key to convert. /// - /// String representation of the specified . Null if + /// String representation of the specified . Null if /// contextKey is null. /// - protected virtual string ContextKeyString(object contextKey) + protected virtual string ContextKeyString(object contextKey) { if (contextKey == null) { return null; } - if (contextKey is string[]) + if (contextKey is string[]) { return StringUtils.CollectionToCommaDelimitedString((string[])contextKey); } - else + else { return contextKey.ToString(); } @@ -169,7 +168,7 @@ namespace Spring.Testing.Microsoft /// /// Key to use. /// Context to cache. - public void AddContext(object key, IConfigurableApplicationContext context) + public void AddContext(object key, IConfigurableApplicationContext context) { AssertUtils.ArgumentNotNull(context, "context", "ApplicationContext must not be null"); string keyString = ContextKeyString(key); @@ -187,18 +186,18 @@ namespace Spring.Testing.Microsoft ///
/// Context key. /// Spring application context associated with the specified key. - protected IConfigurableApplicationContext GetContext(object key) + protected IConfigurableApplicationContext GetContext(object key) { string keyString = ContextKeyString(key); IConfigurableApplicationContext ctx = (IConfigurableApplicationContext) contextKeyToContextMap[keyString]; - if (ctx == null) + if (ctx == null) { - if (key is string[]) + if (key is string[]) { ctx = LoadContextLocations((string[]) key); } - else + else { ctx = LoadContext(key); } @@ -212,9 +211,9 @@ namespace Spring.Testing.Microsoft /// Loads application context from the specified resource locations. ///
/// Resources to load object definitions from. - protected virtual IConfigurableApplicationContext LoadContextLocations(string[] locations) + protected virtual IConfigurableApplicationContext LoadContextLocations(string[] locations) { - if (logger.IsInfoEnabled) + if (logger.IsInfoEnabled) { logger.Info("Loading config for: " + StringUtils.CollectionToCommaDelimitedString(locations)); } @@ -225,14 +224,14 @@ namespace Spring.Testing.Microsoft /// Loads application context based on user-defined key. ///
/// - /// Unless overriden by the user, this method will alway throw - /// a . + /// Unless overriden by the user, this method will alway throw + /// a . /// /// User-defined key. - protected virtual IConfigurableApplicationContext LoadContext(object key) + protected virtual IConfigurableApplicationContext LoadContext(object key) { throw new NotSupportedException("Subclasses may override this"); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalDbProviderSpringContextTests.cs b/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalDbProviderSpringContextTests.cs index 93da9678..090c338e 100644 --- a/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalDbProviderSpringContextTests.cs +++ b/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalDbProviderSpringContextTests.cs @@ -18,8 +18,6 @@ #endregion - -using System; using System.Data; using Spring.Data.Common; using Spring.Data.Core; @@ -55,7 +53,7 @@ namespace Spring.Testing.Microsoft /// Initializes a new instance of the class. ///
public AbstractTransactionalDbProviderSpringContextTests() - { + { } /// @@ -133,11 +131,11 @@ namespace Spring.Testing.Microsoft /// The number of rows in the table protected int CountRowsInTable(String tableName) { - return (int) adoTemplate.ExecuteScalar(CommandType.Text, "SELECT COUNT(0) FROM " + tableName); + return (int) adoTemplate.ExecuteScalar(CommandType.Text, "SELECT COUNT(0) FROM " + tableName); } - + //TODO ExecuteScript... } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalSpringContextTests.cs b/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalSpringContextTests.cs index 09d0ec4f..bb035851 100644 --- a/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalSpringContextTests.cs +++ b/src/Spring/Spring.Testing.Microsoft/Testing/Microsoft/AbstractTransactionalSpringContextTests.cs @@ -18,8 +18,6 @@ #endregion - -using System; using Spring.Transaction; using Spring.Transaction.Support; @@ -313,4 +311,4 @@ namespace Spring.Testing.Microsoft } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.csproj b/src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.csproj index d47ad6c9..318d12e5 100644 --- a/src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.csproj +++ b/src/Spring/Spring.Testing.NUnit/Spring.Testing.NUnit.csproj @@ -1,14 +1,22 @@  + netstandard2.0;$(TargetFullFrameworkVersion) Interfaces and classes that provide NUnit integration in Spring.Net 1587, 1591, 219, 162, 618 + + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.Testing.NUnit/Testing/Ado/IPlatformTransaction.cs b/src/Spring/Spring.Testing.NUnit/Testing/Ado/IPlatformTransaction.cs index 6ef6544d..07e207a1 100644 --- a/src/Spring/Spring.Testing.NUnit/Testing/Ado/IPlatformTransaction.cs +++ b/src/Spring/Spring.Testing.NUnit/Testing/Ado/IPlatformTransaction.cs @@ -1,5 +1,3 @@ -using System; - namespace Spring.Testing.Ado { /// @@ -24,4 +22,4 @@ namespace Spring.Testing.Ado /// void Rollback(); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Testing.NUnit/Testing/Ado/SimpleAdoTestUtils.cs b/src/Spring/Spring.Testing.NUnit/Testing/Ado/SimpleAdoTestUtils.cs index dfebb50e..5ca35f2e 100644 --- a/src/Spring/Spring.Testing.NUnit/Testing/Ado/SimpleAdoTestUtils.cs +++ b/src/Spring/Spring.Testing.NUnit/Testing/Ado/SimpleAdoTestUtils.cs @@ -1,27 +1,24 @@ #region License -/* - * Copyright 2002-2010 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. +/* + * Copyright 2002-2010 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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 -using System; -using System.Collections.Generic; using System.Data; -using System.IO; using System.Reflection; using System.Text.RegularExpressions; @@ -336,4 +333,4 @@ namespace Spring.Testing.Ado } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractDependencyInjectionSpringContextTests.cs b/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractDependencyInjectionSpringContextTests.cs index d3a444bb..d1781238 100644 --- a/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractDependencyInjectionSpringContextTests.cs +++ b/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractDependencyInjectionSpringContextTests.cs @@ -2,13 +2,13 @@ /* /// Copyright 2002-2010 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. /// You may obtain a copy of the License at -/// +/// /// http://www.apache.org/licenses/LICENSE-2.0 -/// +/// /// Unless required by applicable law or agreed to in writing, software /// distributed under the License is distributed on an "AS IS" BASIS, /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Reflection; using NUnit.Framework; @@ -35,7 +33,7 @@ namespace Spring.Testing.NUnit /// Convenient superclass for tests depending on a Spring context. /// The test instance itself is populated by Dependency Injection. /// - /// + /// /// ///

Really for integration testing, not unit testing. /// You should not normally use the Spring container @@ -70,7 +68,7 @@ namespace Spring.Testing.NUnit /// assembly resource URLs. Else, you may see misleading failures when changing /// context locations.

///
- /// + /// /// Rod Johnson /// Rob Harrop /// Rick Evans @@ -99,11 +97,11 @@ namespace Spring.Testing.NUnit {} /// - /// Gets or sets a flag specifying whether to populate protected + /// Gets or sets a flag specifying whether to populate protected /// variables of this test case. /// /// - /// A flag specifying whether to populate protected variables of this test case. + /// A flag specifying whether to populate protected variables of this test case. /// Default is false. /// public bool PopulateProtectedVariables @@ -126,11 +124,11 @@ namespace Spring.Testing.NUnit } /// - /// Gets or sets a flag specifying whether or not dependency checking + /// Gets or sets a flag specifying whether or not dependency checking /// should be performed for test properties set by Dependency Injection. /// /// - ///

A flag specifying whether or not dependency checking + ///

A flag specifying whether or not dependency checking /// should be performed for test properties set by Dependency Injection.

///

The default is true, meaning that tests cannot be run /// unless all properties are populated.

@@ -329,7 +327,7 @@ namespace Spring.Testing.NUnit } /// - /// Subclasses can override this method in order to + /// Subclasses can override this method in order to /// add custom test setup logic after the context has been created and dependencies injected. /// Called from this class's [SetUp] method. /// @@ -354,7 +352,7 @@ namespace Spring.Testing.NUnit } /// - /// Subclasses can override this method in order to + /// Subclasses can override this method in order to /// add custom test teardown logic. Called from this class's [TearDown] method. /// protected virtual void OnTearDown() @@ -368,4 +366,4 @@ namespace Spring.Testing.NUnit /// An array of config locations protected abstract string[] ConfigLocations { get; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractSpringContextTests.cs b/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractSpringContextTests.cs index b0e6f1e4..b6d9a243 100644 --- a/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractSpringContextTests.cs +++ b/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractSpringContextTests.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Collections; using Common.Logging; using Spring.Context; @@ -28,7 +27,7 @@ namespace Spring.Testing.NUnit ///
/// ///

Maintains a cache of contexts by key. This has significant performance - /// benefit if initializing the context would take time. While initializing a + /// benefit if initializing the context would take time. While initializing a /// Spring context itself is very quick, some objects in a context, such as /// a LocalSessionFactoryObject for working with NHibernate, may take time to /// initialize. Hence it often makes sense to do that initializing once.

@@ -37,7 +36,7 @@ namespace Spring.Testing.NUnit ///
/// Rod Johnson /// Aleksandar Seovic (.NET) - public abstract class AbstractSpringContextTests + public abstract class AbstractSpringContextTests { /// /// Map of context keys returned by subclasses of this class, to @@ -103,13 +102,13 @@ namespace Spring.Testing.NUnit /// object, potentially affecting future tests. /// /// Locations - protected void SetDirty(string[] locations) + protected void SetDirty(string[] locations) { SetDirty((object)locations); } /// - /// Set context with dirty. This will cause + /// Set context with dirty. This will cause /// it to be reloaded from the cache before the next test case is executed. /// /// @@ -117,30 +116,30 @@ namespace Spring.Testing.NUnit /// object, potentially affecting future tests. /// /// Locations - protected void SetDirty(object contextKey) + protected void SetDirty(object contextKey) { String keyString = ContextKeyString(contextKey); IConfigurableApplicationContext ctx = (IConfigurableApplicationContext) contextKeyToContextMap[keyString]; contextKeyToContextMap.Remove(keyString); - if (ctx != null) + if (ctx != null) { ctx.Dispose(); } } /// - /// Returns true if context for the specified + /// Returns true if context for the specified /// is cached. /// /// Context key to check. /// - /// true if context for the specified - /// is cached, + /// true if context for the specified + /// is cached, /// false otherwise. /// - protected bool HasCachedContext(object contextKey) + protected bool HasCachedContext(object contextKey) { string keyString = ContextKeyString(contextKey); return contextKeyToContextMap.Contains(keyString); @@ -155,20 +154,20 @@ namespace Spring.Testing.NUnit /// /// Context key to convert. /// - /// String representation of the specified . Null if + /// String representation of the specified . Null if /// contextKey is null. /// - protected virtual string ContextKeyString(object contextKey) + protected virtual string ContextKeyString(object contextKey) { if (contextKey == null) { return null; } - if (contextKey is string[]) + if (contextKey is string[]) { return StringUtils.CollectionToCommaDelimitedString((string[])contextKey); } - else + else { return contextKey.ToString(); } @@ -179,7 +178,7 @@ namespace Spring.Testing.NUnit /// /// Key to use. /// Context to cache. - public void AddContext(object key, IConfigurableApplicationContext context) + public void AddContext(object key, IConfigurableApplicationContext context) { AssertUtils.ArgumentNotNull(context, "context", "ApplicationContext must not be null"); string keyString = ContextKeyString(key); @@ -197,18 +196,18 @@ namespace Spring.Testing.NUnit ///
/// Context key. /// Spring application context associated with the specified key. - protected IConfigurableApplicationContext GetContext(object key) + protected IConfigurableApplicationContext GetContext(object key) { string keyString = ContextKeyString(key); IConfigurableApplicationContext ctx = (IConfigurableApplicationContext) contextKeyToContextMap[keyString]; - if (ctx == null) + if (ctx == null) { - if (key is string[]) + if (key is string[]) { ctx = LoadContextLocations((string[]) key); } - else + else { ctx = LoadContext(key); } @@ -224,9 +223,9 @@ namespace Spring.Testing.NUnit /// Loads application context from the specified resource locations. ///
/// Resources to load object definitions from. - protected virtual IConfigurableApplicationContext LoadContextLocations(string[] locations) + protected virtual IConfigurableApplicationContext LoadContextLocations(string[] locations) { - if (logger.IsInfoEnabled) + if (logger.IsInfoEnabled) { logger.Info("Loading config for: " + StringUtils.CollectionToCommaDelimitedString(locations)); } @@ -237,14 +236,14 @@ namespace Spring.Testing.NUnit /// Loads application context based on user-defined key. ///
/// - /// Unless overriden by the user, this method will alway throw - /// a . + /// Unless overriden by the user, this method will alway throw + /// a . /// /// User-defined key. - protected virtual IConfigurableApplicationContext LoadContext(object key) + protected virtual IConfigurableApplicationContext LoadContext(object key) { throw new NotSupportedException("Subclasses may override this"); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractTransactionalDbProviderSpringContextTests.cs b/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractTransactionalDbProviderSpringContextTests.cs index 603578bb..99068940 100644 --- a/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractTransactionalDbProviderSpringContextTests.cs +++ b/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractTransactionalDbProviderSpringContextTests.cs @@ -1,4 +1,3 @@ -using System; using System.Data; using Spring.Data.Common; using Spring.Data.Core; @@ -113,12 +112,12 @@ namespace Spring.Testing.NUnit /// The number of rows in the table protected int CountRowsInTable(String tableName) { - return (int) adoTemplate.ExecuteScalar(CommandType.Text, "SELECT COUNT(0) FROM " + tableName); + return (int) adoTemplate.ExecuteScalar(CommandType.Text, "SELECT COUNT(0) FROM " + tableName); } /// - /// Execute the given SQL script using + /// Execute the given SQL script using /// /// /// @@ -128,4 +127,4 @@ namespace Spring.Testing.NUnit SimpleAdoTestUtils.ExecuteSqlScript( this.AdoTemplate, this.applicationContext, scriptResourcePath, continueOnError); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractTransactionalSpringContextTests.cs b/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractTransactionalSpringContextTests.cs index baed7483..8942abfa 100644 --- a/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractTransactionalSpringContextTests.cs +++ b/src/Spring/Spring.Testing.NUnit/Testing/NUnit/AbstractTransactionalSpringContextTests.cs @@ -1,4 +1,3 @@ -using System; using Spring.Transaction; using Spring.Transaction.Support; @@ -41,16 +40,16 @@ namespace Spring.Testing.NUnit /// Dependency Injection mechanism. If using the superclass's Field Injection mechanism, /// the implementation should be named "transactionManager". This mechanism allows the /// use of this superclass even when there's more than one transaction manager in the context.

- /// + /// ///

This superclass can also be used without transaction management, if no /// IPlatformTransactionManager object is found in the context provided. Be careful about /// using this mode, as it allows the potential to permanently modify data. /// This mode is available only if dependency checking is turned off in /// the AbstractDependencyInjectionSpringContextTests superclass. The non-transactional /// capability is provided to enable use of the same subclass in different environments.

- /// + /// /// - /// + /// /// Rod Johnson /// Juergen Hoeller /// Rick Evans @@ -284,4 +283,4 @@ namespace Spring.Testing.NUnit } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web.Conversation.NHibernate5/Data/NHibernate/Support/SessionPerConversationScope.cs b/src/Spring/Spring.Web.Conversation.NHibernate5/Data/NHibernate/Support/SessionPerConversationScope.cs index 79b0ef8c..d6d75522 100644 --- a/src/Spring/Spring.Web.Conversation.NHibernate5/Data/NHibernate/Support/SessionPerConversationScope.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate5/Data/NHibernate/Support/SessionPerConversationScope.cs @@ -14,7 +14,6 @@ * limitations under the License. */ -using System; using System.Reflection; using Common.Logging; @@ -23,7 +22,6 @@ using Spring.Threading; using Spring.Transaction.Support; using Spring.Util; using System.Data; -using System.Collections.Generic; using System.Data.Common; using Spring.Web.Conversation; @@ -465,4 +463,4 @@ namespace Spring.Data.NHibernate.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web.Conversation.NHibernate5/Data/NHibernate/Support/SessionPerConversationSettings.cs b/src/Spring/Spring.Web.Conversation.NHibernate5/Data/NHibernate/Support/SessionPerConversationSettings.cs index 71839b5b..c075f3f7 100644 --- a/src/Spring/Spring.Web.Conversation.NHibernate5/Data/NHibernate/Support/SessionPerConversationSettings.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate5/Data/NHibernate/Support/SessionPerConversationSettings.cs @@ -18,8 +18,6 @@ #endregion -using System; - using NHibernate; namespace Spring.Data.NHibernate.Support diff --git a/src/Spring/Spring.Web.Conversation.NHibernate5/Spring.Web.Conversation.NHibernate5.csproj b/src/Spring/Spring.Web.Conversation.NHibernate5/Spring.Web.Conversation.NHibernate5.csproj index 8dbd12c3..9e557336 100644 --- a/src/Spring/Spring.Web.Conversation.NHibernate5/Spring.Web.Conversation.NHibernate5.csproj +++ b/src/Spring/Spring.Web.Conversation.NHibernate5/Spring.Web.Conversation.NHibernate5.csproj @@ -1,14 +1,22 @@  + $(TargetFullFrameworkVersion) Conversation-Per-Business-Transaction support for Spring.Net using NHibernate + + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/HttpModule/ConversationModule.cs b/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/HttpModule/ConversationModule.cs index 2efd42a6..67d60b5c 100644 --- a/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/HttpModule/ConversationModule.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/HttpModule/ConversationModule.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Web; using System.Web.UI; using Common.Logging; diff --git a/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/IConversationManager.cs b/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/IConversationManager.cs index 1852c6f5..743585e2 100644 --- a/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/IConversationManager.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/IConversationManager.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using NHibernate; namespace Spring.Web.Conversation diff --git a/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/IConversationState.cs b/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/IConversationState.cs index 40b76889..b773d2d4 100644 --- a/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/IConversationState.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/IConversationState.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,16 +18,14 @@ #endregion -using System; -using System.Collections.Generic; using NHibernate; using Spring.Data.Common; namespace Spring.Web.Conversation { /// - /// Port to conversation. If the object is not found in the current - /// conversation, will be tried on the parent if the parent is + /// Port to conversation. If the object is not found in the current + /// conversation, will be tried on the parent if the parent is /// not null. /// /// @@ -43,8 +41,8 @@ namespace Spring.Web.Conversation /// /// Starts or resumes the conversation and the . - /// If is not null, so - /// is called to + /// If is not null, so + /// is called to /// Raise SessionHolder for make the reconnection. /// /// Make return false. @@ -56,8 +54,8 @@ namespace Spring.Web.Conversation /// /// If this conversation is ended. /// - /// If is not null and - /// different from + /// If is not null and + /// different from /// /// /// @@ -79,10 +77,10 @@ namespace Spring.Web.Conversation /// /// /// If . - /// Session["spring.objects"] + /// Session["spring.objects"] /// is null. /// - /// The 'spring session scopes' are not located in the key + /// The 'spring session scopes' are not located in the key /// 'spring.objects' of HttpSessionState. /// /// @@ -95,10 +93,10 @@ namespace Spring.Web.Conversation bool Ended { get; } /// - /// Inner conversation. After added if the + /// Inner conversation. After added if the /// is null it will resolve to 'this'. /// - /// at + /// at /// , /// , /// @@ -123,21 +121,21 @@ namespace Spring.Web.Conversation IConversationState ParentConversation { get; set;} /// - /// TimeOut for the conversation in milliseconds. + /// TimeOut for the conversation in milliseconds. /// If 0 TimeOut will be ignored. /// Int32 TimeOut { get; set; } /// /// Last acces for a value into this Conversation or Inner Conversation. - /// Reset to DateTime.Now each time + /// Reset to DateTime.Now each time /// is called. /// DateTime LastAccess { get; set; } /// - /// Conversation Manager. When this is setted if - /// + /// Conversation Manager. When this is setted if + /// /// returns null so AddConversation is called. /// IConversationManager ConversationManager { get; set; } @@ -160,7 +158,7 @@ namespace Spring.Web.Conversation ISessionFactory SessionFactory { get; } /// - /// If this is non-null run pattern 'session-per-conversation'. + /// If this is non-null run pattern 'session-per-conversation'. /// It also depends on and . /// must support ConversationManager. /// @@ -174,8 +172,8 @@ namespace Spring.Web.Conversation /// /// Starts or resumes the conversation and each 'inner conversation' in - /// . - /// It is not about 'Session-per-conversation' because it is done by + /// . + /// It is not about 'Session-per-conversation' because it is done by /// . /// void PauseConversation(); diff --git a/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/InnerConversationList.cs b/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/InnerConversationList.cs index 50de4f91..4683e9b7 100644 --- a/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/InnerConversationList.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/InnerConversationList.cs @@ -18,11 +18,8 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using Common.Logging; -using Iesi.Collections.Generic; using Spring.Collections.Generic; namespace Spring.Web.Conversation diff --git a/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/WebConversationManager.cs b/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/WebConversationManager.cs index 4695fb0e..f674716d 100644 --- a/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/WebConversationManager.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/WebConversationManager.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,10 +18,6 @@ #endregion -using System; -using System.Collections.Generic; -using System.Threading; - using Common.Logging; using NHibernate; using Spring.Context; @@ -61,7 +57,7 @@ namespace Spring.Web.Conversation #region IConversationManager Members /// - /// + /// /// /// /// @@ -116,7 +112,7 @@ namespace Spring.Web.Conversation } this.Close(this.SessionFactory, this.conversations.Values); } - + /// /// /// @@ -211,7 +207,7 @@ namespace Spring.Web.Conversation } } } - + /// /// /// @@ -225,7 +221,7 @@ namespace Spring.Web.Conversation private String sessionFactoryName; /// - /// "SessionFactory" name in the current context. + /// "SessionFactory" name in the current context. /// This approach is required to support serialization. /// public String SessionFactoryName diff --git a/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/WebConversationSpringState.cs b/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/WebConversationSpringState.cs index bb6d66b5..6a928035 100644 --- a/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/WebConversationSpringState.cs +++ b/src/Spring/Spring.Web.Conversation.NHibernate5/Web/Conversation/WebConversationSpringState.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Web; using Common.Logging; using NHibernate; diff --git a/src/Spring/Spring.Web.Extensions/Spring.Web.Extensions.csproj b/src/Spring/Spring.Web.Extensions/Spring.Web.Extensions.csproj index 3f8b5dd4..3a21019a 100644 --- a/src/Spring/Spring.Web.Extensions/Spring.Web.Extensions.csproj +++ b/src/Spring/Spring.Web.Extensions/Spring.Web.Extensions.csproj @@ -1,15 +1,23 @@  + $(TargetFullFrameworkVersion) Interfaces and classes that provide ASP.NET AJAX 1.0 support in Spring.Net + + + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.Web.Extensions/Web/Script/Services/ScriptHandlerFactory.cs b/src/Spring/Spring.Web.Extensions/Web/Script/Services/ScriptHandlerFactory.cs index f2b21c58..877b7619 100644 --- a/src/Spring/Spring.Web.Extensions/Web/Script/Services/ScriptHandlerFactory.cs +++ b/src/Spring/Spring.Web.Extensions/Web/Script/Services/ScriptHandlerFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,9 +18,6 @@ #endregion -#region Imports - -using System; using System.Reflection; using System.Web; using System.Web.Script.Services; @@ -30,12 +27,10 @@ using Spring.Util; using Spring.Web.Services; using Spring.Web.Support; -#endregion - namespace Spring.Web.Script.Services { /// - /// An implementation that + /// An implementation that /// creates a handler object for either ASP.NET AJAX 1.0 or Spring web services. /// /// Bruno Baia @@ -73,8 +68,8 @@ namespace Spring.Web.Script.Services } /// - /// Retrieves an instance of the - /// implementation for handling web service requests + /// Retrieves an instance of the + /// implementation for handling web service requests /// for both Spring and ASP.NET AJAX 1.0 web services. /// /// The current HTTP context. @@ -141,4 +136,4 @@ namespace Spring.Web.Script.Services throw new NotSupportedException(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web.Mvc5/SpringActionInvoker.cs b/src/Spring/Spring.Web.Mvc5/SpringActionInvoker.cs index cf708724..dae47cd8 100644 --- a/src/Spring/Spring.Web.Mvc5/SpringActionInvoker.cs +++ b/src/Spring/Spring.Web.Mvc5/SpringActionInvoker.cs @@ -18,13 +18,8 @@ #endregion -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Web.Mvc; using Spring.Context; -using Spring.Context.Support; namespace Spring.Web.Mvc { diff --git a/src/Spring/Spring.Web.Mvc5/SpringControllerFactory.cs b/src/Spring/Spring.Web.Mvc5/SpringControllerFactory.cs index ad88259f..7ae9aa35 100644 --- a/src/Spring/Spring.Web.Mvc5/SpringControllerFactory.cs +++ b/src/Spring/Spring.Web.Mvc5/SpringControllerFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,11 @@ #endregion -using System; using System.Web.Mvc; using System.Web.Routing; using Spring.Context; using Spring.Context.Support; -using System.Linq; namespace Spring.Web.Mvc { @@ -145,4 +143,4 @@ namespace Spring.Web.Mvc } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web.Mvc5/SpringMvcApplication.cs b/src/Spring/Spring.Web.Mvc5/SpringMvcApplication.cs index c0a70657..4eb3b28a 100644 --- a/src/Spring/Spring.Web.Mvc5/SpringMvcApplication.cs +++ b/src/Spring/Spring.Web.Mvc5/SpringMvcApplication.cs @@ -18,8 +18,6 @@ #endregion - -using System; using System.Web; using System.Web.Mvc; diff --git a/src/Spring/Spring.Web.Mvc5/SpringMvcDependencyResolver.cs b/src/Spring/Spring.Web.Mvc5/SpringMvcDependencyResolver.cs index 5e2147ce..ad7c3f74 100644 --- a/src/Spring/Spring.Web.Mvc5/SpringMvcDependencyResolver.cs +++ b/src/Spring/Spring.Web.Mvc5/SpringMvcDependencyResolver.cs @@ -1,7 +1,4 @@ -using System; using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; using System.Web.Mvc; using Common.Logging; diff --git a/src/Spring/Spring.Web.Mvc5/SpringWebApiDependencyResolver.cs b/src/Spring/Spring.Web.Mvc5/SpringWebApiDependencyResolver.cs index 76ae83c1..52f03a07 100644 --- a/src/Spring/Spring.Web.Mvc5/SpringWebApiDependencyResolver.cs +++ b/src/Spring/Spring.Web.Mvc5/SpringWebApiDependencyResolver.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web.Http.Dependencies; +using System.Web.Http.Dependencies; using Spring.Context; using Spring.Context.Support; @@ -34,7 +31,7 @@ namespace Spring.Web.Mvc } /// - /// + /// /// /// The initialized instance. /// @@ -141,4 +138,4 @@ namespace Spring.Web.Mvc ChildApplicationContextConfigurationLocations.Add(location); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Caching/AspNetCache.cs b/src/Spring/Spring.Web/Caching/AspNetCache.cs index 98dbb240..eadd4afb 100644 --- a/src/Spring/Spring.Web/Caching/AspNetCache.cs +++ b/src/Spring/Spring.Web/Caching/AspNetCache.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Collections; -using System.Collections.Generic; using System.Web; using System.Web.Caching; using Common.Logging; @@ -119,9 +117,9 @@ namespace Spring.Caching #endregion /// - /// Initializes a new instance of + /// Initializes a new instance of /// - public AspNetCache() + public AspNetCache() :this(new RuntimeCache()) { } @@ -135,7 +133,7 @@ namespace Spring.Caching { _cache = runtimeCache; // noop - _cacheName = typeof(AspNetCache).FullName + "[" + this.GetHashCode() + "]."; + _cacheName = typeof(AspNetCache).FullName + "[" + this.GetHashCode() + "]."; } #region Configurable Properties @@ -168,7 +166,7 @@ namespace Spring.Caching get { List keys = new List(); - + foreach (DictionaryEntry entry in _cache) { string key = (string) entry.Key; @@ -249,7 +247,7 @@ namespace Spring.Caching /// public void Insert(object key, object value, TimeSpan timeToLive, bool slidingExpiration) { - this.Insert(key, value, timeToLive, slidingExpiration, _priority); + this.Insert(key, value, timeToLive, slidingExpiration, _priority); } /// @@ -307,4 +305,4 @@ namespace Spring.Caching return _cacheName + key; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs b/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs index 48ecf466..4ca9c765 100644 --- a/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs +++ b/src/Spring/Spring.Web/Context/Support/WebApplicationContext.cs @@ -18,10 +18,8 @@ #endregion -using System; using System.Collections; using System.Diagnostics; -using System.IO; using System.Reflection; using System.Web; using System.Web.Hosting; diff --git a/src/Spring/Spring.Web/Context/Support/WebContextHandler.cs b/src/Spring/Spring.Web/Context/Support/WebContextHandler.cs index e6d05617..fc36e1ea 100644 --- a/src/Spring/Spring.Web/Context/Support/WebContextHandler.cs +++ b/src/Spring/Spring.Web/Context/Support/WebContextHandler.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; using System.Web.Configuration; using System.Xml; @@ -134,4 +132,4 @@ namespace Spring.Context.Support return String.Empty; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Context/Support/WebSupportModule.cs b/src/Spring/Spring.Web/Context/Support/WebSupportModule.cs index 34ec419e..649cdf3d 100644 --- a/src/Spring/Spring.Web/Context/Support/WebSupportModule.cs +++ b/src/Spring/Spring.Web/Context/Support/WebSupportModule.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,16 +18,15 @@ #endregion -using System; using System.Globalization; using System.Reflection; using System.Security; using System.Web; using System.Web.Caching; -using System.Web.Routing; +using System.Web.Routing; using System.Web.SessionState; using System.Web.UI; - + using Common.Logging; using Spring.Core.IO; using Spring.Core.TypeConversion; @@ -138,7 +137,7 @@ namespace Spring.Context.Support } s_isInitialized = true; - // signal, that VirtualEnvironment is ready to accept + // signal, that VirtualEnvironment is ready to accept // handler registrations for EndRequest and EndSession events VirtualEnvironment.SetInitialized(); } @@ -155,7 +154,7 @@ namespace Spring.Context.Support hideRequestResponse = (bool)ContextHideRequestResponse.GetValue(app.Context); ContextHideRequestResponse.SetValue(app.Context, false); } - + try { // ensure context is instantiated @@ -176,46 +175,46 @@ namespace Spring.Context.Support #region IHttpHandler configuration - /// - /// Configures the current IHttpHandler as specified by . If the - /// is not executed for the current request and an instance of - /// is served revalidate if the instance should be configured. - /// + /// + /// Configures the current IHttpHandler as specified by . If the + /// is not executed for the current request and an instance of + /// is served revalidate if the instance should be configured. + /// private void OnConfigureHandler(object sender, EventArgs e) { - HttpApplication app = (HttpApplication)sender; + HttpApplication app = (HttpApplication)sender; HandlerConfigurationMetaData hCfg = (HandlerConfigurationMetaData)LogicalThreadContext.GetData(CURRENTHANDLER_OBJECTDEFINITION); if (hCfg != null) { // app.Context.Handler = // TODO: check, if this makes sense (EE) ConfigureHandlerNow(app.Context.Handler, hCfg.ApplicationContext, hCfg.ObjectDefinitionName, hCfg.IsContainerManaged); } - else - { - Page page = app.Context.Handler as Page; - if (!IsPageWithRouteHandler(page)) - { - return; - } - - // In case of Routing pages are not handled by the PageHandlerFactory therefore no HandlerConfigurationMetaData - // is set. - IConfigurableApplicationContext applicationContext = (IConfigurableApplicationContext)WebApplicationContext.Current; - string normalizedVirtualPath = WebUtils.GetNormalizedVirtualPath(page.AppRelativeVirtualPath); - - ControlInterceptor.EnsureControlIntercepted(applicationContext, page); - ConfigureHandlerNow(page, applicationContext, normalizedVirtualPath, true); - } - } - - /// - /// Determines whether the specified page is processed by a . - /// - /// the page. - /// whether the page has a page route assigned - private static bool IsPageWithRouteHandler(Page page) - { - return page != null && page.RouteData != null && page.RouteData.RouteHandler != null; + else + { + Page page = app.Context.Handler as Page; + if (!IsPageWithRouteHandler(page)) + { + return; + } + + // In case of Routing pages are not handled by the PageHandlerFactory therefore no HandlerConfigurationMetaData + // is set. + IConfigurableApplicationContext applicationContext = (IConfigurableApplicationContext)WebApplicationContext.Current; + string normalizedVirtualPath = WebUtils.GetNormalizedVirtualPath(page.AppRelativeVirtualPath); + + ControlInterceptor.EnsureControlIntercepted(applicationContext, page); + ConfigureHandlerNow(page, applicationContext, normalizedVirtualPath, true); + } + } + + /// + /// Determines whether the specified page is processed by a . + /// + /// the page. + /// whether the page has a page route assigned + private static bool IsPageWithRouteHandler(Page page) + { + return page != null && page.RouteData != null && page.RouteData.RouteHandler != null; } /// @@ -315,7 +314,7 @@ namespace Spring.Context.Support } else { - // this is an async session timeout - log as fatal since this is the thread's exit point! + // this is an async session timeout - log as fatal since this is the thread's exit point! s_log.Fatal(msg, ex); } } @@ -376,4 +375,4 @@ namespace Spring.Context.Support } #endregion Session Handling Stuff } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Core/IO/WebResource.cs b/src/Spring/Spring.Web/Core/IO/WebResource.cs index 3dfdf507..5ed584b0 100644 --- a/src/Spring/Spring.Web/Core/IO/WebResource.cs +++ b/src/Spring/Spring.Web/Core/IO/WebResource.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System.IO; - using Spring.Util; #endregion @@ -69,7 +67,7 @@ namespace Spring.Core.IO } /// - /// Resolves the handle + /// Resolves the handle /// for the supplied . /// /// @@ -167,7 +165,7 @@ namespace Spring.Core.IO /// The name of the resource to test. /// /// - /// if resource name is relative; + /// if resource name is relative; /// otherwise . /// protected override bool IsRelativeResource(string resourceName) @@ -193,4 +191,4 @@ namespace Spring.Core.IO return new ConfigurableResourceLoader(WebUtils.DEFAULT_RESOURCE_PROTOCOL); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/DataBinding/DataSourceItemFormatter.cs b/src/Spring/Spring.Web/DataBinding/DataSourceItemFormatter.cs index 56b6f310..a3291356 100644 --- a/src/Spring/Spring.Web/DataBinding/DataSourceItemFormatter.cs +++ b/src/Spring/Spring.Web/DataBinding/DataSourceItemFormatter.cs @@ -1,12 +1,10 @@ -using System; using System.Collections; -using System.Collections.Generic; using System.Web.UI; namespace Spring.DataBinding { /// - /// This formatter acts as an adapter to a datasource. It parses a given datasource into + /// This formatter acts as an adapter to a datasource. It parses a given datasource into /// a table to allow converting back and forth between objects and their keys during formatting. /// /// @@ -21,7 +19,7 @@ namespace Spring.DataBinding [ThreadStatic] private Hashtable _dataItemsByKey; - [ThreadStatic] + [ThreadStatic] private string _dataItemKeyField; /// @@ -75,7 +73,7 @@ namespace Spring.DataBinding { _dataItemKeyField = dataItemKeyField; - // if we are binding from target to source only, we can save some performance + // if we are binding from target to source only, we can save some performance // here because only Format() will be called. if (direction != (direction&BindingDirection.TargetToSource)) { @@ -119,4 +117,4 @@ namespace Spring.DataBinding return item; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/DataBinding/HttpRequestBindingContainer.cs b/src/Spring/Spring.Web/DataBinding/HttpRequestBindingContainer.cs index 7d173176..92045b26 100644 --- a/src/Spring/Spring.Web/DataBinding/HttpRequestBindingContainer.cs +++ b/src/Spring/Spring.Web/DataBinding/HttpRequestBindingContainer.cs @@ -1,6 +1,4 @@ -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.Reflection; @@ -15,7 +13,7 @@ namespace Spring.DataBinding /// Binds agroup of HTTP request multi-valued items to the data model. /// /// - /// Due to the fact, that browsers don't send the values of unchecked checkboxes, you + /// Due to the fact, that browsers don't send the values of unchecked checkboxes, you /// can't use for binding to checkboxes. /// /// Aleksandar Seovic @@ -24,7 +22,7 @@ namespace Spring.DataBinding private string[] requestParams; private ConstructorInfo itemCtor; private IExpression targetExpression; - + /// /// Creates a new instance of . /// @@ -114,7 +112,7 @@ namespace Spring.DataBinding { vars[paramName] = parameters.GetValues(paramName)[i]; } - + object targetItem; bool addToList; if (i < targetList.Count) @@ -127,12 +125,12 @@ namespace Spring.DataBinding targetItem = itemCtor.Invoke(ObjectUtils.EmptyObjects); addToList = true; } - + foreach (IBinding binding in Bindings) { binding.BindSourceToTarget(null, targetItem, validationErrors, vars); } - + if (addToList) { targetList.Add(targetItem); @@ -161,4 +159,4 @@ namespace Spring.DataBinding // can't bind to a read-only Request object... } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/DataBinding/IBindingAwareFormatter.cs b/src/Spring/Spring.Web/DataBinding/IBindingAwareFormatter.cs index b4dfb47b..5c27f3a8 100644 --- a/src/Spring/Spring.Web/DataBinding/IBindingAwareFormatter.cs +++ b/src/Spring/Spring.Web/DataBinding/IBindingAwareFormatter.cs @@ -1,10 +1,9 @@ -using System.Collections.Generic; using Spring.Globalization; namespace Spring.DataBinding { /// - /// + /// /// public interface IBindingAwareFormatter : IFormatter { @@ -21,4 +20,4 @@ namespace Spring.DataBinding /// void ClearBindingContext(); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/DataBinding/IWebDataBound.cs b/src/Spring/Spring.Web/DataBinding/IWebDataBound.cs index bc09c068..66f76fc5 100644 --- a/src/Spring/Spring.Web/DataBinding/IWebDataBound.cs +++ b/src/Spring/Spring.Web/DataBinding/IWebDataBound.cs @@ -1,4 +1,3 @@ -using System; using Spring.Context; using Spring.Globalization; @@ -19,7 +18,7 @@ namespace Spring.DataBinding /// string UniqueID { get; } /// - /// Return the where + /// Return the where /// instances should be optained from. /// IApplicationContext ApplicationContext { get; } diff --git a/src/Spring/Spring.Web/DataBinding/MultipleSelectionListControlBinding.cs b/src/Spring/Spring.Web/DataBinding/MultipleSelectionListControlBinding.cs index e04e9b36..788ec6d0 100644 --- a/src/Spring/Spring.Web/DataBinding/MultipleSelectionListControlBinding.cs +++ b/src/Spring/Spring.Web/DataBinding/MultipleSelectionListControlBinding.cs @@ -1,6 +1,4 @@ -using System; using System.Collections; -using System.Collections.Generic; using System.Web.UI.WebControls; using Spring.Globalization; @@ -161,4 +159,4 @@ namespace Spring.DataBinding throw new InvalidOperationException(string.Format("Setting target value in '{0}' is not allowed.", this.GetType().FullName)); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Globalization/AspNetResourceCache.cs b/src/Spring/Spring.Web/Globalization/AspNetResourceCache.cs index 0c133001..677146ee 100644 --- a/src/Spring/Spring.Web/Globalization/AspNetResourceCache.cs +++ b/src/Spring/Spring.Web/Globalization/AspNetResourceCache.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using System.Web; using System.Web.Caching; @@ -50,4 +49,4 @@ namespace Spring.Globalization HttpRuntime.Cache[cacheKey] = resources; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Globalization/Resolvers/CookieCultureResolver.cs b/src/Spring/Spring.Web/Globalization/Resolvers/CookieCultureResolver.cs index d68f10bc..9d743def 100644 --- a/src/Spring/Spring.Web/Globalization/Resolvers/CookieCultureResolver.cs +++ b/src/Spring/Spring.Web/Globalization/Resolvers/CookieCultureResolver.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Globalization; using System.Web; @@ -36,7 +35,7 @@ namespace Spring.Globalization.Resolvers /// Resolves the culture from the request. /// /// - /// If the culture cookie doesn't exist, this method will return + /// If the culture cookie doesn't exist, this method will return /// the value of the 'Accept-Language' request header, or if no /// headers are specified, the culture of the current server thread. /// @@ -81,4 +80,4 @@ namespace Spring.Globalization.Resolvers return cookie; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Globalization/Resolvers/DefaultWebCultureResolver.cs b/src/Spring/Spring.Web/Globalization/Resolvers/DefaultWebCultureResolver.cs index 5144384c..b3b6730d 100644 --- a/src/Spring/Spring.Web/Globalization/Resolvers/DefaultWebCultureResolver.cs +++ b/src/Spring/Spring.Web/Globalization/Resolvers/DefaultWebCultureResolver.cs @@ -18,9 +18,7 @@ #endregion -using System; using System.Globalization; -using System.Threading; using System.Web; using Spring.Util; @@ -33,7 +31,7 @@ namespace Spring.Globalization.Resolvers public class DefaultWebCultureResolver : DefaultCultureResolver { /// - /// Returns default culture. If property is not set, + /// Returns default culture. If property is not set, /// it tries to get culture from the request headers /// and falls back to a current thread's culture if no headers are available. /// @@ -62,10 +60,10 @@ namespace Spring.Globalization.Resolvers { HttpContext context = HttpContext.Current; if (context != null && context.Request != null && ArrayUtils.HasLength(context.Request.UserLanguages)) - { + { return context.Request.UserLanguages[0]; } - return null; + return null; } /// @@ -97,4 +95,4 @@ namespace Spring.Globalization.Resolvers throw new NotSupportedException("Cannot change a default culture in a web application - use a different culture resolution strategy."); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Globalization/Resolvers/RequestCultureResolver.cs b/src/Spring/Spring.Web/Globalization/Resolvers/RequestCultureResolver.cs index 520b997a..d9cf32bb 100644 --- a/src/Spring/Spring.Web/Globalization/Resolvers/RequestCultureResolver.cs +++ b/src/Spring/Spring.Web/Globalization/Resolvers/RequestCultureResolver.cs @@ -18,21 +18,19 @@ #endregion -using System; using System.Globalization; -using System.Threading; using System.Web; namespace Spring.Globalization.Resolvers { /// /// Culture resolver that uses request headers to determine culture. If no languages - /// are specified in the request headers, it returns default culture specifed, and - /// if no default culture was specifed it returns current culture for the executing + /// are specified in the request headers, it returns default culture specifed, and + /// if no default culture was specifed it returns current culture for the executing /// server thread. /// /// - /// Note: This culture resolver cannot be used to change the culture + /// Note: This culture resolver cannot be used to change the culture /// because request headers cannot be modified. In order to change the culture /// when using this culture resolver user has to change language settings in /// the web browser. @@ -42,8 +40,8 @@ namespace Spring.Globalization.Resolvers { /// /// Tries to determine culture from the request headers. If no languages - /// are specified in the request headers, it returns default culture specifed, and - /// if no default culture was specifed it returns current culture for the executing + /// are specified in the request headers, it returns default culture specifed, and + /// if no default culture was specifed it returns current culture for the executing /// server thread. /// /// Culture that should be used to render view. @@ -74,4 +72,4 @@ namespace Spring.Globalization.Resolvers throw new NotSupportedException("Cannot change HTTP request headers - use a different culture resolution strategy."); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Objects/Factory/Support/ChildWebObjectDefinition.cs b/src/Spring/Spring.Web/Objects/Factory/Support/ChildWebObjectDefinition.cs index ede1e613..c727fcce 100644 --- a/src/Spring/Spring.Web/Objects/Factory/Support/ChildWebObjectDefinition.cs +++ b/src/Spring/Spring.Web/Objects/Factory/Support/ChildWebObjectDefinition.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Globalization; using Spring.Objects.Factory.Config; @@ -58,7 +57,7 @@ namespace Spring.Objects.Factory.Support /// The to be applied to /// a new instance of the object. /// - public ChildWebObjectDefinition(string parentName, Type type, ConstructorArgumentValues arguments, MutablePropertyValues properties) + public ChildWebObjectDefinition(string parentName, Type type, ConstructorArgumentValues arguments, MutablePropertyValues properties) : base(parentName, type, arguments, properties) {} @@ -77,7 +76,7 @@ namespace Spring.Objects.Factory.Support /// The to be applied to /// a new instance of the object. /// - public ChildWebObjectDefinition(string parentName, string typeName, ConstructorArgumentValues arguments, MutablePropertyValues properties) + public ChildWebObjectDefinition(string parentName, string typeName, ConstructorArgumentValues arguments, MutablePropertyValues properties) : base(parentName, typeName, arguments, properties) {} @@ -182,4 +181,4 @@ namespace Spring.Objects.Factory.Support } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Objects/Factory/Support/RootWebObjectDefinition.cs b/src/Spring/Spring.Web/Objects/Factory/Support/RootWebObjectDefinition.cs index 5408d6a4..375d24a1 100644 --- a/src/Spring/Spring.Web/Objects/Factory/Support/RootWebObjectDefinition.cs +++ b/src/Spring/Spring.Web/Objects/Factory/Support/RootWebObjectDefinition.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.Globalization; using Spring.Objects.Factory.Config; @@ -223,4 +222,4 @@ namespace Spring.Objects.Factory.Support ResourceDescription); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Objects/Factory/Support/WebInstantiationStrategy.cs b/src/Spring/Spring.Web/Objects/Factory/Support/WebInstantiationStrategy.cs index b237b315..0d5e32c7 100644 --- a/src/Spring/Spring.Web/Objects/Factory/Support/WebInstantiationStrategy.cs +++ b/src/Spring/Spring.Web/Objects/Factory/Support/WebInstantiationStrategy.cs @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Objects.Factory.Support @@ -81,4 +79,4 @@ namespace Spring.Objects.Factory.Support } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectDefinitionFactory.cs b/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectDefinitionFactory.cs index b54514a9..8d49728f 100644 --- a/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectDefinitionFactory.cs +++ b/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectDefinitionFactory.cs @@ -20,8 +20,6 @@ #region Imports -using System; - using Spring.Core.TypeResolution; using Spring.Objects.Factory.Config; using Spring.Util; @@ -109,4 +107,4 @@ namespace Spring.Objects.Factory.Support } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectFactory.cs b/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectFactory.cs index b8013203..5d8103dc 100644 --- a/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectFactory.cs +++ b/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectFactory.cs @@ -20,12 +20,10 @@ #region Imports -using System; using System.Collections; using System.Web; using System.Web.Caching; using System.Web.SessionState; -using Common.Logging; using Spring.Collections; using Spring.Context.Attributes; using Spring.Context.Support; @@ -38,7 +36,7 @@ namespace Spring.Objects.Factory.Support { /// /// Concrete implementation of - /// that knows + /// that knows /// how to handle s. /// /// @@ -204,7 +202,7 @@ namespace Spring.Objects.Factory.Support } /// - /// Tries to find cached object for the specified name. + /// Tries to find cached object for the specified name. /// /// /// This implementation tries to find object first in the Request scope, @@ -297,7 +295,7 @@ namespace Spring.Objects.Factory.Support } /// - /// Creates a singleton instance for the specified object name and definition + /// Creates a singleton instance for the specified object name and definition /// and caches the instance in the specified dictionary /// /// @@ -312,7 +310,7 @@ namespace Spring.Objects.Factory.Support /// the dictionary to be used for caching singleton instances /// The created object instance. /// - /// If the object is successfully created, + /// If the object is successfully created, /// contains the cached instance with the key . /// protected virtual object CreateAndCacheScopedSingletonInstance(string objectName, RootObjectDefinition objectDefinition, object[] arguments, IDictionary scopedSingletonCache) @@ -347,8 +345,8 @@ namespace Spring.Objects.Factory.Support } /// - /// We need this override so that Web Scoped Singletons are not registered in general - /// DisposalObjectRegister + /// We need this override so that Web Scoped Singletons are not registered in general + /// DisposalObjectRegister /// /// /// @@ -383,11 +381,11 @@ namespace Spring.Objects.Factory.Support } else if (scope == ObjectScope.Session) { - this.Session[objectName] = rawSingletonInstance; + this.Session[objectName] = rawSingletonInstance; } else { - throw new ObjectDefinitionException("Web singleton objects must be either request, session or application scoped."); + throw new ObjectDefinitionException("Web singleton objects must be either request, session or application scoped."); } } else @@ -397,7 +395,7 @@ namespace Spring.Objects.Factory.Support } /// - /// Remove the specified singleton from the singleton cache that has + /// Remove the specified singleton from the singleton cache that has /// been added before by a call to /// /// the name of the object to remove from the cache. @@ -420,7 +418,7 @@ namespace Spring.Objects.Factory.Support } else { - throw new ObjectDefinitionException("Web singleton objects must be either 'request' or 'session' scoped."); + throw new ObjectDefinitionException("Web singleton objects must be either 'request' or 'session' scoped."); } } else @@ -431,7 +429,7 @@ namespace Spring.Objects.Factory.Support private bool IsWebScopedSingleton(IObjectDefinition objectDefinition) { - if (objectDefinition.IsSingleton && + if (objectDefinition.IsSingleton && (objectDefinition is IWebObjectDefinition || objectDefinition is ScannedGenericObjectDefinition)) { ObjectScope scope = GetObjectScope(objectDefinition); @@ -449,7 +447,7 @@ namespace Spring.Objects.Factory.Support ObjectScope scope = (ObjectScope) Enum.Parse(typeof (ObjectScope), objectDefinition.Scope, true); - return scope; + return scope; } /// @@ -552,4 +550,4 @@ namespace Spring.Objects.Factory.Support return new Hashtable(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectUtils.cs b/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectUtils.cs index 1a932b3a..ea99862c 100644 --- a/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectUtils.cs +++ b/src/Spring/Spring.Web/Objects/Factory/Support/WebObjectUtils.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.IO; using Common.Logging; using Spring.Util; using IHttpHandler = System.Web.IHttpHandler; @@ -112,7 +110,7 @@ namespace Spring.Objects.Factory.Support /// internal static IHttpHandler CreateHandler( string pageUrl ) { - return VirtualEnvironment.CreateInstanceFromVirtualPath(pageUrl, typeof(IHttpHandler)) as IHttpHandler; + return VirtualEnvironment.CreateInstanceFromVirtualPath(pageUrl, typeof(IHttpHandler)) as IHttpHandler; } /// @@ -123,7 +121,7 @@ namespace Spring.Objects.Factory.Support ///

/// As indicated by the exception that can be thrown by this method, /// the ASPX page referred to by the supplied - /// does have to be instantiated in order to determine its + /// does have to be instantiated in order to determine its /// see cref="System.Type"/> ///

/// @@ -169,7 +167,7 @@ namespace Spring.Objects.Factory.Support } /// - /// Calls the underlying ASP.NET infrastructure to obtain the compiled page type + /// Calls the underlying ASP.NET infrastructure to obtain the compiled page type /// relative to the current . /// /// @@ -247,4 +245,4 @@ namespace Spring.Objects.Factory.Support return controlType; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Objects/Factory/Xml/WebObjectDefinitionParserHelper.cs b/src/Spring/Spring.Web/Objects/Factory/Xml/WebObjectDefinitionParserHelper.cs index dafe7f18..dc557d5c 100644 --- a/src/Spring/Spring.Web/Objects/Factory/Xml/WebObjectDefinitionParserHelper.cs +++ b/src/Spring/Spring.Web/Objects/Factory/Xml/WebObjectDefinitionParserHelper.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Xml; using Spring.Objects.Factory.Config; using Spring.Objects.Factory.Support; @@ -87,13 +85,13 @@ namespace Spring.Objects.Factory.Xml protected override ObjectDefinitionHolder CreateObjectDefinitionHolder( XmlElement element, - IConfigurableObjectDefinition definition, - string objectName, + IConfigurableObjectDefinition definition, + string objectName, IReadOnlyList aliasesArray) { if (definition is IWebObjectDefinition webDefinition) { - if (definition.IsSingleton + if (definition.IsSingleton && element.HasAttribute(ObjectDefinitionConstants.ScopeAttribute)) { webDefinition.Scope = GetScope(element.GetAttribute(ObjectDefinitionConstants.ScopeAttribute)); @@ -108,7 +106,7 @@ namespace Spring.Objects.Factory.Xml // string typeName = element.GetAttribute(ObjectDefinitionConstants.TypeAttribute); string typeName = definition.ObjectTypeName; - if (typeName != null + if (typeName != null && (typeName.EndsWith(".ascx") || typeName.EndsWith(".master"))) { definition.IsAbstract = true; @@ -125,7 +123,7 @@ namespace Spring.Objects.Factory.Xml /// ///

/// If the supplied is invalid - /// (i.e. it does not resolve to one of the + /// (i.e. it does not resolve to one of the /// values), /// then the return value of this method call will be /// ; @@ -161,4 +159,4 @@ namespace Spring.Objects.Factory.Xml return scope; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Spring.Web.csproj b/src/Spring/Spring.Web/Spring.Web.csproj index 80f02dba..0cd54bcb 100644 --- a/src/Spring/Spring.Web/Spring.Web.csproj +++ b/src/Spring/Spring.Web/Spring.Web.csproj @@ -1,11 +1,14 @@  + $(TargetFullFrameworkVersion) Interfaces and classes that provide web application support in Spring.Net + + @@ -14,4 +17,9 @@ + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.Web/Util/HttpContextSwitch.cs b/src/Spring/Spring.Web/Util/HttpContextSwitch.cs index 5ee469d8..b0bab4c2 100644 --- a/src/Spring/Spring.Web/Util/HttpContextSwitch.cs +++ b/src/Spring/Spring.Web/Util/HttpContextSwitch.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Web; using Common.Logging; @@ -68,4 +67,4 @@ namespace Spring.Util rewriteContext.Dispose(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Util/IVirtualEnvironment.cs b/src/Spring/Spring.Web/Util/IVirtualEnvironment.cs index 5ac0924d..c7807be4 100644 --- a/src/Spring/Spring.Web/Util/IVirtualEnvironment.cs +++ b/src/Spring/Spring.Web/Util/IVirtualEnvironment.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.Collections.Specialized; using System.Web; @@ -53,8 +52,8 @@ namespace Spring.Util /// The virtual (rooted) path of the currently executing script ///

/// - /// Normally this property is the same as . - /// In case of , this property returns the current script + /// Normally this property is the same as . + /// In case of , this property returns the current script /// whereas CurrentVirtualPath returns the original script path. /// string CurrentExecutionFilePath { get; } @@ -95,4 +94,4 @@ namespace Spring.Util /// the required base type object CreateInstanceFromVirtualPath(string absoluteVirtualPath, Type requiredBaseType); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Util/VirtualEnvironment.cs b/src/Spring/Spring.Web/Util/VirtualEnvironment.cs index f6a3d74c..0bd2acbf 100644 --- a/src/Spring/Spring.Web/Util/VirtualEnvironment.cs +++ b/src/Spring/Spring.Web/Util/VirtualEnvironment.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,10 +20,8 @@ #region Imports -using System; using System.Collections; using System.Collections.Specialized; -using System.IO; using System.Web; using System.Web.Caching; using System.Web.Compilation; @@ -400,8 +398,8 @@ namespace Spring.Util ///
public static string CurrentVirtualPathAndQuery { - get - { + get + { string result = CurrentVirtualPath; if (QueryString.Count > 0) { @@ -566,7 +564,7 @@ namespace Spring.Util } /// - /// Signals, that VirtualEnvironment is ready to accept + /// Signals, that VirtualEnvironment is ready to accept /// handler registrations for EndRequest and EndSession events /// public static void SetInitialized() @@ -599,4 +597,4 @@ namespace Spring.Util } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Util/WebUtils.cs b/src/Spring/Spring.Web/Util/WebUtils.cs index 4c705862..ad00e23f 100644 --- a/src/Spring/Spring.Web/Util/WebUtils.cs +++ b/src/Spring/Spring.Web/Util/WebUtils.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Web; using System.Web.UI; @@ -226,33 +225,33 @@ namespace Spring.Util } /// - /// Gets a normalized application-relative virtual path of the given virtual path. - /// - /// - ///

- /// Examples of what would be returned from this method given a virtual path would be: - ///

- ///

- /// - /// 'Login.aspx' => 'Login.aspx' - /// '~/Login.aspx' => '/Login.aspx' - /// '~/B2B/SignUp.aspx' => '/B2B/SignUp.aspx' - /// 'B2B/Foo/FooServices.aspx' => 'B2B/Foo/FooServices.aspx' - /// - ///

- ///
- /// the virtual path. - /// the normalized virtual path - public static string GetNormalizedVirtualPath(string virtualPath) - { - if(String.IsNullOrEmpty(virtualPath)) - { - return virtualPath; - } - return virtualPath.StartsWith("~/") ? virtualPath.Substring(1) : virtualPath; - } - - /// + /// Gets a normalized application-relative virtual path of the given virtual path. + /// + /// + ///

+ /// Examples of what would be returned from this method given a virtual path would be: + ///

+ ///

+ /// + /// 'Login.aspx' => 'Login.aspx' + /// '~/Login.aspx' => '/Login.aspx' + /// '~/B2B/SignUp.aspx' => '/B2B/SignUp.aspx' + /// 'B2B/Foo/FooServices.aspx' => 'B2B/Foo/FooServices.aspx' + /// + ///

+ ///
+ /// the virtual path. + /// the normalized virtual path + public static string GetNormalizedVirtualPath(string virtualPath) + { + if(String.IsNullOrEmpty(virtualPath)) + { + return virtualPath; + } + return virtualPath.StartsWith("~/") ? virtualPath.Substring(1) : virtualPath; + } + + /// /// Gets the virtual path portion of the given absolute URL /// relative to the given base path. /// @@ -328,4 +327,4 @@ namespace Spring.Util return (ctx == null) ? HttpUtility.UrlEncode( value ) : ctx.Server.UrlEncode( value ); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Providers/IProfileProvider.cs b/src/Spring/Spring.Web/Web/Providers/IProfileProvider.cs index d605f0c9..f417e382 100644 --- a/src/Spring/Spring.Web/Web/Providers/IProfileProvider.cs +++ b/src/Spring/Spring.Web/Web/Providers/IProfileProvider.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections.Specialized; using System.Configuration; using System.Web.Profile; @@ -30,9 +29,9 @@ namespace Spring.Web.Providers ///
/// ///

- /// Configuration for this provider requires providerId element set in web.config file, - /// as the Id of wrapped provider (defined in the Spring context). - ///

+ /// Configuration for this provider requires providerId element set in web.config file, + /// as the Id of wrapped provider (defined in the Spring context). + ///

///
/// Damjan Tomic public interface IProfileProvider @@ -41,14 +40,14 @@ namespace Spring.Web.Providers ///Initializes the provider. /// /// - ///A collection of the name/value pairs representing the provider-specific + ///A collection of the name/value pairs representing the provider-specific /// attributes specified in the configuration for this provider. /// The providerId attribute is mandatory. /// ///The friendly name of the provider. ///The or is null. ///An attempt is made to call on a provider after the provider has already been initialized. - ///The has a length of zero or providerId attribute is not set. + ///The has a length of zero or providerId attribute is not set. void Initialize(string name, NameValueCollection config); /// diff --git a/src/Spring/Spring.Web/Web/Providers/MembershipProviderAdapter.cs b/src/Spring/Spring.Web/Web/Providers/MembershipProviderAdapter.cs index f5f63213..82395dd8 100644 --- a/src/Spring/Spring.Web/Web/Providers/MembershipProviderAdapter.cs +++ b/src/Spring/Spring.Web/Web/Providers/MembershipProviderAdapter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections.Specialized; using System.Security.Permissions; using System.Web; diff --git a/src/Spring/Spring.Web/Web/Providers/ProfileProviderAdapter.cs b/src/Spring/Spring.Web/Web/Providers/ProfileProviderAdapter.cs index edd10682..5cddec89 100644 --- a/src/Spring/Spring.Web/Web/Providers/ProfileProviderAdapter.cs +++ b/src/Spring/Spring.Web/Web/Providers/ProfileProviderAdapter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections.Specialized; using System.Configuration; using System.Security.Permissions; @@ -33,9 +32,9 @@ namespace Spring.Web.Providers /// /// ///

- /// Configuration for this provider requires providerId element set in web.config file, - /// as the Id of wrapped provider (defined in the Spring context). - ///

+ /// Configuration for this provider requires providerId element set in web.config file, + /// as the Id of wrapped provider (defined in the Spring context). + ///

///
/// Damjan Tomic [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] @@ -57,14 +56,14 @@ namespace Spring.Web.Providers ///Initializes the provider. /// /// - ///A collection of the name/value pairs representing the provider-specific + ///A collection of the name/value pairs representing the provider-specific /// attributes specified in the configuration for this provider. /// The providerId attribute may be used to override the name being used for looking up an object definition. /// ///The friendly name of the provider. ///The or is null. ///An attempt is made to call on a provider after the provider has already been initialized. - ///The has a length of zero or providerId attribute is not set. + ///The has a length of zero or providerId attribute is not set. public override void Initialize(string name, NameValueCollection config) { lock (this) @@ -291,10 +290,10 @@ namespace Spring.Web.Providers int pageIndex, int pageSize, out int totalRecords) { return this.wrappedProvider.FindInactiveProfilesByUserName(authenticationOption, usernameToMatch, userInactiveSinceDate, - pageIndex, pageSize, out totalRecords); + pageIndex, pageSize, out totalRecords); } - - + + #endregion } diff --git a/src/Spring/Spring.Web/Web/Providers/RoleProviderAdapter.cs b/src/Spring/Spring.Web/Web/Providers/RoleProviderAdapter.cs index 90506c18..02b602aa 100644 --- a/src/Spring/Spring.Web/Web/Providers/RoleProviderAdapter.cs +++ b/src/Spring/Spring.Web/Web/Providers/RoleProviderAdapter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections.Specialized; using System.Security.Permissions; using System.Web; @@ -37,9 +36,9 @@ namespace Spring.Web.Providers /// /// ///

- /// Configuration for this provider requires providerId element set in web.config file, - /// as the Id of wrapped provider (defined in the Spring context). - ///

+ /// Configuration for this provider requires providerId element set in web.config file, + /// as the Id of wrapped provider (defined in the Spring context). + ///

///
/// Damjan Tomic [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] @@ -61,22 +60,22 @@ namespace Spring.Web.Providers ///Initializes the provider. /// /// - ///A collection of the name/value pairs representing the provider-specific + ///A collection of the name/value pairs representing the provider-specific /// attributes specified in the configuration for this provider. /// The providerId attribute may be used to override the name being used for looking up an object definition. /// ///The friendly name of the provider. ///The or is null. ///An attempt is made to call on a provider after the provider has already been initialized. - ///The has a length of zero or providerId attribute is not set. + ///The has a length of zero or providerId attribute is not set. public override void Initialize(string name, NameValueCollection config) { lock (this) { - if (config == null) throw new ArgumentNullException("config"); - - string providerId = config["providerId"]; - if (String.IsNullOrEmpty(providerId)) + if (config == null) throw new ArgumentNullException("config"); + + string providerId = config["providerId"]; + if (String.IsNullOrEmpty(providerId)) providerId = name; config.Remove("providerId"); @@ -84,7 +83,7 @@ namespace Spring.Web.Providers this.wrappedProvider.Initialize(name,config); } } - + /// ///Gets the friendly name used to refer to the provider during configuration. /// @@ -96,7 +95,7 @@ namespace Spring.Web.Providers { get { return this.wrappedProvider.Name; } } - + /// ///Gets a brief, friendly description suitable for display in administrative tools or other user interfaces (UIs). /// @@ -112,7 +111,7 @@ namespace Spring.Web.Providers #endregion #region System.Web.Security.RoleProvider members - + /// ///Gets a value indicating whether the specified user is in the specified role for the configured applicationName. diff --git a/src/Spring/Spring.Web/Web/Providers/SiteMapProviderAdapter.cs b/src/Spring/Spring.Web/Web/Providers/SiteMapProviderAdapter.cs index c64d0429..6e5fc4c7 100644 --- a/src/Spring/Spring.Web/Web/Providers/SiteMapProviderAdapter.cs +++ b/src/Spring/Spring.Web/Web/Providers/SiteMapProviderAdapter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections.Specialized; using System.Security.Permissions; using System.Web; @@ -35,9 +34,9 @@ namespace Spring.Web.Providers /// /// ///

- /// Configuration for this provider requires providerId element set in web.config file, - /// as the Id of wrapped provider (defined in the Spring context). - ///

+ /// Configuration for this provider requires providerId element set in web.config file, + /// as the Id of wrapped provider (defined in the Spring context). + ///

///
/// Damjan Tomic [AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] @@ -59,7 +58,7 @@ namespace Spring.Web.Providers ///Initializes the provider. /// /// - ///A collection of the name/value pairs representing the provider-specific + ///A collection of the name/value pairs representing the provider-specific /// attributes specified in the configuration for this provider. /// The providerId attribute may be used to override the name being used for looking up an object definition. /// @@ -69,10 +68,10 @@ namespace Spring.Web.Providers ///The has a length of zero or providerId attribute is not set. public override void Initialize(string name, NameValueCollection config) { - if (config == null) throw new ArgumentNullException("config"); - - string providerId = config["providerId"]; - if (String.IsNullOrEmpty(providerId)) + if (config == null) throw new ArgumentNullException("config"); + + string providerId = config["providerId"]; + if (String.IsNullOrEmpty(providerId)) providerId = name; config.Remove("providerId"); @@ -100,7 +99,7 @@ namespace Spring.Web.Providers /// ///A brief, friendly description suitable for display in administrative tools or other UIs. /// - /// + /// public override string Description { get { return this.wrappedProvider.Description; } @@ -115,7 +114,7 @@ namespace Spring.Web.Providers /// /// /// - ///A that represents the currently requested page; otherwise, null, if no corresponding can be found in the or if the page context is null. + ///A that represents the currently requested page; otherwise, null, if no corresponding can be found in the or if the page context is null. /// /// ///The used to match node information with the URL of the requested page. @@ -252,7 +251,7 @@ namespace Spring.Web.Providers /// /// /// - ///A that represents the root node of the set of nodes that the current provider manages. + ///A that represents the root node of the set of nodes that the current provider manages. /// /// protected override SiteMapNode GetRootNodeCore() @@ -261,7 +260,7 @@ namespace Spring.Web.Providers } /// - ///Provides a method that site map providers can override to perform an optimized retrieval of one or more levels of parent and ancestor nodes, relative to the specified object. + ///Provides a method that site map providers can override to perform an optimized retrieval of one or more levels of parent and ancestor nodes, relative to the specified object. /// /// ///The number of ancestor generations to fetch. 0 indicates no ancestor nodes are retrieved and -1 indicates that all ancestors might be retrieved and cached. @@ -270,11 +269,11 @@ namespace Spring.Web.Providers ///node is null. public override void HintAncestorNodes(SiteMapNode node, int upLevel) { - this.wrappedProvider.HintAncestorNodes(node, upLevel); + this.wrappedProvider.HintAncestorNodes(node, upLevel); } /// - ///Provides a method that site map providers can override to perform an optimized retrieval of nodes found in the proximity of the specified node. + ///Provides a method that site map providers can override to perform an optimized retrieval of nodes found in the proximity of the specified node. /// /// ///The number of ancestor generations to fetch. 0 indicates no ancestor nodes are retrieved and -1 indicates that all ancestors (and their descendant nodes to the level of node) might be retrieved and cached. @@ -355,7 +354,7 @@ namespace Spring.Web.Providers public override SiteMapNode RootNode { get { return this.wrappedProvider.RootNode; } - } + } #endregion diff --git a/src/Spring/Spring.Web/Web/Services/WebServiceExporter.cs b/src/Spring/Spring.Web/Web/Services/WebServiceExporter.cs index 87f22f1c..1812584a 100644 --- a/src/Spring/Spring.Web/Web/Services/WebServiceExporter.cs +++ b/src/Spring/Spring.Web/Web/Services/WebServiceExporter.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.Reflection; using System.Reflection.Emit; @@ -99,12 +98,12 @@ namespace Spring.Web.Services /// The name of the object in the factory. /// private string objectName; - + /// /// The owning factory. /// private IObjectFactory objectFactory; - + /// /// The generated web service wrapper type. /// @@ -167,7 +166,7 @@ namespace Spring.Web.Services #region Properties /// - /// Gets or Sets the Web Services Interoperability (WSI) specification + /// Gets or Sets the Web Services Interoperability (WSI) specification /// to which the Web Service claims to conform. /// /// @@ -228,7 +227,7 @@ namespace Spring.Web.Services /// public string Name { - get + get { if (_name == null) { @@ -255,7 +254,7 @@ namespace Spring.Web.Services /// Gets or sets the list of interfaces whose methods should be exposed as web services. /// /// - /// If not set, all the interfaces implemented or inherited + /// If not set, all the interfaces implemented or inherited /// by the target type will be used. /// /// The interfaces. @@ -266,7 +265,7 @@ namespace Spring.Web.Services } /// - /// Gets or sets a list of custom attributes + /// Gets or sets a list of custom attributes /// that should be applied to a proxy class. /// public IList TypeAttributes @@ -276,12 +275,12 @@ namespace Spring.Web.Services } /// - /// Gets or sets a dictionary of custom attributes + /// Gets or sets a dictionary of custom attributes /// that should be applied to web service members. /// /// - /// Dictionary key is an expression that members can be matched against. - /// Value is a list of attributes that should be applied + /// Dictionary key is an expression that members can be matched against. + /// Value is a list of attributes that should be applied /// to each member that matches expression. /// public IDictionary MemberAttributes @@ -357,7 +356,7 @@ namespace Spring.Web.Services public virtual void AfterPropertiesSet() { ValidateConfiguration(); - GenerateProxy(); + GenerateProxy(); } #endregion @@ -457,7 +456,7 @@ namespace Spring.Web.Services private static CustomAttributeBuilder CreateWebServiceAttribute(string description, string name, string ns) { - ReflectionUtils.CustomAttributeBuilderBuilder cabb = + ReflectionUtils.CustomAttributeBuilderBuilder cabb = new ReflectionUtils.CustomAttributeBuilderBuilder(typeof(WebServiceAttribute)); if (StringUtils.HasText(description)) { @@ -482,7 +481,7 @@ namespace Spring.Web.Services /// Implements constructors for the proxy class. /// /// - /// This implementation generates an empty noop default constructor + /// This implementation generates an empty noop default constructor /// /// /// The builder to use. @@ -520,7 +519,7 @@ namespace Spring.Web.Services // override existing WebServiceAttribute containsWebServiceAttribute = true; attrs[i] = webServiceAttribute; - } + } else if (IsAttributeMatchingType(attrs[i], typeof(WebServiceBindingAttribute))) { containsWebServiceBindingAttribute = true; @@ -575,4 +574,4 @@ namespace Spring.Web.Services #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Services/WebServiceHandlerFactory.cs b/src/Spring/Spring.Web/Web/Services/WebServiceHandlerFactory.cs index f94c221c..366e1ff9 100644 --- a/src/Spring/Spring.Web/Web/Services/WebServiceHandlerFactory.cs +++ b/src/Spring/Spring.Web/Web/Services/WebServiceHandlerFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Reflection; using System.Security.Permissions; using System.Web; @@ -75,7 +74,7 @@ namespace Spring.Web.Services IConfigurableApplicationContext appContext = WebApplicationContext.GetContext(url) as IConfigurableApplicationContext; - + if (appContext == null) { throw new InvalidOperationException( @@ -114,7 +113,7 @@ namespace Spring.Web.Services if (wsAttribute.Length == 0) { serviceType = null; - } + } #endif } @@ -122,16 +121,16 @@ namespace Spring.Web.Services { serviceType = WebServiceParser.GetCompiledType(url, context); } - + #if !MONO_2_0 return (IHttpHandler) CoreGetHandler.Invoke(this, new object[] {serviceType, context, context.Request, context.Response}); -#else +#else // find if the BuildManager already contains a cached value of the service type var buildCacheField = typeof(BuildManager).GetField("buildCache", BindingFlags.Static | BindingFlags.NonPublic); var buildCache = (IDictionary)buildCacheField.GetValue(null); - + if(!buildCache.Contains(appRelativeVirtualPath)) { // create new fake BuildManagerCacheItem wich represent the target type @@ -139,13 +138,13 @@ namespace Spring.Web.Services var cacheItemCtor = buildManagerCacheItemType.GetConstructor(new Type[]{typeof(Assembly), typeof(BuildProvider), typeof(CompilerResults)}); var buildProvider = new FakeBuildProvider(serviceType); var cacheItem = cacheItemCtor.Invoke(new object[]{serviceType.Assembly, buildProvider, null }); - + // store it in the BuildManager buildCache [appRelativeVirtualPath] = cacheItem; } - + // now that the target type is in the cache, let the default process continue - return base.GetHandler(context, requestType, url, path); + return base.GetHandler(context, requestType, url, path); #endif } } @@ -156,40 +155,40 @@ namespace Spring.Web.Services // Define an internal member for the compiler type. protected CompilerType _compilerType = null; private Type _type; - + public FakeBuildProvider(Type type) { _type = type; _compilerType = GetDefaultCompilerTypeForLanguage("C#"); } - - // Return the internal CompilerType member + + // Return the internal CompilerType member // defined in this implementation. public override CompilerType CodeCompilerType { get { return _compilerType; } } - + // Define the build provider implementation of the GenerateCode method. public override void GenerateCode(AssemblyBuilder assemBuilder) { - + } - + public override System.Type GetGeneratedType(CompilerResults results) { return _type; } - + public override string GetCustomString (System.CodeDom.Compiler.CompilerResults results) { return "No source code"; } - + public override BuildProviderResultFlags GetResultFlags (System.CodeDom.Compiler.CompilerResults results) { return BuildProviderResultFlags.Default; } } #endif -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Support/AbstractHandlerFactory.cs b/src/Spring/Spring.Web/Web/Support/AbstractHandlerFactory.cs index 2b756f3f..ec631628 100644 --- a/src/Spring/Spring.Web/Web/Support/AbstractHandlerFactory.cs +++ b/src/Spring/Spring.Web/Web/Support/AbstractHandlerFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,9 +20,7 @@ #region Imports -using System; using System.Collections; -using System.IO; using System.Security; using System.Security.Permissions; using System.Web; @@ -120,7 +118,7 @@ namespace Spring.Web.Support /// Get the global instance of System.Web.UI.SimpleHandlerFactory /// /// - /// This factory is a plaform version agnostic way to instantiate + /// This factory is a plaform version agnostic way to instantiate /// arbitrary handlers without the need for additional reflection. /// public static IHttpHandlerFactory SimpleHandlerFactory @@ -240,7 +238,7 @@ namespace Spring.Web.Support protected abstract IHttpHandler CreateHandlerInstance(IConfigurableApplicationContext appContext, HttpContext context, string requestType, string rawUrl, string physicalPath); /// - /// Get the application context instance corresponding to the given absolute url and checks + /// Get the application context instance corresponding to the given absolute url and checks /// it for contract and being not null. /// /// the absolute url @@ -274,7 +272,7 @@ namespace Spring.Web.Support /// the virtual path to get the context for. /// the context or null. /// - /// Subclasses may override this method to change the context source. + /// Subclasses may override this method to change the context source. /// By default, is used for obtaining context instances. /// protected virtual IApplicationContext GetContext(string virtualPath) @@ -289,7 +287,7 @@ namespace Spring.Web.Support /// /// /// This method requires registrars to follow the convention of registering web object definitions using their - /// application relative urls (~/mypath/mypage.aspx). + /// application relative urls (~/mypath/mypage.aspx). /// /// /// Resolve an object definition by url. @@ -364,4 +362,4 @@ namespace Spring.Web.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Support/ContextMonitor.cs b/src/Spring/Spring.Web/Web/Support/ContextMonitor.cs index ae912239..8ec04fac 100644 --- a/src/Spring/Spring.Web/Web/Support/ContextMonitor.cs +++ b/src/Spring/Spring.Web/Web/Support/ContextMonitor.cs @@ -18,9 +18,6 @@ #endregion -using System; -using System.Collections.Generic; -using System.IO; using System.Web; using Spring.Context; @@ -31,12 +28,12 @@ using Spring.Objects.Factory.Support; namespace Spring.Web.Support { /// - /// implementation that allows users to monitor state + /// implementation that allows users to monitor state /// of the Spring.NET web application context. /// /// ///

- /// + /// ///

///
/// Aleksandar Seovic @@ -135,4 +132,4 @@ namespace Spring.Web.Support tw.WriteLine(""); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Support/ControlAccessor.cs b/src/Spring/Spring.Web/Web/Support/ControlAccessor.cs index 5c23a197..6998f18c 100644 --- a/src/Spring/Spring.Web/Web/Support/ControlAccessor.cs +++ b/src/Spring/Spring.Web/Web/Support/ControlAccessor.cs @@ -1,6 +1,6 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #region Imports -using System; using System.Diagnostics; using System.Reflection; using System.Reflection.Emit; @@ -129,7 +128,7 @@ namespace Spring.Web.Support controls = InterceptControlCollectionStrategy.TryCreateCollection(_targetControl); if (controls == null) { - controls = BaseCreateControlCollection(_targetControl); + controls = BaseCreateControlCollection(_targetControl); } SetChildControlCollection(controls); } @@ -233,4 +232,4 @@ namespace Spring.Web.Support return handler; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Support/ControlCollectionAccessor.cs b/src/Spring/Spring.Web/Web/Support/ControlCollectionAccessor.cs index 41165aed..4377f103 100644 --- a/src/Spring/Spring.Web/Web/Support/ControlCollectionAccessor.cs +++ b/src/Spring/Spring.Web/Web/Support/ControlCollectionAccessor.cs @@ -1,6 +1,6 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #region Imports -using System; using System.Reflection; using System.Security; using System.Security.Permissions; @@ -90,4 +89,4 @@ namespace Spring.Web.Support set { _owner.SetValue(_controls, value); } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Support/DefaultHandlerFactory.cs b/src/Spring/Spring.Web/Web/Support/DefaultHandlerFactory.cs index 83bf28d7..eb92a80b 100644 --- a/src/Spring/Spring.Web/Web/Support/DefaultHandlerFactory.cs +++ b/src/Spring/Spring.Web/Web/Support/DefaultHandlerFactory.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Web; using Spring.Context; using Spring.Context.Support; @@ -35,7 +34,7 @@ namespace Spring.Web.Support /// SimpleHandlerFactory is used to wrap any arbitrary to make it "Spring-aware". /// /// - /// By default, an instance of is used as underlying factory. + /// By default, an instance of is used as underlying factory. /// /// Erich Eichinger #endif diff --git a/src/Spring/Spring.Web/Web/Support/DefaultResultWebNavigator.cs b/src/Spring/Spring.Web/Web/Support/DefaultResultWebNavigator.cs index 0084f9b9..a7c43bfa 100644 --- a/src/Spring/Spring.Web/Web/Support/DefaultResultWebNavigator.cs +++ b/src/Spring/Spring.Web/Web/Support/DefaultResultWebNavigator.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using Spring.Collections; using Spring.Core; @@ -64,7 +63,7 @@ namespace Spring.Web.Support } /// - /// Gets or sets map of result names to instances or their textual representations. + /// Gets or sets map of result names to instances or their textual representations. /// See for information on parsing textual representations. /// /// @@ -125,7 +124,7 @@ namespace Spring.Web.Support } /// - /// Determines, whether this navigator or one of its parents can + /// Determines, whether this navigator or one of its parents can /// navigate to the destination specified in . /// /// the name of the navigation destination @@ -168,9 +167,9 @@ namespace Spring.Web.Support } /// - /// Returns a redirect url string that points to the + /// Returns a redirect url string that points to the /// defined by this - /// result evaluated using this Page for expression + /// result evaluated using this Page for expression /// /// Name of the result. /// the instance that issued this request @@ -197,7 +196,7 @@ namespace Spring.Web.Support } /// - /// Obtain the named result instance from the dictionary. If necessary, the actual representation of the result + /// Obtain the named result instance from the dictionary. If necessary, the actual representation of the result /// will be converted to an instance by this method. /// /// @@ -249,4 +248,4 @@ namespace Spring.Web.Support throw new ArgumentOutOfRangeException( "destination", string.Format( "No mapping found for the specified destination '{0}'.", destination ) ); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Support/HandlerMap.cs b/src/Spring/Spring.Web/Web/Support/HandlerMap.cs index d34676be..87be742b 100644 --- a/src/Spring/Spring.Web/Web/Support/HandlerMap.cs +++ b/src/Spring/Spring.Web/Web/Support/HandlerMap.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.Text.RegularExpressions; using System.Web; @@ -31,7 +30,7 @@ using Common.Logging; namespace Spring.Web.Support { /// - /// Holds a list of url expressions and their corresponding names of responsible + /// Holds a list of url expressions and their corresponding names of responsible /// or objects managed by the container. /// /// Erich Eichinger @@ -235,4 +234,4 @@ namespace Spring.Web.Support #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Support/IWebNavigator.cs b/src/Spring/Spring.Web/Web/Support/IWebNavigator.cs index 35271e39..364f157d 100644 --- a/src/Spring/Spring.Web/Web/Support/IWebNavigator.cs +++ b/src/Spring/Spring.Web/Web/Support/IWebNavigator.cs @@ -22,8 +22,6 @@ #endregion -using System; - namespace Spring.Web.Support { /// @@ -37,7 +35,7 @@ namespace Spring.Web.Support public interface IWebNavigator { /// - /// Determines, whether this navigator or one of its parents can + /// Determines, whether this navigator or one of its parents can /// navigate to the destination specified in . /// /// the name of the navigation destination @@ -62,4 +60,4 @@ namespace Spring.Web.Support /// if this navigator cannot navigate to the specified (). string GetResultUri( string destination, object sender, object context ); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Support/InterceptControlCollectionStrategy.cs b/src/Spring/Spring.Web/Web/Support/InterceptControlCollectionStrategy.cs index c49e0e36..fc42f7c5 100644 --- a/src/Spring/Spring.Web/Web/Support/InterceptControlCollectionStrategy.cs +++ b/src/Spring/Spring.Web/Web/Support/InterceptControlCollectionStrategy.cs @@ -18,7 +18,6 @@ #region Imports -using System; using System.Collections; using System.Reflection; using System.Reflection.Emit; @@ -32,7 +31,7 @@ using Spring.Util; namespace Spring.Web.Support { /// - /// This strategy enhances a ControlCollection's type by + /// This strategy enhances a ControlCollection's type by /// dynamically implementing ISupportsWebDependencyInjection on this type /// /// Erich Eichinger @@ -58,7 +57,7 @@ namespace Spring.Web.Support private static readonly Hashtable s_interceptedCollectionTypeCache = new Hashtable(); /// - /// Intercepts the given by dynamically deriving + /// Intercepts the given by dynamically deriving /// the original type and let it implement . /// /// the ApplicationContext to be set on the collection instance. diff --git a/src/Spring/Spring.Web/Web/Support/LocalResourceManager.cs b/src/Spring/Spring.Web/Web/Support/LocalResourceManager.cs index 8351dd79..58a89a05 100644 --- a/src/Spring/Spring.Web/Web/Support/LocalResourceManager.cs +++ b/src/Spring/Spring.Web/Web/Support/LocalResourceManager.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Globalization; using System.Reflection; using System.Resources; @@ -37,7 +36,7 @@ using Spring.Util; namespace Spring.Web.Support { /// - /// This ResourceManager implementation swallows s and + /// This ResourceManager implementation swallows s and /// simply returns null from if no resource is found. /// /// Erich Eichinger @@ -164,7 +163,7 @@ namespace Spring.Web.Support ResourceSet resourceSet = null; if (culture == CultureInfo.InvariantCulture) { - resourceSet = new ResourceSet(_resourceProvider.ResourceReader); + resourceSet = new ResourceSet(_resourceProvider.ResourceReader); } return resourceSet; } diff --git a/src/Spring/Spring.Web/Web/Support/MimeMediaType.cs b/src/Spring/Spring.Web/Web/Support/MimeMediaType.cs index 6ea5cb7b..81a39a41 100644 --- a/src/Spring/Spring.Web/Web/Support/MimeMediaType.cs +++ b/src/Spring/Spring.Web/Web/Support/MimeMediaType.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,9 +20,6 @@ #region Imports -using System; -using System.Collections.Generic; - using Spring.Util; #endregion @@ -162,7 +159,7 @@ namespace Spring.Web.Support } /// - /// Creates a new media type instance representing a generic content type + /// Creates a new media type instance representing a generic content type /// with an unspecified subtype (e.g. "text/*") /// public MimeMediaType(string contentType) @@ -171,7 +168,7 @@ namespace Spring.Web.Support } /// - /// Creates a new media type instance representing a particular media type + /// Creates a new media type instance representing a particular media type /// public MimeMediaType(string contentType, string subType) { @@ -241,4 +238,4 @@ namespace Spring.Web.Support return _contentType.GetHashCode() + 29*_subType.GetHashCode(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Support/Result.cs b/src/Spring/Spring.Web/Web/Support/Result.cs index 63499489..d439b00d 100644 --- a/src/Spring/Spring.Web/Web/Support/Result.cs +++ b/src/Spring/Spring.Web/Web/Support/Result.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.Text; using System.Web; @@ -193,7 +192,7 @@ namespace Spring.Web.Support /// /// ///

- /// This is the (relative) path to the target page. + /// This is the (relative) path to the target page. ///

///
/// @@ -257,7 +256,7 @@ namespace Spring.Web.Support switch (Mode) { case ResultMode.Redirect: - case ResultMode.RedirectNoAbort: + case ResultMode.RedirectNoAbort: DoRedirect( context ); break; case ResultMode.Transfer: @@ -325,7 +324,7 @@ namespace Spring.Web.Support } /// - /// Returns a redirect url string that points to the + /// Returns a redirect url string that points to the /// defined by this /// result. /// @@ -366,7 +365,7 @@ namespace Spring.Web.Support char separator = '?'; foreach (DictionaryEntry entry in resolvedParameters) { - url.Append( separator ); + url.Append( separator ); url = BuildUrlParameter( url, entry.Key.ToString(), entry.Value.ToString() ); separator = '&'; } @@ -513,4 +512,4 @@ namespace Spring.Web.Support } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Support/ResultFactoryRegistry.cs b/src/Spring/Spring.Web/Web/Support/ResultFactoryRegistry.cs index 2d8785f0..5cd104af 100644 --- a/src/Spring/Spring.Web/Web/Support/ResultFactoryRegistry.cs +++ b/src/Spring/Spring.Web/Web/Support/ResultFactoryRegistry.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using Spring.Collections; using Spring.Util; @@ -35,15 +34,15 @@ namespace Spring.Web.Support /// /// /// - /// Factories get registered with the for a certain resultMode string. + /// Factories get registered with the for a certain resultMode string. /// uses for converting strings into instances /// implementing the corresponding navigation logic. /// /// /// Result string representations are always of the form:
/// "<resultmode>:<textual result representation>"
- /// Calling on the registry will cause the registry to first extract the leading resultmode to obtain - /// the corresponding instance and handle the actual instantiation by delegating to + /// Calling on the registry will cause the registry to first extract the leading resultmode to obtain + /// the corresponding instance and handle the actual instantiation by delegating to /// . ///
/// @@ -53,16 +52,16 @@ namespace Spring.Web.Support /// { /// ... /// } - /// + /// /// class MySpecialResultLogicFactory : IResultFactory /// { - /// IResult Create( string mode, string expression ) { /* ... convert 'expression' into + /// IResult Create( string mode, string expression ) { /* ... convert 'expression' into /// MySpecialResultLogic */ } /// } - /// + /// /// // register with global factory /// ResultFactoryRegistry.RegisterResultFactory( "mySpecialMode", new MySpecialResultLogicFactory ); - /// + /// /// // configure your Results /// <object type="mypage.aspx"> /// <property name="Results"> @@ -70,7 +69,7 @@ namespace Spring.Web.Support /// <entry key="continue" value="mySpecialMode:<some MySpecialResultLogic string representation>" /> /// </dictionary> /// </property> - /// + /// /// // on your page call /// myPage.SetResult("continue"); /// @@ -157,7 +156,7 @@ namespace Spring.Web.Support } /// - /// Creates a result from the specified by extracting the result mode from + /// Creates a result from the specified by extracting the result mode from /// the text and delegating to a corresponding , if any. /// /// the 'resultmode'-prefixed textual representation of the result instance to create. @@ -169,9 +168,9 @@ namespace Spring.Web.Support /// if either is null or returned null. /// /// This method guarantees that the return value will always be non-null.
- /// must always be of the form "<resultmode>:<textual result representation>". - /// The resultmode will be extracted and the corresponding (previously registered - /// using ) is called to actually create the instance. If no factory matches + /// must always be of the form "<resultmode>:<textual result representation>". + /// The resultmode will be extracted and the corresponding (previously registered + /// using ) is called to actually create the instance. If no factory matches /// resultmode, the call is handled to the . ///
public static IResult CreateResult( string resultText ) @@ -196,7 +195,7 @@ namespace Spring.Web.Support IResult result = resultFactory.CreateResult( resultMode, resultText ); AssertUtils.ArgumentNotNull(result, "ResultFactories must not return null results"); - return result; + return result; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Support/ResultMode.cs b/src/Spring/Spring.Web/Web/Support/ResultMode.cs index a2645e77..438d8e43 100644 --- a/src/Spring/Spring.Web/Web/Support/ResultMode.cs +++ b/src/Spring/Spring.Web/Web/Support/ResultMode.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,8 +20,6 @@ #region Imports -using System; - #endregion namespace Spring.Web.Support diff --git a/src/Spring/Spring.Web/Web/Support/SharedStateResourceCache.cs b/src/Spring/Spring.Web/Web/Support/SharedStateResourceCache.cs index 96c33930..6f331180 100644 --- a/src/Spring/Spring.Web/Web/Support/SharedStateResourceCache.cs +++ b/src/Spring/Spring.Web/Web/Support/SharedStateResourceCache.cs @@ -20,7 +20,6 @@ #region Imports -using System.Collections.Generic; using Spring.Globalization; using Spring.Objects; using Spring.Util; @@ -67,4 +66,4 @@ namespace Spring.Web.Support this.sharedStateHolder.SharedState[cacheKey] = resources; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/Support/SupportsWebDependencyInjectionMethodBuilder.cs b/src/Spring/Spring.Web/Web/Support/SupportsWebDependencyInjectionMethodBuilder.cs index 02b9bd96..b758ff58 100644 --- a/src/Spring/Spring.Web/Web/Support/SupportsWebDependencyInjectionMethodBuilder.cs +++ b/src/Spring/Spring.Web/Web/Support/SupportsWebDependencyInjectionMethodBuilder.cs @@ -1,6 +1,6 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #region Imports -using System; using System.Reflection; using System.Reflection.Emit; using Spring.Proxy; diff --git a/src/Spring/Spring.Web/Web/Support/SupportsWebDependencyInjectionTypeBuilder.cs b/src/Spring/Spring.Web/Web/Support/SupportsWebDependencyInjectionTypeBuilder.cs index fc4c33b2..725f9cb4 100644 --- a/src/Spring/Spring.Web/Web/Support/SupportsWebDependencyInjectionTypeBuilder.cs +++ b/src/Spring/Spring.Web/Web/Support/SupportsWebDependencyInjectionTypeBuilder.cs @@ -1,6 +1,6 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,7 +18,6 @@ #region Imports -using System; using System.Reflection; using System.Reflection.Emit; @@ -52,13 +51,13 @@ namespace Spring.Web.Support Name = PROXY_TYPE_NAME; base.TargetType = targetType; - + if (methodsToIntercept == null || methodsToIntercept.Length == 0) { throw new ArgumentException("No methods specified to be intercepted"); - } + } _methodsToIntercept = methodsToIntercept; - + if (!staticCallbackMethod.IsStatic) { throw new ArgumentException("CallbackMethod must be static"); @@ -177,7 +176,7 @@ namespace Spring.Web.Support #region Public Methods /// - /// Determines if the specified + /// Determines if the specified /// is one of those generated by this builder. /// /// The type to check. @@ -190,6 +189,6 @@ namespace Spring.Web.Support return type.FullName.StartsWith(PROXY_TYPE_NAME); } - #endregion + #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/AbstractWizard.cs b/src/Spring/Spring.Web/Web/UI/AbstractWizard.cs index 4cde4d85..204b7414 100644 --- a/src/Spring/Spring.Web/Web/UI/AbstractWizard.cs +++ b/src/Spring/Spring.Web/Web/UI/AbstractWizard.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Collections; using System.Web.UI; using System.Web.UI.WebControls; @@ -186,4 +185,4 @@ namespace Spring.Web.UI #endregion } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Controls/AbstractBaseValidator.cs b/src/Spring/Spring.Web/Web/UI/Controls/AbstractBaseValidator.cs index 0aa97fb3..1af27b6e 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/AbstractBaseValidator.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/AbstractBaseValidator.cs @@ -20,7 +20,6 @@ #region Import -using System; using System.Reflection; using System.Web.UI; using System.Web.UI.WebControls; @@ -30,7 +29,7 @@ using System.Web.UI.WebControls; namespace Spring.Web.UI.Controls { /// - /// Provides functions required for implementing validators + /// Provides functions required for implementing validators /// but are unfortunately not accessible from /// /// Erich Eichinger diff --git a/src/Spring/Spring.Web/Web/UI/Controls/AbstractValidationControl.cs b/src/Spring/Spring.Web/Web/UI/Controls/AbstractValidationControl.cs index 4c7dd6bf..5b613202 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/AbstractValidationControl.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/AbstractValidationControl.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Web.UI; using Spring.Context; using Spring.Util; @@ -60,7 +58,7 @@ namespace Spring.Web.UI.Controls /// collection to render. /// /// - /// If not set, the control will probe the control hierarchy for + /// If not set, the control will probe the control hierarchy for /// containing controls implementing /// and use the container's /// @@ -72,7 +70,7 @@ namespace Spring.Web.UI.Controls /// /// If set, will resolve to the named control specified - /// by this property. The behavior of name resolution is identical to + /// by this property. The behavior of name resolution is identical to /// , except that if the name /// starts with "::", the resolution will start at the page level instead of relative to this /// control @@ -109,7 +107,7 @@ namespace Spring.Web.UI.Controls } /// - /// Gets or sets the validation errors renderer to use. + /// Gets or sets the validation errors renderer to use. /// /// /// If not explicitly specified, defaults to . @@ -134,7 +132,7 @@ namespace Spring.Web.UI.Controls } /// - /// Create the default + /// Create the default /// for this ValidationControl if none is configured. /// protected abstract IValidationErrorsRenderer CreateValidationErrorsRenderer(); @@ -152,8 +150,8 @@ namespace Spring.Web.UI.Controls if (messageSource == null) { IValidationContainer validationContainer = FindValidationContainer(); - messageSource = (validationContainer == null) - ? null + messageSource = (validationContainer == null) + ? null : validationContainer.MessageSource; } return messageSource; @@ -179,7 +177,7 @@ namespace Spring.Web.UI.Controls } /// - /// Gets the , who's + /// Gets the , who's /// shall be rendered by this control. /// /// @@ -228,7 +226,7 @@ namespace Spring.Web.UI.Controls /// /// Resolves the list of validation errors either explicitely specified using - /// or obtained from the containing + /// or obtained from the containing /// resolved by to a list /// of elements containing the error messages to be rendered. /// @@ -239,7 +237,7 @@ namespace Spring.Web.UI.Controls /// . /// /// - /// Error Messages are resolved using either an explicitely specified or the + /// Error Messages are resolved using either an explicitely specified or the /// obtained from the validation container. /// /// @@ -277,4 +275,4 @@ namespace Spring.Web.UI.Controls Renderer.RenderErrors(Page as Page, writer, errorMessages); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Controls/Calendar.cs b/src/Spring/Spring.Web/Web/UI/Controls/Calendar.cs index 2ba3cab0..26e2cc0b 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/Calendar.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/Calendar.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,9 +20,7 @@ #region Imports -using System; using System.Collections.Specialized; -using System.Threading; using System.Web.UI; using System.Web.UI.WebControls; using Spring.Util; @@ -36,7 +34,7 @@ namespace Spring.Web.UI.Controls /// /// ///

- /// Credit: this control uses a slightly modified version of the + /// Credit: this control uses a slightly modified version of the /// Dynarch.com DHTML Calendar, /// written by Mihai Bazon. ///

@@ -287,4 +285,4 @@ namespace Spring.Web.UI.Controls remove { base.Events.RemoveHandler(EventDateChanged, value); } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Controls/CheckBoxList.cs b/src/Spring/Spring.Web/Web/UI/Controls/CheckBoxList.cs index 5ddb4974..e295ed6e 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/CheckBoxList.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/CheckBoxList.cs @@ -20,7 +20,6 @@ #region Imports -using System.Collections.Generic; using System.Web.UI.WebControls; #endregion diff --git a/src/Spring/Spring.Web/Web/UI/Controls/CheckBoxValidator.cs b/src/Spring/Spring.Web/Web/UI/Controls/CheckBoxValidator.cs index 0778b9b5..a3c3f989 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/CheckBoxValidator.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/CheckBoxValidator.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.Web.UI; using System.Web.UI.WebControls; diff --git a/src/Spring/Spring.Web/Web/UI/Controls/ContentReplacer.cs b/src/Spring/Spring.Web/Web/UI/Controls/ContentReplacer.cs index c170b7b1..0979d69b 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/ContentReplacer.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/ContentReplacer.cs @@ -18,7 +18,6 @@ #endregion -using System; using System.Reflection; using System.Web.UI; using Common.Logging; @@ -130,4 +129,4 @@ namespace Spring.Web.UI.Controls return myRenderMethod; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Controls/DataBindingPanel.cs b/src/Spring/Spring.Web/Web/UI/Controls/DataBindingPanel.cs index d68d1484..1e1fee0c 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/DataBindingPanel.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/DataBindingPanel.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; using System.Reflection; using System.Security.Permissions; @@ -42,15 +41,15 @@ using BindingDirection=Spring.DataBinding.BindingDirection; namespace Spring.Web.UI.Controls { /// - /// Any WebControl placed on a DataBindingPanel may be bound + /// Any WebControl placed on a DataBindingPanel may be bound /// to a model by adding an attribute "BindingTarget" /// /// Erich Eichinger [PersistChildren(true), - ToolboxData("<{0}:DataBindingPanel runat=\"server\" Width=\"125px\" Height=\"50px\"> "), + ToolboxData("<{0}:DataBindingPanel runat=\"server\" Width=\"125px\" Height=\"50px\"> "), ParseChildren(false), - Designer("System.Web.UI.Design.WebControls.PanelContainerDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), - AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal), + Designer("System.Web.UI.Design.WebControls.PanelContainerDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), + AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] public class DataBindingPanel : Panel { @@ -373,4 +372,4 @@ namespace Spring.Web.UI.Controls return null; } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Controls/LocalizedImage.cs b/src/Spring/Spring.Web/Web/UI/Controls/LocalizedImage.cs index f74c98be..026e2a11 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/LocalizedImage.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/LocalizedImage.cs @@ -18,10 +18,6 @@ #endregion -using System; -using System.Collections.Generic; -using System.IO; - namespace Spring.Web.UI.Controls { /// @@ -81,4 +77,4 @@ namespace Spring.Web.UI.Controls return File.Exists(Page.Server.MapPath(url)); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Controls/Panel.cs b/src/Spring/Spring.Web/Web/UI/Controls/Panel.cs index bc38eb8c..63539390 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/Panel.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/Panel.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -20,7 +20,6 @@ #region Imports -using System; using System.ComponentModel; using System.Security.Permissions; using System.Web; @@ -50,7 +49,7 @@ namespace Spring.Web.UI.Controls AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)] public class Panel : System.Web.UI.WebControls.Panel, ISupportsWebDependencyInjection { - // this helper class intercepts the first call to the child controls + // this helper class intercepts the first call to the child controls // collection from within InitRecursive(). // InitRecursive() is called right after the control has been added to it's parent's children. private class InitRecursiveInterceptingControlsCollection : ControlCollection @@ -65,7 +64,7 @@ namespace Spring.Web.UI.Controls { get { - // the following check relies on the fact, that ControlCollection is set readonly + // the following check relies on the fact, that ControlCollection is set readonly // right before InitRecursive() is called on each child control if (!_passedInitRecursiveCheck && this.IsReadOnly) @@ -119,7 +118,7 @@ namespace Spring.Web.UI.Controls /// protected override void OnPreRender( EventArgs e ) { - this.Visible = (_visibleConditionExpression != null) + this.Visible = (_visibleConditionExpression != null) ? Spring.Expressions.ExpressionEvaluator.GetValue(this, _visibleConditionExpression).Equals(true) : this.Visible; @@ -156,7 +155,7 @@ namespace Spring.Web.UI.Controls /// protected virtual void OnPreInitRecursive(EventArgs e) { - if (!_suppressDependencyInjection + if (!_suppressDependencyInjection && _defaultApplicationContext == null) { // obtain appContext of the closed parent template (.ascx/.aspx) control @@ -191,21 +190,21 @@ namespace Spring.Web.UI.Controls /// protected override void AddedControl(Control control, int index) { - if (!_suppressDependencyInjection + if (!_suppressDependencyInjection && _defaultApplicationContext != null) { - control = WebDependencyInjectionUtils.InjectDependenciesRecursive(_defaultApplicationContext, control); + control = WebDependencyInjectionUtils.InjectDependenciesRecursive(_defaultApplicationContext, control); } base.AddedControl(control, index); } /// - /// Overridden to automatically aquire a reference to + /// Overridden to automatically aquire a reference to /// root application context to use for DI. /// protected override ControlCollection CreateControlCollection() { - // set root application context to signal, that we care + // set root application context to signal, that we care // for our children ourselves if (_suppressDependencyInjection) { diff --git a/src/Spring/Spring.Web/Web/UI/Controls/RadioButtonGroup.cs b/src/Spring/Spring.Web/Web/UI/Controls/RadioButtonGroup.cs index abfd888b..d88a2eb6 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/RadioButtonGroup.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/RadioButtonGroup.cs @@ -18,8 +18,6 @@ #endregion -using System; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; using System.Web.UI; @@ -193,4 +191,4 @@ namespace Spring.Web.UI.Controls } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Controls/TabContainer.cs b/src/Spring/Spring.Web/Web/UI/Controls/TabContainer.cs index 55e9e357..357d4883 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/TabContainer.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/TabContainer.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.Web.UI; using System.Web.UI.WebControls; @@ -32,7 +31,7 @@ namespace Spring.Web.UI.Controls /// This control is responsible for rendering tabs. /// /// - /// By default, this TabContainer implementation uses controls to + /// By default, this TabContainer implementation uses controls to /// render tabs. Override to change this behaviour. /// /// Erich Eichinger @@ -58,7 +57,7 @@ namespace Spring.Web.UI.Controls } /// - /// Catches with name '' and + /// Catches with name '' and /// raises the event. /// /// The source of the event. @@ -114,4 +113,4 @@ namespace Spring.Web.UI.Controls this.Controls.Add(span); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Controls/TabularMultiView.cs b/src/Spring/Spring.Web/Web/UI/Controls/TabularMultiView.cs index 8f194868..89da7200 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/TabularMultiView.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/TabularMultiView.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.Collections; using System.ComponentModel; using System.Web; @@ -32,7 +31,7 @@ using System.Web.UI.WebControls; namespace Spring.Web.UI.Controls { /// - /// The control allows you to build ASP.NET Web pages that present + /// The control allows you to build ASP.NET Web pages that present /// the user with content arranged in tabular form. /// /// Erich Eichinger @@ -158,7 +157,7 @@ namespace Spring.Web.UI.Controls } /// - /// Creates TabContainer and MultiView + /// Creates TabContainer and MultiView /// protected virtual Control CreateContent(TabContainer menu, MultiView body) { @@ -296,4 +295,4 @@ namespace Spring.Web.UI.Controls } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Controls/TabularViewCollection.cs b/src/Spring/Spring.Web/Web/UI/Controls/TabularViewCollection.cs index 7b47daac..a9ce23df 100644 --- a/src/Spring/Spring.Web/Web/UI/Controls/TabularViewCollection.cs +++ b/src/Spring/Spring.Web/Web/UI/Controls/TabularViewCollection.cs @@ -20,7 +20,6 @@ #region Imports -using System; using System.Security.Permissions; using System.Web; using System.Web.UI; @@ -79,4 +78,4 @@ namespace Spring.Web.UI.Controls get { return (TabularView) base[i]; } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/DialogAttribute.cs b/src/Spring/Spring.Web/Web/UI/DialogAttribute.cs index c370aa94..ac310400 100644 --- a/src/Spring/Spring.Web/Web/UI/DialogAttribute.cs +++ b/src/Spring/Spring.Web/Web/UI/DialogAttribute.cs @@ -18,8 +18,6 @@ #endregion -using System; - namespace Spring.Web.UI { /// diff --git a/src/Spring/Spring.Web/Web/UI/MasterPage.cs b/src/Spring/Spring.Web/Web/UI/MasterPage.cs index 7b35dd80..56c51d79 100644 --- a/src/Spring/Spring.Web/Web/UI/MasterPage.cs +++ b/src/Spring/Spring.Web/Web/UI/MasterPage.cs @@ -20,9 +20,7 @@ #region Imports -using System; using System.Collections; -using System.Collections.Generic; using System.Web.UI; using Spring.Collections; using Spring.Validation; @@ -41,7 +39,7 @@ using Spring.Web.Support; namespace Spring.Web.UI { #region ASP.NET 2.0 Spring Master Page Implementation - + /// /// Spring.NET Master Page implementation for ASP.NET 2.0 /// @@ -61,7 +59,7 @@ namespace Spring.Web.UI #endregion #region Lifecycle methods - + /// /// Initialize a new MasterPage instance. /// @@ -76,11 +74,11 @@ namespace Spring.Web.UI protected override void OnInit(EventArgs e) { InitializeMessageSource(); - + base.OnInit(e); // initialize controls - OnInitializeControls(EventArgs.Empty); + OnInitializeControls(EventArgs.Empty); } /// @@ -304,7 +302,7 @@ namespace Spring.Web.UI /// In ASP.NET 1.1, this method loads local resources from the web application assembly. /// /// - /// However, in ASP.NET 2.0, local resources are compiled into the dynamic assembly, + /// However, in ASP.NET 2.0, local resources are compiled into the dynamic assembly, /// so we need to find that assembly instead and load the resources from it. /// /// @@ -424,15 +422,15 @@ namespace Spring.Web.UI /// is an easy way to pass additional parameters into the expression /// /// // config: - /// + /// /// <property Name="Results"> /// <dictionary> /// <entry key="ok_clicked" value="redirect:~/ShowResult.aspx?result=%{Args['result']}" /> /// </dictionary> /// </property> - /// + /// /// // code: - /// + /// /// void OnOkClicked(object sender, EventArgs e) /// { /// Args["result"] = txtUserInput.Text; @@ -474,9 +472,9 @@ namespace Spring.Web.UI /// - /// Returns a redirect url string that points to the + /// Returns a redirect url string that points to the /// defined by this - /// result evaluated using this Page for expression + /// result evaluated using this Page for expression /// /// Name of the result. /// A redirect url string. @@ -486,9 +484,9 @@ namespace Spring.Web.UI } /// - /// Returns a redirect url string that points to the + /// Returns a redirect url string that points to the /// defined by this - /// result evaluated using this Page for expression + /// result evaluated using this Page for expression /// /// Name of the result. /// The context to use for evaluating the SpEL expression in the Result @@ -578,7 +576,7 @@ namespace Spring.Web.UI #region Spring Page support /// - /// Overrides Page property to return + /// Overrides Page property to return /// instead of . /// [Browsable(false)] @@ -589,7 +587,7 @@ namespace Spring.Web.UI } #endregion - + #region Dependency Injection Support /// diff --git a/src/Spring/Spring.Web/Web/UI/Page.cs b/src/Spring/Spring.Web/Web/UI/Page.cs index 7dd6b22d..23984d52 100644 --- a/src/Spring/Spring.Web/Web/UI/Page.cs +++ b/src/Spring/Spring.Web/Web/UI/Page.cs @@ -20,15 +20,12 @@ #region Imports -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; using System.Globalization; using System.Resources; using System.Security.Permissions; -using System.Threading; using System.Web; using System.Web.UI; using Spring.Collections; @@ -431,7 +428,7 @@ namespace Spring.Web.UI private IModelPersistenceMedium modelPersistenceMedium = new SessionModelPersistenceMedium(); /// - /// Set the strategy for storing model + /// Set the strategy for storing model /// instances between requests. /// /// @@ -896,15 +893,15 @@ namespace Spring.Web.UI /// This example shows how to pass an arbitrary value 'age' into a result expression. /// /// // config: - /// + /// /// <property Name="Results"> /// <dictionary> /// <entry key="ok_clicked" value="redirect:~/ShowResult.aspx?age=%{Args['age']}" /> /// </dictionary> /// </property> - /// + /// /// // code: - /// + /// /// void OnOkClicked(object sender, EventArgs e) /// { /// Args["result"] = txtAge.Text; @@ -945,9 +942,9 @@ namespace Spring.Web.UI } /// - /// Returns a redirect url string that points to the + /// Returns a redirect url string that points to the /// defined by this - /// result evaluated using this Page for expression + /// result evaluated using this Page for expression /// /// Name of the result. /// A redirect url string. @@ -957,9 +954,9 @@ namespace Spring.Web.UI } /// - /// Returns a redirect url string that points to the + /// Returns a redirect url string that points to the /// defined by this - /// result evaluated using this Page for expression + /// result evaluated using this Page for expression /// /// Name of the result. /// The context to use for evaluating the SpEL expression in the Result diff --git a/src/Spring/Spring.Web/Web/UI/UserControl.cs b/src/Spring/Spring.Web/Web/UI/UserControl.cs index 5423ef9b..042fc8a5 100644 --- a/src/Spring/Spring.Web/Web/UI/UserControl.cs +++ b/src/Spring/Spring.Web/Web/UI/UserControl.cs @@ -20,9 +20,7 @@ #region Imports -using System; using System.Collections; -using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; using System.Globalization; @@ -285,7 +283,7 @@ namespace Spring.Web.UI private IModelPersistenceMedium modelPersistenceMedium = new SessionModelPersistenceMedium(); /// - /// Set the strategy for storing model + /// Set the strategy for storing model /// instances between requests. /// /// @@ -534,15 +532,15 @@ namespace Spring.Web.UI /// is an easy way to pass additional parameters into the expression /// /// // config: - /// + /// /// <property Name="Results"> /// <dictionary> /// <entry key="ok_clicked" value="redirect:~/ShowResult.aspx?result=%{Args['result']}" /> /// </dictionary> /// </property> - /// + /// /// // code: - /// + /// /// void OnOkClicked(object sender, EventArgs e) /// { /// Args["result"] = txtUserInput.Text; @@ -584,9 +582,9 @@ namespace Spring.Web.UI /// - /// Returns a redirect url string that points to the + /// Returns a redirect url string that points to the /// defined by this - /// result evaluated using this Page for expression + /// result evaluated using this Page for expression /// /// Name of the result. /// A redirect url string. @@ -596,9 +594,9 @@ namespace Spring.Web.UI } /// - /// Returns a redirect url string that points to the + /// Returns a redirect url string that points to the /// defined by this - /// result evaluated using this Page for expression + /// result evaluated using this Page for expression /// /// Name of the result. /// The context to use for evaluating the SpEL expression in the Result diff --git a/src/Spring/Spring.Web/Web/UI/Validation/AbstractValidationErrorsRenderer.cs b/src/Spring/Spring.Web/Web/UI/Validation/AbstractValidationErrorsRenderer.cs index 9f0ff332..1a04f401 100644 --- a/src/Spring/Spring.Web/Web/UI/Validation/AbstractValidationErrorsRenderer.cs +++ b/src/Spring/Spring.Web/Web/UI/Validation/AbstractValidationErrorsRenderer.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using System.Web.UI; namespace Spring.Web.UI.Validation @@ -51,4 +50,4 @@ namespace Spring.Web.UI.Validation /// The list of validation errors. public abstract void RenderErrors(Page page, HtmlTextWriter writer, IList errors); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Validation/DivValidationErrorsRenderer.cs b/src/Spring/Spring.Web/Web/UI/Validation/DivValidationErrorsRenderer.cs index df751e63..04df4b1d 100644 --- a/src/Spring/Spring.Web/Web/UI/Validation/DivValidationErrorsRenderer.cs +++ b/src/Spring/Spring.Web/Web/UI/Validation/DivValidationErrorsRenderer.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using System.Web.UI; namespace Spring.Web.UI.Validation @@ -48,9 +47,9 @@ namespace Spring.Web.UI.Validation { writer.AddAttribute(HtmlTextWriterAttribute.Class, CssClass); } - + writer.AddAttribute(HtmlTextWriterAttribute.Id, "ctl00_body_validationSummary"); - + writer.RenderBeginTag(HtmlTextWriterTag.Div); if (errors != null && errors.Count > 0) { @@ -59,8 +58,8 @@ namespace Spring.Web.UI.Validation writer.WriteLine(error); writer.WriteFullBeginTag("br /"); } - } + } writer.RenderEndTag(); } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Validation/IValidationErrorsRenderer.cs b/src/Spring/Spring.Web/Web/UI/Validation/IValidationErrorsRenderer.cs index bd74303c..0ae7cf7c 100644 --- a/src/Spring/Spring.Web/Web/UI/Validation/IValidationErrorsRenderer.cs +++ b/src/Spring/Spring.Web/Web/UI/Validation/IValidationErrorsRenderer.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using System.Web.UI; using Spring.Web.UI.Controls; @@ -30,13 +29,13 @@ namespace Spring.Web.UI.Validation /// /// /// - /// Validation errors renderers are used to decouple rendering behavior from the + /// Validation errors renderers are used to decouple rendering behavior from the /// validation errors controls such as and /// . /// /// /// This allows users to change how validation errors are rendered by simply pluggin in - /// appropriate renderer implementation into the validation errors controls using + /// appropriate renderer implementation into the validation errors controls using /// Spring.NET dependency injection. /// /// @@ -51,4 +50,4 @@ namespace Spring.Web.UI.Validation /// The list of validation errors. void RenderErrors(Page page, HtmlTextWriter writer, IList errors); } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Validation/IconValidationErrorsRenderer.cs b/src/Spring/Spring.Web/Web/UI/Validation/IconValidationErrorsRenderer.cs index 91f38059..1dca5e27 100644 --- a/src/Spring/Spring.Web/Web/UI/Validation/IconValidationErrorsRenderer.cs +++ b/src/Spring/Spring.Web/Web/UI/Validation/IconValidationErrorsRenderer.cs @@ -18,14 +18,13 @@ #endregion -using System.Collections.Generic; using System.Text; using System.Web.UI; namespace Spring.Web.UI.Validation { /// - /// Implementation of that + /// Implementation of that /// displays an error image to let user know there is an error, and /// tooltip to display actual error messages. /// @@ -75,9 +74,9 @@ namespace Spring.Web.UI.Validation writer.AddAttribute(HtmlTextWriterAttribute.Src, page.ImagesRoot + "/" + IconSrc); writer.AddAttribute(HtmlTextWriterAttribute.Title, sb.ToString()); - writer.RenderBeginTag(HtmlTextWriterTag.Img); + writer.RenderBeginTag(HtmlTextWriterTag.Img); writer.RenderEndTag(); } } } -} \ No newline at end of file +} diff --git a/src/Spring/Spring.Web/Web/UI/Validation/SpanValidationErrorsRenderer.cs b/src/Spring/Spring.Web/Web/UI/Validation/SpanValidationErrorsRenderer.cs index ddd05f16..92fd47ae 100644 --- a/src/Spring/Spring.Web/Web/UI/Validation/SpanValidationErrorsRenderer.cs +++ b/src/Spring/Spring.Web/Web/UI/Validation/SpanValidationErrorsRenderer.cs @@ -18,7 +18,6 @@ #endregion -using System.Collections.Generic; using System.Web.UI; using Spring.Web.UI.Controls; @@ -52,17 +51,17 @@ namespace Spring.Web.UI.Validation { writer.AddAttribute(HtmlTextWriterAttribute.Class, CssClass); } - + writer.RenderBeginTag(HtmlTextWriterTag.Span); foreach (string error in errors) { writer.Write(error); writer.Write(" "); - } + } writer.RenderEndTag(); - + } } } -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Aop.Tests/Aop/Advice/DebugAdvice.cs b/test/Spring/Spring.Aop.Tests/Aop/Advice/DebugAdvice.cs index 5b8ada4c..789ede8b 100644 --- a/test/Spring/Spring.Aop.Tests/Aop/Advice/DebugAdvice.cs +++ b/test/Spring/Spring.Aop.Tests/Aop/Advice/DebugAdvice.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,13 +18,9 @@ #endregion -#region Imports - using System; using AopAlliance.Intercept; -#endregion - namespace Spring.Aop.Advice { /// @@ -88,4 +84,4 @@ namespace Spring.Aop.Advice return returnValue; } } -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Aop.Tests/Aop/Config/AopNamespaceParserTests.cs b/test/Spring/Spring.Aop.Tests/Aop/Config/AopNamespaceParserTests.cs index 69867053..76d3db54 100644 --- a/test/Spring/Spring.Aop.Tests/Aop/Config/AopNamespaceParserTests.cs +++ b/test/Spring/Spring.Aop.Tests/Aop/Config/AopNamespaceParserTests.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,8 +18,6 @@ #endregion -#region Imports - using System.Collections.Generic; using NUnit.Framework; @@ -30,8 +28,6 @@ using Spring.Context.Support; using Spring.Objects; using Spring.Objects.Factory.Xml; -#endregion - namespace Spring.Aop.Config { /// @@ -46,7 +42,7 @@ namespace Spring.Aop.Config [SetUp] public void Setup() - { + { // IS WELLKNOWN NOW //NamespaceParserRegistry.RegisterParser(typeof(AopNamespaceParser)); //ctx = new XmlApplicationContext( "assembly://Spring.Aop.Tests/Spring.Aop.Config/AopNamespaceParserTests.xml"); @@ -71,11 +67,11 @@ namespace Spring.Aop.Config Assert.IsTrue(AopUtils.IsAopProxy(testObject), "Object should be an AOP proxy"); IAdvised advised = testObject as IAdvised; - Assert.IsNotNull(advised); + Assert.IsNotNull(advised); IList advisors = advised.Advisors; Assert.IsTrue(advisors.Count > 0, "Advisors should not be empty"); - - + + } [Test] @@ -99,6 +95,6 @@ namespace Spring.Aop.Config return ctx.GetObject("testObject", typeof (ITestObject)) as ITestObject; } - + } -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Aop.Tests/Aop/Framework/Adapter/AdvisorAdapterRegistrationTests.cs b/test/Spring/Spring.Aop.Tests/Aop/Framework/Adapter/AdvisorAdapterRegistrationTests.cs index 1f24ad0f..fe0e9b18 100644 --- a/test/Spring/Spring.Aop.Tests/Aop/Framework/Adapter/AdvisorAdapterRegistrationTests.cs +++ b/test/Spring/Spring.Aop.Tests/Aop/Framework/Adapter/AdvisorAdapterRegistrationTests.cs @@ -16,8 +16,6 @@ */ #endregion -#region Imports - using NUnit.Framework; using Spring.Context; @@ -25,8 +23,6 @@ using Spring.Context.Support; using Spring.Objects; using Spring.Objects.Factory.Xml; -#endregion - namespace Spring.Aop.Framework.Adapter { /// diff --git a/test/Spring/Spring.Aop.Tests/Aop/Framework/Adapter/UnknownAdviceTypeExceptionTests.cs b/test/Spring/Spring.Aop.Tests/Aop/Framework/Adapter/UnknownAdviceTypeExceptionTests.cs index b2e750c6..896b741d 100644 --- a/test/Spring/Spring.Aop.Tests/Aop/Framework/Adapter/UnknownAdviceTypeExceptionTests.cs +++ b/test/Spring/Spring.Aop.Tests/Aop/Framework/Adapter/UnknownAdviceTypeExceptionTests.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,12 +18,8 @@ #endregion -#region Imports - using NUnit.Framework; -#endregion - namespace Spring.Aop.Framework.Adapter { /// diff --git a/test/Spring/Spring.Aop.Tests/Aop/Framework/DynamicProxy/AbstractAopProxyTests.cs b/test/Spring/Spring.Aop.Tests/Aop/Framework/DynamicProxy/AbstractAopProxyTests.cs index 4b407d90..cdc628a4 100644 --- a/test/Spring/Spring.Aop.Tests/Aop/Framework/DynamicProxy/AbstractAopProxyTests.cs +++ b/test/Spring/Spring.Aop.Tests/Aop/Framework/DynamicProxy/AbstractAopProxyTests.cs @@ -21,15 +21,12 @@ using System.Runtime.Serialization.Formatters; using System.Runtime.Serialization.Formatters.Binary; using System.Threading; using System.Reflection; -using System.Web; -using System.Runtime.Remoting; using AopAlliance.Aop; using AopAlliance.Intercept; using FakeItEasy; -using Spring.Aop.Framework.Adapter; using Spring.Aop.Interceptor; using Spring.Aop.Support; using Spring.Expressions; @@ -2484,15 +2481,15 @@ namespace Spring.Aop.Framework.DynamicProxy public void ThrowsAdvisorIsInvoked() { // Reacts to HttpException and RemotingException - ThrowsAdviceInterceptorTests.MyThrowsHandler th = new ThrowsAdviceInterceptorTests.MyThrowsHandler(); + var th = new Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptorTests.MyThrowsHandler(); IAdvisor matchesEchoAdvisor = new EchoPointcutAdvisor(th); - ThrowsAdviceInterceptorTests.Echo target = new ThrowsAdviceInterceptorTests.Echo(); + var target = new Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptorTests.Echo(); target.A = 16; ProxyFactory pf = new ProxyFactory(target); pf.AddAdvice(new NopInterceptor()); pf.AddAdvisor(matchesEchoAdvisor); Assert.AreEqual(matchesEchoAdvisor, pf.Advisors[1], "Advisor was added"); - ThrowsAdviceInterceptorTests.IEcho proxied = (ThrowsAdviceInterceptorTests.IEcho)CreateProxy(pf); + var proxied = (Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptorTests.IEcho)CreateProxy(pf); Assert.AreEqual(0, th.GetCalls()); Assert.AreEqual(target.A, proxied.A); Assert.AreEqual(0, th.GetCalls()); @@ -2508,13 +2505,13 @@ namespace Spring.Aop.Framework.DynamicProxy Assert.AreEqual(ex, caught); } - ex = new HttpException(); + ex = new System.Web.HttpException(); try { proxied.EchoException(1, ex); Assert.Fail("Should have thrown HttpException"); } - catch (HttpException caught) + catch (System.Web.HttpException caught) { Assert.AreEqual(ex, caught); } @@ -2540,14 +2537,14 @@ namespace Spring.Aop.Framework.DynamicProxy public void AddThrowsAdviceWithoutAdvisor() { // Reacts to ServletException and RemoteException - ThrowsAdviceInterceptorTests.MyThrowsHandler th = new ThrowsAdviceInterceptorTests.MyThrowsHandler(); + var th = new Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptorTests.MyThrowsHandler(); - ThrowsAdviceInterceptorTests.Echo target = new ThrowsAdviceInterceptorTests.Echo(); + var target = new Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptorTests.Echo(); target.A = 16; ProxyFactory pf = new ProxyFactory(target); pf.AddAdvice(new NopInterceptor()); pf.AddAdvice(th); - ThrowsAdviceInterceptorTests.IEcho proxied = (ThrowsAdviceInterceptorTests.IEcho)CreateProxy(pf); + var proxied = (Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptorTests.IEcho) CreateProxy(pf); Assert.AreEqual(0, th.GetCalls()); Assert.AreEqual(target.A, proxied.A); Assert.AreEqual(0, th.GetCalls()); @@ -2564,13 +2561,13 @@ namespace Spring.Aop.Framework.DynamicProxy } // Subclass of RemoteException - ex = new RemotingTimeoutException(); + ex = new System.Runtime.Remoting.RemotingTimeoutException(); try { proxied.EchoException(1, ex); Assert.Fail("Should have thrown RemotingTimeoutException"); } - catch (RemotingTimeoutException caught) + catch (System.Runtime.Remoting.RemotingTimeoutException caught) { Assert.AreEqual(ex, caught); } diff --git a/test/Spring/Spring.Aop.Tests/Aop/Framework/ProxyFactoryObjectTests.cs b/test/Spring/Spring.Aop.Tests/Aop/Framework/ProxyFactoryObjectTests.cs index 0535ab65..ab9c07f5 100644 --- a/test/Spring/Spring.Aop.Tests/Aop/Framework/ProxyFactoryObjectTests.cs +++ b/test/Spring/Spring.Aop.Tests/Aop/Framework/ProxyFactoryObjectTests.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,16 +18,12 @@ #endregion -#region Imports - using System; using System.IO; -using System.Security.Policy; using System.Collections; using System.Reflection; using System.Text; using System.Threading; -using System.Web; using AopAlliance.Aop; using AopAlliance.Intercept; @@ -36,7 +32,6 @@ using FakeItEasy; using NUnit.Framework; using Spring.Aop.Advice; -using Spring.Aop.Framework.Adapter; using Spring.Aop.Interceptor; using Spring.Aop.Support; using Spring.Aop.Target; @@ -49,8 +44,6 @@ using Spring.Objects.Factory.Xml; using Spring.Proxy; using Spring.Threading; -#endregion - namespace Spring.Aop.Framework { /// @@ -411,12 +404,11 @@ namespace Spring.Aop.Framework public void CanAddThrowsAdviceWithoutAdvisor() { IObjectFactory f = new XmlObjectFactory(new ReadOnlyXmlTestResource("throwsAdvice.xml", GetType())); - ThrowsAdviceInterceptorTests.MyThrowsHandler th = - (ThrowsAdviceInterceptorTests.MyThrowsHandler)f.GetObject("throwsAdvice"); + var th = (Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptorTests.MyThrowsHandler) f.GetObject("throwsAdvice"); CountingBeforeAdvice cba = (CountingBeforeAdvice)f.GetObject("countingBeforeAdvice"); Assert.AreEqual(0, cba.GetCalls()); Assert.AreEqual(0, th.GetCalls()); - ThrowsAdviceInterceptorTests.IEcho echo = (ThrowsAdviceInterceptorTests.IEcho)f.GetObject("throwsAdvised"); + var echo = (Spring.Aop.Framework.Adapter.ThrowsAdviceInterceptorTests.IEcho) f.GetObject("throwsAdvised"); echo.A = 12; Assert.AreEqual(1, cba.GetCalls()); Assert.AreEqual(0, th.GetCalls()); @@ -434,13 +426,13 @@ namespace Spring.Aop.Framework Assert.AreEqual(0, th.GetCalls()); // Handler knows how to handle this exception - expected = new HttpException(); + expected = new System.Web.HttpException(); try { echo.EchoException(1, expected); Assert.Fail(); } - catch (HttpException ex) + catch (System.Web.HttpException ex) { Assert.AreEqual(expected, ex); } @@ -448,7 +440,7 @@ namespace Spring.Aop.Framework Assert.AreEqual(1, th.GetCalls("HttpException")); } #endif - + /// Checks that globals get invoked, /// and that they can add aspect interfaces unavailable /// to other objects. These interfaces don't need @@ -789,7 +781,7 @@ namespace Spring.Aop.Framework { AppDomainSetup setup = new AppDomainSetup(); setup.ApplicationBase = Environment.CurrentDirectory; - domain = AppDomain.CreateDomain("Spring", new Evidence(AppDomain.CurrentDomain.Evidence), setup); + domain = AppDomain.CreateDomain("Spring", new System.Security.Policy.Evidence(AppDomain.CurrentDomain.Evidence), setup); object command = domain.CreateInstanceAndUnwrap(GetType().Assembly.FullName, typeof(RemotableCommand).FullName); ProxyFactoryObject fac = new ProxyFactoryObject(); @@ -1090,4 +1082,4 @@ namespace Spring.Aop.Framework #endregion -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Benchmark/ContainerBenchmark.cs b/test/Spring/Spring.Benchmark/ContainerBenchmark.cs index b2525220..3c750836 100644 --- a/test/Spring/Spring.Benchmark/ContainerBenchmark.cs +++ b/test/Spring/Spring.Benchmark/ContainerBenchmark.cs @@ -20,7 +20,6 @@ using BenchmarkDotNet.Attributes; using Spring.Benchmark.Classes; -using Spring.Context; using Spring.Context.Support; namespace Spring.Benchmark @@ -71,4 +70,4 @@ namespace Spring.Benchmark return ok; } } -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Core.Tests/Context/Support/ResourceSetMessageSourceTests.cs b/test/Spring/Spring.Core.Tests/Context/Support/ResourceSetMessageSourceTests.cs index efe2bcb5..b333a44c 100644 --- a/test/Spring/Spring.Core.Tests/Context/Support/ResourceSetMessageSourceTests.cs +++ b/test/Spring/Spring.Core.Tests/Context/Support/ResourceSetMessageSourceTests.cs @@ -18,24 +18,16 @@ #endregion -#region Imports - using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; using System.Globalization; -using System.IO; using System.Reflection; using System.Resources; -using System.Text; using NUnit.Framework; using Spring.Globalization; using Spring.Objects; using Spring.Util; -#endregion - namespace Spring.Context.Support { /// @@ -301,7 +293,7 @@ namespace Spring.Context.Support messageSource.ResourceManagers = resourceManagerList; object obj = messageSource.GetResourceObject("bubblechamber", CultureInfo.CurrentCulture); Assert.IsNotNull(obj, "expected to retrieve object form resource set"); - Bitmap bitMap = null; + System.Drawing.Bitmap bitMap = null; //.NET 1.0 returns this as a base64 string while .NET 1.1 returns it as a Bitmap //There are some isues with resx compatability between framework versions. @@ -312,13 +304,13 @@ namespace Spring.Context.Support string ImageText = obj as string; Byte[] bitmapData = new Byte[ImageText.Length]; bitmapData = Convert.FromBase64String(FixBase64ForImage(ImageText)); - MemoryStream streamBitmap = new MemoryStream(bitmapData); - bitMap = new Bitmap((Bitmap)Image.FromStream(streamBitmap)); + var streamBitmap = new System.IO.MemoryStream(bitmapData); + bitMap = new System.Drawing.Bitmap((System.Drawing.Bitmap) System.Drawing.Image.FromStream(streamBitmap)); } else { - bitMap = obj as Bitmap; + bitMap = obj as System.Drawing.Bitmap; } Assert.IsNotNull(bitMap, "expected to retrieve BitMap. Instead Type = " + obj.GetType()); Assert.AreEqual(146, bitMap.Size.Width, "Width of image wrong"); @@ -330,7 +322,7 @@ namespace Spring.Context.Support private string FixBase64ForImage(string Image) { - StringBuilder sbText = new StringBuilder(Image, Image.Length); + var sbText = new System.Text.StringBuilder(Image, Image.Length); sbText.Replace("\r\n", String.Empty); sbText.Replace(" ", String.Empty); return sbText.ToString(); @@ -344,7 +336,7 @@ namespace Spring.Context.Support { //Add another resource manager to the list TestObject to = new TestObject(); - ComponentResourceManager mgr = new ComponentResourceManager(to.GetType()); + var mgr = new System.ComponentModel.ComponentResourceManager(to.GetType()); resourceManagerList.Add(mgr); messageSource.ResourceManagers = resourceManagerList; @@ -426,4 +418,4 @@ namespace Spring.Context.Support new object[] { "Mr.", "Anderson" }), "message not as expected"); } } -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Core.Tests/Objects/Factory/AbstractListableObjectFactoryTests.cs b/test/Spring/Spring.Core.Tests/Objects/Factory/AbstractListableObjectFactoryTests.cs index bf5a9332..fbb902e0 100644 --- a/test/Spring/Spring.Core.Tests/Objects/Factory/AbstractListableObjectFactoryTests.cs +++ b/test/Spring/Spring.Core.Tests/Objects/Factory/AbstractListableObjectFactoryTests.cs @@ -21,7 +21,6 @@ #region Imports using System; -using System.Collections.Generic; using NUnit.Framework; #endregion diff --git a/test/Spring/Spring.Core.Tests/Objects/Factory/Config/ConfigurationReaderTests.cs b/test/Spring/Spring.Core.Tests/Objects/Factory/Config/ConfigurationReaderTests.cs index af3833bf..e60d8482 100644 --- a/test/Spring/Spring.Core.Tests/Objects/Factory/Config/ConfigurationReaderTests.cs +++ b/test/Spring/Spring.Core.Tests/Objects/Factory/Config/ConfigurationReaderTests.cs @@ -24,7 +24,6 @@ using System; using System.Collections.Specialized; using System.Configuration; using System.IO; -using System.Runtime.InteropServices; using System.Text; using NUnit.Framework; @@ -234,4 +233,4 @@ namespace Spring.Objects.Factory.Config }, "Cannot read config section 'ELNOMBRE' - section not found."); } } -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Core.Tests/Objects/Factory/Config/DictionaryFactoryObjectTests.cs b/test/Spring/Spring.Core.Tests/Objects/Factory/Config/DictionaryFactoryObjectTests.cs index ce60a8c1..005502a5 100644 --- a/test/Spring/Spring.Core.Tests/Objects/Factory/Config/DictionaryFactoryObjectTests.cs +++ b/test/Spring/Spring.Core.Tests/Objects/Factory/Config/DictionaryFactoryObjectTests.cs @@ -18,14 +18,10 @@ #endregion -#region Imports - using System; using System.Collections; using NUnit.Framework; -#endregion - namespace Spring.Objects.Factory.Config { /// @@ -113,4 +109,4 @@ namespace Spring.Objects.Factory.Config } } } -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Core.Tests/Objects/Factory/ObjectFactoryUtils_PreserveOrderInHierarchy_Tests.cs b/test/Spring/Spring.Core.Tests/Objects/Factory/ObjectFactoryUtils_PreserveOrderInHierarchy_Tests.cs index 78a7179d..28f1b095 100644 --- a/test/Spring/Spring.Core.Tests/Objects/Factory/ObjectFactoryUtils_PreserveOrderInHierarchy_Tests.cs +++ b/test/Spring/Spring.Core.Tests/Objects/Factory/ObjectFactoryUtils_PreserveOrderInHierarchy_Tests.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using NUnit.Framework; using Spring.Objects.Factory.Support; @@ -56,4 +55,4 @@ namespace Spring.Objects.Factory Assert.AreEqual(new string[] { "objA", "objB", "objC", "obj2A", "obj2C" }, names); } } -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Core.Tests/Objects/Factory/Xml/XmlObjectCollectionTests.cs b/test/Spring/Spring.Core.Tests/Objects/Factory/Xml/XmlObjectCollectionTests.cs index eb684469..a0e52ef2 100644 --- a/test/Spring/Spring.Core.Tests/Objects/Factory/Xml/XmlObjectCollectionTests.cs +++ b/test/Spring/Spring.Core.Tests/Objects/Factory/Xml/XmlObjectCollectionTests.cs @@ -20,7 +20,6 @@ using System; using System.Collections; -using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; diff --git a/test/Spring/Spring.Core.Tests/Objects/Factory/Xml/XmlObjectFactoryTests.cs b/test/Spring/Spring.Core.Tests/Objects/Factory/Xml/XmlObjectFactoryTests.cs index 1cdaf6a5..c022e623 100644 --- a/test/Spring/Spring.Core.Tests/Objects/Factory/Xml/XmlObjectFactoryTests.cs +++ b/test/Spring/Spring.Core.Tests/Objects/Factory/Xml/XmlObjectFactoryTests.cs @@ -16,7 +16,6 @@ using System; using System.Collections; -using System.Collections.Generic; using System.Data; using System.Globalization; using System.IO; @@ -34,8 +33,6 @@ using FakeItEasy; using NUnit.Framework; using Spring.Core.IO; -using Spring.Core.TypeResolution; -using Spring.Expressions; using Spring.Objects.Factory.Config; using Spring.Objects.Factory.Support; using Spring.Util; @@ -1830,7 +1827,7 @@ namespace Spring.Objects.Factory.Xml [Test] public void TestExpressionAttribute() { - TypeRegistry.RegisterType("WebMethod", typeof(WebMethodAttribute)); + Spring.Core.TypeResolution.TypeRegistry.RegisterType("WebMethod", typeof(WebMethodAttribute)); IResource resource = new ReadOnlyXmlTestResource("expressions.xml", GetType()); XmlObjectFactory xof = new XmlObjectFactory(resource); @@ -1838,8 +1835,8 @@ namespace Spring.Objects.Factory.Xml ExpressionTestObject eto = (ExpressionTestObject) xof.GetObject("to1"); Assert.AreEqual(new DateTime(1974, 8, 24).ToString("m"), eto.SomeString); Assert.AreEqual(new DateTime(2004, 8, 14), eto.SomeDate); - Assert.IsInstanceOf(typeof(IExpression), eto.ExpressionOne); - Assert.IsInstanceOf(typeof(IExpression), eto.ExpressionTwo); + Assert.IsInstanceOf(typeof(Spring.Expressions.IExpression), eto.ExpressionOne); + Assert.IsInstanceOf(typeof(Spring.Expressions.IExpression), eto.ExpressionTwo); Assert.AreEqual(DateTime.Today, eto.ExpressionOne.GetValue()); Assert.AreEqual(String.Empty, eto.ExpressionTwo.GetValue()); Assert.IsInstanceOf(typeof(WebMethodAttribute), eto.SomeDictionary["method1"]); @@ -1851,7 +1848,7 @@ namespace Spring.Objects.Factory.Xml [Test] public void TestExpressionElement() { - TypeRegistry.RegisterType("WebMethod", typeof(WebMethodAttribute)); + Spring.Core.TypeResolution.TypeRegistry.RegisterType("WebMethod", typeof(WebMethodAttribute)); IResource resource = new ReadOnlyXmlTestResource("expressions.xml", GetType()); XmlObjectFactory xof = new XmlObjectFactory(resource); @@ -1859,8 +1856,8 @@ namespace Spring.Objects.Factory.Xml ExpressionTestObject eto = (ExpressionTestObject)xof.GetObject("to2"); Assert.AreEqual(new DateTime(1974, 8, 24).ToString("m"), eto.SomeString); Assert.AreEqual(new DateTime(2004, 8, 14), eto.SomeDate); - Assert.IsInstanceOf(typeof(IExpression), eto.ExpressionOne); - Assert.IsInstanceOf(typeof(IExpression), eto.ExpressionTwo); + Assert.IsInstanceOf(typeof(Spring.Expressions.IExpression), eto.ExpressionOne); + Assert.IsInstanceOf(typeof(Spring.Expressions.IExpression), eto.ExpressionTwo); Assert.AreEqual(DateTime.Today, eto.ExpressionOne.GetValue()); Assert.AreEqual(String.Empty, eto.ExpressionTwo.GetValue()); Assert.IsInstanceOf(typeof(WebMethodAttribute), eto.SomeDictionary["method1"]); @@ -2052,4 +2049,4 @@ namespace Spring.Objects.Factory.Xml } -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Core.Tests/Reflection/Dynamic/DynamicFieldTests.cs b/test/Spring/Spring.Core.Tests/Reflection/Dynamic/DynamicFieldTests.cs index a7249026..0c4614d1 100644 --- a/test/Spring/Spring.Core.Tests/Reflection/Dynamic/DynamicFieldTests.cs +++ b/test/Spring/Spring.Core.Tests/Reflection/Dynamic/DynamicFieldTests.cs @@ -18,18 +18,13 @@ #endregion -#region Imports - using System; using System.Diagnostics; using System.Reflection; -using System.Security; using NUnit.Framework; using Spring.Context.Support; -#endregion - namespace Spring.Reflection.Dynamic { /// @@ -157,7 +152,7 @@ namespace Spring.Reflection.Dynamic }); Assert.Fail("private field must not be accessible in medium trust: " + fieldInfo); } - catch (SecurityException sex) + catch (System.Security.SecurityException sex) { Assert.IsTrue( sex.Message.IndexOf("ReflectionPermission") > -1 ); } diff --git a/test/Spring/Spring.Core.Tests/Reflection/Dynamic/DynamicMethodTests.cs b/test/Spring/Spring.Core.Tests/Reflection/Dynamic/DynamicMethodTests.cs index 2ca90dd8..c4cc6640 100644 --- a/test/Spring/Spring.Core.Tests/Reflection/Dynamic/DynamicMethodTests.cs +++ b/test/Spring/Spring.Core.Tests/Reflection/Dynamic/DynamicMethodTests.cs @@ -18,19 +18,14 @@ #endregion -#region Imports - using System; using System.Collections; using System.Diagnostics; using System.Reflection; -using System.Threading; using NUnit.Framework; using Spring.Context.Support; using Spring.Util; -#endregion - namespace Spring.Reflection.Dynamic { /// @@ -94,7 +89,7 @@ namespace Spring.Reflection.Dynamic [Test] public void CanCreateWithRestrictedPermissions() { - SecurityTemplate.MediumTrustInvoke(new ThreadStart(CanCreateWithRestrictedPermissionsImpl)); + SecurityTemplate.MediumTrustInvoke(new System.Threading.ThreadStart(CanCreateWithRestrictedPermissionsImpl)); } private void CanCreateWithRestrictedPermissionsImpl() @@ -107,7 +102,7 @@ namespace Spring.Reflection.Dynamic [Test] public void CanCreatePrivateMethodButThrowsOnInvoke() { - SecurityTemplate.MediumTrustInvoke(new ThreadStart(CanCreatePrivateMethodButThrowsOnInvokeImpl)); + SecurityTemplate.MediumTrustInvoke(new System.Threading.ThreadStart(CanCreatePrivateMethodButThrowsOnInvokeImpl)); } private void CanCreatePrivateMethodButThrowsOnInvokeImpl() @@ -200,13 +195,13 @@ namespace Spring.Reflection.Dynamic Assert.IsNull(dm.Invoke(null, null)); // this is ok try { - dm.Invoke(null); // this is not ok + dm.Invoke(null); // this is not ok Assert.Fail(); } catch (ArgumentException) { } try { - dm.Invoke(null, null, null); // this is not ok + dm.Invoke(null, null, null); // this is not ok Assert.Fail(); } catch (ArgumentException) { } diff --git a/test/Spring/Spring.Core.Tests/Reflection/Dynamic/SafePropertyTests.cs b/test/Spring/Spring.Core.Tests/Reflection/Dynamic/SafePropertyTests.cs index dba33288..20e41389 100644 --- a/test/Spring/Spring.Core.Tests/Reflection/Dynamic/SafePropertyTests.cs +++ b/test/Spring/Spring.Core.Tests/Reflection/Dynamic/SafePropertyTests.cs @@ -1,7 +1,7 @@ #region License /* - * Copyright © 2002-2011 the original author or authors. + * Copyright � 2002-2011 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. @@ -18,22 +18,17 @@ #endregion -#region Imports - using System; using System.CodeDom.Compiler; using System.IO; using System.Reflection; using System.Text; using NUnit.Framework; -using Spring.Util; - -#endregion namespace Spring.Reflection.Dynamic { /// - /// Unit tests for the SafeProperty class. SafeProperty must pass the same tests + /// Unit tests for the SafeProperty class. SafeProperty must pass the same tests /// as DynamicField plus tests for accessing private members. /// /// Erich Eichinger @@ -48,7 +43,7 @@ namespace Spring.Reflection.Dynamic #if NETCOREAPP private bool CanGenerateVisualBasic => false; #else - private bool CanGenerateVisualBasic => SystemUtils.MonoRuntime; + private bool CanGenerateVisualBasic => Spring.Util.SystemUtils.MonoRuntime; #endif [Test] @@ -127,11 +122,11 @@ namespace Spring.Reflection.Dynamic Assert.AreEqual(2, second.GetValue(something)); //this should not cause MethodAccessException because "second" is created using "CreateSafe" second.SetValue(something, 123); - + Assert.AreEqual(123, second.GetValue(something)); } - [Test] + [Test] public void TestForRestrictiveGetterWithSafeWrapper() { Something something = new Something(); @@ -140,12 +135,12 @@ namespace Spring.Reflection.Dynamic //this should be ok, because both get and set of the "Third" property are public third.SetValue(something, 456); Assert.AreEqual(456, third.GetValue(something)); - + IDynamicProperty first = Create(typeof(Something).GetProperty("First")); first.SetValue(something, 123); //this should not cause MethodAccessException, "first" is createtd using "CreateSafe" Assert.AreEqual(123, first.GetValue(something)); - } + } #region VB TestClass Code @@ -279,4 +274,4 @@ namespace Spring.Reflection.Dynamic #endregion -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Core.Tests/Util/ReflectionUtilsMemberwiseCopyTests.cs b/test/Spring/Spring.Core.Tests/Util/ReflectionUtilsMemberwiseCopyTests.cs index d6735cd1..0257c47e 100644 --- a/test/Spring/Spring.Core.Tests/Util/ReflectionUtilsMemberwiseCopyTests.cs +++ b/test/Spring/Spring.Core.Tests/Util/ReflectionUtilsMemberwiseCopyTests.cs @@ -1,6 +1,4 @@ using System; -using System.Threading; -using System.Web; using NUnit.Framework; namespace Spring.Util @@ -57,7 +55,7 @@ namespace Spring.Util SampleBaseClass i1 = new SampleDerivedClass("1st config val"); SampleBaseClass i2 = new SampleFurtherDerivedClass("2nd config val"); - SecurityTemplate.MediumTrustInvoke(new ThreadStart(new CopyCommand(i2, i1).Execute)); + SecurityTemplate.MediumTrustInvoke(new System.Threading.ThreadStart(new CopyCommand(i2, i1).Execute)); Assert.AreEqual(i1, i2); } @@ -65,11 +63,11 @@ namespace Spring.Util public void MediumTrustThrowsSecurityExceptionWhenCopyingBetweenTypesFromDifferentModules() { Exception e1 = new Exception("my name is e1"); - HttpException e2 = new HttpException("my name is e2"); + var e2 = new System.Web.HttpException("my name is e2"); // I know, I am a bit paranoid about that basic assumption Assert.AreNotEqual( e1.GetType().Assembly, e2.GetType().Assembly ); - SecurityTemplate.MediumTrustInvoke(new ThreadStart(new CopyCommand(e2, e1).Execute)); + SecurityTemplate.MediumTrustInvoke(new System.Threading.ThreadStart(new CopyCommand(e2, e1).Execute)); Assert.AreEqual(e1.Message, e2.Message); } #endif @@ -91,9 +89,9 @@ namespace Spring.Util } } } - + #region Test Support Classes - + public class SampleBaseClass { private const string MyConstant = "SampleBaseClass.MyConstant"; @@ -122,7 +120,7 @@ namespace Spring.Util return false; if (ReferenceEquals(this , obj)) return true; - + SampleBaseClass sampleBaseClass = (SampleBaseClass) obj; if (!Equals(_someReadOnlyVal, sampleBaseClass._someReadOnlyVal)) return false; if (!Equals(_someProtectedReadOnlyVal, sampleBaseClass._someProtectedReadOnlyVal)) return false; @@ -130,7 +128,7 @@ namespace Spring.Util return true; } } - + public class SampleDerivedClass : SampleBaseClass { private string _someConfigVal = "SampleDerivedClass.SomeConfigVal"; @@ -147,22 +145,22 @@ namespace Spring.Util public override bool Equals(object obj) { - if (!base.Equals(obj)) + if (!base.Equals(obj)) return false; - + SampleDerivedClass sampleDerivedClass = (SampleDerivedClass)obj; if (!Equals(_someConfigVal, sampleDerivedClass._someConfigVal)) return false; return true; } } - + public class SampleFurtherDerivedClass : SampleDerivedClass { public SampleFurtherDerivedClass(string someConfigVal) : base(someConfigVal) { } } - - #endregion -} \ No newline at end of file + + #endregion +} diff --git a/test/Spring/Spring.Core.Tests/Util/ReflectionUtilsTests.cs b/test/Spring/Spring.Core.Tests/Util/ReflectionUtilsTests.cs index 100802a2..919e4561 100644 --- a/test/Spring/Spring.Core.Tests/Util/ReflectionUtilsTests.cs +++ b/test/Spring/Spring.Core.Tests/Util/ReflectionUtilsTests.cs @@ -18,14 +18,11 @@ #endregion -#region Imports - using System; using System.Collections; using System.Collections.Generic; using System.Reflection; using System.Reflection.Emit; -using System.Threading; using System.Runtime.CompilerServices; using NUnit.Framework; @@ -33,8 +30,6 @@ using Spring.Objects; using Spring.Objects.Factory; using Spring.Objects.Factory.Attributes; -#endregion - [assembly: InternalsVisibleTo("ReflectionUtils.IsTypeVisible.AssemblyTestName")] namespace Spring.Util @@ -1314,7 +1309,7 @@ namespace Spring.Util { AssemblyName assemblyName = new AssemblyName(); assemblyName.Name = "AnAssembly"; - AssemblyBuilder asmBuilder = Thread.GetDomain().DefineDynamicAssembly( + AssemblyBuilder asmBuilder = System.Threading.Thread.GetDomain().DefineDynamicAssembly( assemblyName, AssemblyBuilderAccess.Run); ModuleBuilder modBuilder = asmBuilder.DefineDynamicModule("AModule"); TypeBuilder classBuilder = modBuilder.DefineType("AClass", TypeAttributes.Public); @@ -1643,4 +1638,4 @@ namespace Spring.Util } #endregion -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Data.NHibernate5.Integration.Tests/Data/NHibernate/Bytecode/AbstractInjectableUserTypeFixture.cs b/test/Spring/Spring.Data.NHibernate5.Integration.Tests/Data/NHibernate/Bytecode/AbstractInjectableUserTypeFixture.cs index 867725f4..d9d7dfbf 100644 --- a/test/Spring/Spring.Data.NHibernate5.Integration.Tests/Data/NHibernate/Bytecode/AbstractInjectableUserTypeFixture.cs +++ b/test/Spring/Spring.Data.NHibernate5.Integration.Tests/Data/NHibernate/Bytecode/AbstractInjectableUserTypeFixture.cs @@ -1,5 +1,3 @@ -using log4net.Config; - using NHibernate; using NHibernate.Bytecode; using NHibernate.Cfg; diff --git a/test/Spring/Spring.Data.Tests/Data/Common/DbProviderFactoryTests.cs b/test/Spring/Spring.Data.Tests/Data/Common/DbProviderFactoryTests.cs index 121ed897..1196308a 100644 --- a/test/Spring/Spring.Data.Tests/Data/Common/DbProviderFactoryTests.cs +++ b/test/Spring/Spring.Data.Tests/Data/Common/DbProviderFactoryTests.cs @@ -2,13 +2,13 @@ /* * Copyright © 2002-2011 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. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -19,10 +19,7 @@ #endregion using System; -using System.Collections.Generic; -using System.Globalization; using System.Reflection; -using System.Threading; using NUnit.Framework; @@ -85,7 +82,7 @@ namespace Spring.Data.Common #else const string providerName = "SqlServer-2.0"; #endif - + AsyncTestTask t1 = new AsyncTestDbProviderFactory(1000, providerName).Start(); AsyncTestTask t2 = new AsyncTestDbProviderFactory(1000, providerName).Start(); AsyncTestTask t3 = new AsyncTestDbProviderFactory(1000, providerName).Start(); @@ -117,10 +114,10 @@ namespace Spring.Data.Common [Test] public void DefaultInstanceWithSqlServer20() { - Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", false); - //IApplicationContext ctx = DbProviderFactory.ApplicationContext; + System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US", false); + //IApplicationContext ctx = DbProviderFactory.ApplicationContext; //Assert.IsNotNull(ctx); - Thread.CurrentThread.CurrentCulture = new CultureInfo("tr-TR", false); + System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("tr-TR", false); IDbProvider provider = DbProviderFactory.GetDbProvider("SqlServer-2.0"); AssertIsSqlServer2005(provider); provider = DbProviderFactory.GetDbProvider("System.Data.SqlClient"); @@ -257,7 +254,7 @@ namespace Spring.Data.Common { IDbProvider provider = DbProviderFactory.GetDbProvider(providerName); Assert.AreEqual(productName, provider.DbMetadata.ProductName); - + var command = provider.CreateCommand(); Assert.IsNotNull(command); @@ -286,7 +283,7 @@ namespace Spring.Data.Common Assert.AreEqual("MySQL, MySQL provider 1.0.7.30072", provider.DbMetadata.ProductName); } - + */ private void AssertIsSqlServer2005(IDbProvider provider) @@ -314,4 +311,4 @@ namespace Spring.Data.Common Assert.IsFalse(Array.IndexOf(codes.BadSqlGrammarCodes, "1xx56") >= 0); } } -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Data.Tests/Transaction/Interceptor/TransactionAttributeEditorTests.cs b/test/Spring/Spring.Data.Tests/Transaction/Interceptor/TransactionAttributeEditorTests.cs index e4e1ebae..f9785aa1 100644 --- a/test/Spring/Spring.Data.Tests/Transaction/Interceptor/TransactionAttributeEditorTests.cs +++ b/test/Spring/Spring.Data.Tests/Transaction/Interceptor/TransactionAttributeEditorTests.cs @@ -1,6 +1,5 @@ using System; using System.Data; -using System.Runtime.Remoting; using NUnit.Framework; namespace Spring.Transaction.Interceptor @@ -75,10 +74,10 @@ namespace Spring.Transaction.Interceptor Assert.IsTrue( ta.TransactionIsolationLevel == IsolationLevel.RepeatableRead ); Assert.IsTrue( ta.TransactionTimeout == 10 ); Assert.IsFalse( ta.ReadOnly ); - Assert.IsTrue( ta.RollbackOn( new SystemException( ) ) ); + Assert.IsTrue( ta.RollbackOn(new SystemException( ) ) ); // Check for our bizarre customized rollback rules - Assert.IsTrue( ta.RollbackOn( new DataException( ) ) ); - Assert.IsTrue( !ta.RollbackOn( new RemotingException( ) ) ); + Assert.IsTrue( ta.RollbackOn(new DataException( ) ) ); + Assert.IsTrue( !ta.RollbackOn(new System.Runtime.Remoting.RemotingException( ) ) ); } [Test] @@ -94,8 +93,8 @@ namespace Spring.Transaction.Interceptor Assert.IsTrue( ta.ReadOnly ); Assert.IsTrue( ta.RollbackOn( new SystemException( ) ) ); // Check for our bizarre customized rollback rules - Assert.IsFalse( ta.RollbackOn( new DataException( ) ) ); - Assert.IsTrue( ta.RollbackOn( new RemotingException( ) ) ); + Assert.IsFalse( ta.RollbackOn(new DataException( ) ) ); + Assert.IsTrue( ta.RollbackOn(new System.Runtime.Remoting.RemotingException( ) ) ); } #endif @@ -147,7 +146,7 @@ namespace Spring.Transaction.Interceptor Assert.IsTrue( ta.ReadOnly ); Assert.IsTrue(ta.RollbackOn(new ArgumentException())); Assert.IsFalse( ta.RollbackOn(new IllegalTransactionStateException())); - + source.ClearRollbackRules(); Assert.IsFalse( ta == source ); source.AddRollbackRule( new RollbackRuleAttribute("ArgumentException")); @@ -155,4 +154,4 @@ namespace Spring.Transaction.Interceptor Assert.AreEqual( ta, source ); } } -} \ No newline at end of file +} diff --git a/test/Spring/Spring.Messaging.Nms.Tests/Messaging/Nms/Connections/CachedSessionTests.cs b/test/Spring/Spring.Messaging.Nms.Tests/Messaging/Nms/Connections/CachedSessionTests.cs index 914f6903..bdd532c3 100644 --- a/test/Spring/Spring.Messaging.Nms.Tests/Messaging/Nms/Connections/CachedSessionTests.cs +++ b/test/Spring/Spring.Messaging.Nms.Tests/Messaging/Nms/Connections/CachedSessionTests.cs @@ -21,7 +21,6 @@ using System.Collections.Generic; using Apache.NMS; using NUnit.Framework; -using Spring.Collections; namespace Spring.Messaging.Nms.Connections { diff --git a/test/Spring/Spring.Messaging.Nms.Tests/Messaging/Nms/Connections/UserCredentialsConnectionFactoryAdapterTests.cs b/test/Spring/Spring.Messaging.Nms.Tests/Messaging/Nms/Connections/UserCredentialsConnectionFactoryAdapterTests.cs index 5f3f38e3..0302d670 100644 --- a/test/Spring/Spring.Messaging.Nms.Tests/Messaging/Nms/Connections/UserCredentialsConnectionFactoryAdapterTests.cs +++ b/test/Spring/Spring.Messaging.Nms.Tests/Messaging/Nms/Connections/UserCredentialsConnectionFactoryAdapterTests.cs @@ -1,8 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; +using System.Threading; using Apache.NMS; using FakeItEasy; using NUnit.Framework; diff --git a/test/Spring/Spring.Services.Tests/ServiceModel/Config/ChannelFactoryObjectDefinitionParserTests.cs b/test/Spring/Spring.Services.Tests/ServiceModel/Config/ChannelFactoryObjectDefinitionParserTests.cs index 699a65c3..1dcce588 100644 --- a/test/Spring/Spring.Services.Tests/ServiceModel/Config/ChannelFactoryObjectDefinitionParserTests.cs +++ b/test/Spring/Spring.Services.Tests/ServiceModel/Config/ChannelFactoryObjectDefinitionParserTests.cs @@ -20,7 +20,6 @@ #region Imports -using System.Collections.Generic; using System.ServiceModel; using Spring.Context;