You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jg...@apache.org on 2008/10/31 20:13:11 UTC

svn commit: r709535 - in /activemq/activemq-dotnet/Apache.NMS.WCF/trunk: ./ src/main/csharp/ src/main/csharp/Configuration/ src/test/csharp/ vendor/

Author: jgomes
Date: Fri Oct 31 12:13:10 2008
New Revision: 709535

URL: http://svn.apache.org/viewvc?rev=709535&view=rev
Log:
Auto-format all source files.
Removed all Console.WriteLin() statements and replaced them with equivalent Tracer calls.
Fixed NAnt script integration with Visual Studio.
Fixed NAnt script to only build .NET 3.5 version of assembly, since that is the only supported platform.

Modified:
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/   (props changed)
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/AsyncResult.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/CommonAssemblyInfo.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsBinding.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsBindingElement.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsTransportBindingElement.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsTransportElement.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/ConnectionFactoryManager.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/InputQueue.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsAsyncResult.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelBase.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelFactory.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelHelper.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelListener.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputChannel.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsOutputChannel.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/test/csharp/CommonAssemblyInfo.cs
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/vendor/   (props changed)
    activemq/activemq-dotnet/Apache.NMS.WCF/trunk/vs2008-nms-wcf.csproj

Propchange: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Oct 31 12:13:10 2008
@@ -0,0 +1 @@
+vendor

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/nant.build Fri Oct 31 12:13:10 2008
@@ -15,15 +15,15 @@
 	See the License for the specific language governing permissions and
 	limitations under the License.
 -->
-<project name="Apache.NMS.ActiveMQ.WCF" default="compile-all" xmlns="http://nant.sourceforge.net/release/0.85/nant.xsd">
+<project name="Apache.NMS.WCF" default="default" xmlns="http://nant.sourceforge.net/release/0.85/nant.xsd">
 
 	<!-- ============================================================================================ -->
 	<!--      I N I T I A L I Z A T I O N                                                             -->
 	<!-- ============================================================================================ -->
 	<property name="basedir" value="${project::get-base-directory()}"/>
-	<property name="project.name" value="Apache.NMS.ActiveMQ.WCF"/>
+	<property name="project.name" value="Apache.NMS.WCF"/>
 	<property name="project.group" value="org.apache.activemq"/>
-	<property name="project.version"  value="1.1.0" unless="${property::exists('project.version')}"/>
+	<property name="project.version"  value="1.0.0" unless="${property::exists('project.version')}"/>
 	<property name="project.short_description" value="WCF Provider for ActiveMQ Class Library"/>
 	<property name="project.description" value="WCF Provider for ActiveMQ Class Library (.Net Messaging Library Implementation): An implementation of Windows Communications Framework API for ActiveMQ"/>
 
@@ -34,20 +34,32 @@
 	<property name="Apache.NMS.pdb" value="${basedir}/vendor/Apache.NMS/${current.build.framework}/Apache.NMS.pdb" dynamic="true"/>
 	<property name="Apache.NMS.Test.dll" value="${basedir}/vendor/Apache.NMS/${current.build.framework}//Apache.NMS.Test.dll" dynamic="true"/>
 	<property name="Apache.NMS.Test.pdb" value="${basedir}/vendor/Apache.NMS/${current.build.framework}/Apache.NMS.Test.pdb" dynamic="true"/>
-	<property name="Apache.NMS.ActiveMQ.dll" value="${basedir}/vendor/Apache.NMS.ActiveMQ/${current.build.framework}/Apache.NMS.ActiveMQ.dll" dynamic="true"/>
-	<property name="Apache.NMS.ActiveMQ.pdb" value="${basedir}/vendor/Apache.NMS.ActiveMQ/${current.build.framework}/Apache.NMS.ActiveMQ.pdb" dynamic="true"/>
-	<property name="Apache.NMS.ActiveMQ.Test.dll" value="${basedir}/vendor/Apache.NMS.ActiveMQ/${current.build.framework}/Apache.NMS.ActiveMQ.Test.dll" dynamic="true"/>
-	<property name="Apache.NMS.ActiveMQ.Test.pdb" value="${basedir}/vendor/Apache.NMS.ActiveMQ/${current.build.framework}/Apache.NMS.ActiveMQ.Test.pdb" dynamic="true"/>
+
+	<!-- Skip certain frameworks, since ActiveMQ.NET Client is not supported on those platforms. -->
+	<property name="build.net-1.1.skip" value="true"/>
+	<property name="build.net-2.0.skip" value="true"/>
+	<property name="build.mono-2.0.skip" value="true"/>
+	<property name="build.netcf-2.0.skip" value="true"/>
+
+	<target name="vendor-init" description="Initializes Vendor library from local repository.">
+		<!-- Vendor specific info.  The prefix of 'vendor.apache.org' is taken from the property
+		     'vendor.fileset.names'.  This comma-delimited list is iterated, and properties with
+		     well-known suffixes are used to access and copy down vendor file dependencies. -->
+		<property name="vendor.fileset.names" value="vendor.apache.org"/>
+
+		<!-- Property grouping for 'vendor.apache.org' -->
+		<property name="vendor.apache.org.name" value="Apache.NMS"/>
+		<property name="vendor.apache.org.group" value="org.apache.activemq"/>
+		<property name="vendor.apache.org.version" value="1.1.0"/>
+		<property name="vendor.apache.org.filenames"
+					value="Apache.NMS.dll,Apache.NMS.pdb,Apache.NMS.dll.mdb,Apache.NMS.Test.dll,Apache.NMS.Test.pdb,Apache.NMS.Test.dll.mdb" />
+	</target>
 
 	<target name="dependency-init" description="Initializes build dependencies">
 		<if test="${not file::exists(Apache.NMS.dll)}">
 			<echo message="Apache.NMS assembly for ${current.build.framework.name} is not available. Build skipped." />
 			<property name="build.skip" value="true"/>
 		</if>
-		<if test="${not file::exists(Apache.NMS.ActiveMQ.dll)}">
-			<echo message="Apache.NMS.ActiveMQ assembly for ${current.build.framework.name} is not available. Build skipped." />
-			<property name="build.skip" value="true"/>
-		</if>
 
 		<property name="net-3.0-referencepath" value="${environment::get-folder-path('ProgramFiles')}\Reference Assemblies\Microsoft\Framework\v3.0\" />
 		<property name="net-3.0-installed" value="${directory::exists(net-3.0-referencepath)}" />
@@ -61,7 +73,6 @@
 			<include name="System.Web.Services.dll" asis="true"/>
 			<include name="System.Xml.dll" asis="true"/>
 			<include name="${Apache.NMS.dll}" asis="true"/>
-			<include name="${Apache.NMS.ActiveMQ.dll}" asis="true"/>
 		</assemblyfileset>
 
 		<assemblyfileset failonempty="true" id="test.dependencies">
@@ -74,7 +85,6 @@
 			<include name="System.Xml.dll" asis="true"/>
 			<include name="${Apache.NMS.dll}"/>
 			<include name="${Apache.NMS.Test.dll}"/>
-			<include name="${Apache.NMS.ActiveMQ.dll}"/>
 			<include name="${build.bin.dir}/${project.name}.dll"/>
 			<include name="${nunit.dll}"/>
 			<include name="${nunit.extensions.dll}"/>
@@ -83,38 +93,36 @@
 		<fileset id="content.filenames">
 			<include name="LICENSE.txt"/>
 			<include name="NOTICE.txt"/>
-			<include name="nmsprovider-*.config"/>
 			<include name="${Apache.NMS.dll}"/>
 			<include name="${Apache.NMS.pdb}"/>
 			<include name="${Apache.NMS.Test.dll}"/>
 			<include name="${Apache.NMS.Test.pdb}"/>
-			<include name="${Apache.NMS.ActiveMQ.dll}"/>
-			<include name="${Apache.NMS.ActiveMQ.pdb}"/>
-			<include name="${Apache.NMS.ActiveMQ.Test.dll}"/>
-			<include name="${Apache.NMS.ActiveMQ.Test.pdb}"/>
 			<include name="${nunit.dll}"/>
 			<include name="${nunit.extensions.dll}"/>
 		</fileset>
 
 		<fileset id="install.filenames">
-			<include name="${project.name}.dll"/>
-			<include name="nmsprovider-*.config"/>
+			<include name="${build.bin.dir}/${project.name}.dll"/>
+			<include name="${build.bin.dir}/${project.name}.pdb"/>
 		</fileset>
 
 		<fileset id="deploy.filenames">
 			<include name="LICENSE.txt"/>
 			<include name="NOTICE.txt"/>
 			<include name="${build.bin.dir}/${project.name}.dll"/>
-			<include name="${build.bin.dir}/${project.name}.?db"/>
+			<include name="${build.bin.dir}/${project.name}.pdb"/>
+			<include name="${build.bin.dir}/${project.name}.dll.mdb"/>
 			<include name="${build.bin.dir}/${project.name}.xml"/>
 			<include name="${build.bin.dir}/${project.name}.Test.dll"/>
-			<include name="${build.bin.dir}/${project.name}.Test.?db"/>
+			<include name="${build.bin.dir}/${project.name}.Test.pdb"/>
+			<include name="${build.bin.dir}/${project.name}.Test.dll.mdb"/>
 			<include name="${build.bin.dir}/${project.name}.Test.xml"/>
-			<include name="${build.bin.dir}/nmsprovider-*.config"/>
 		</fileset>
 	</target>
 
+	<target name="default" depends="download-vendor-all, install-all" />
+
 	<!-- Load the common target definitions  -->
 	<include buildfile="${basedir}/nant-common.xml"/>
 
-</project>
\ No newline at end of file
+</project>

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/AsyncResult.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/AsyncResult.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/AsyncResult.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/AsyncResult.cs Fri Oct 31 12:13:10 2008
@@ -71,14 +71,14 @@
 		{
 			get
 			{
-				if (_manualResetEvent != null)
+				if(_manualResetEvent != null)
 				{
 					return _manualResetEvent;
 				}
 
-				lock (ThisLock)
+				lock(ThisLock)
 				{
-					if (_manualResetEvent == null)
+					if(_manualResetEvent == null)
 					{
 						_manualResetEvent = new ManualResetEvent(_isCompleted);
 					}
@@ -127,14 +127,14 @@
 		/// <param name="completedSynchronously">if set to <see langword="true"/> [completed synchronously].</param>
 		protected void Complete(bool completedSynchronously)
 		{
-			if (_isCompleted)
+			if(_isCompleted)
 			{
 				throw new InvalidOperationException("Cannot call Complete twice");
 			}
 
 			_completedSynchronously = completedSynchronously;
 
-			if (completedSynchronously)
+			if(completedSynchronously)
 			{
 				// If we completedSynchronously, then there's no chance that the manualResetEvent was created so
 				// we don't need to worry about a race
@@ -143,10 +143,10 @@
 			}
 			else
 			{
-				lock (ThisLock)
+				lock(ThisLock)
 				{
 					_isCompleted = true;
-					if (_manualResetEvent != null)
+					if(_manualResetEvent != null)
 					{
 						_manualResetEvent.Set();
 					}
@@ -154,7 +154,7 @@
 			}
 
 			// If the callback throws, there is an error in the callback implementation
-			if (_callback != null)
+			if(_callback != null)
 			{
 				_callback(this);
 			}
@@ -181,36 +181,36 @@
 		/// <returns></returns>
 		protected static TAsyncResult End<TAsyncResult>(IAsyncResult result) where TAsyncResult : AsyncResult
 		{
-			if (result == null)
+			if(result == null)
 			{
 				throw new ArgumentNullException("result");
 			}
 
 			TAsyncResult asyncResult = result as TAsyncResult;
 
-			if (asyncResult == null)
+			if(asyncResult == null)
 			{
 				throw new ArgumentException("Invalid async messageBody.", "result");
 			}
 
-			if (asyncResult._endCalled)
+			if(asyncResult._endCalled)
 			{
 				throw new InvalidOperationException("Async object already ended.");
 			}
 
 			asyncResult._endCalled = true;
 
-			if (!asyncResult._isCompleted)
+			if(!asyncResult._isCompleted)
 			{
 				asyncResult.AsyncWaitHandle.WaitOne();
 			}
 
-			if (asyncResult._manualResetEvent != null)
+			if(asyncResult._manualResetEvent != null)
 			{
 				asyncResult._manualResetEvent.Close();
 			}
 
-			if (asyncResult._exception != null)
+			if(asyncResult._exception != null)
 			{
 				throw asyncResult._exception;
 			}
@@ -229,7 +229,8 @@
 		/// </summary>
 		/// <param name="callback">The callback.</param>
 		/// <param name="state">The state.</param>
-		public CompletedAsyncResult(AsyncCallback callback, object state) : base(callback, state)
+		public CompletedAsyncResult(AsyncCallback callback, object state)
+			: base(callback, state)
 		{
 			Complete(true);
 		}
@@ -254,7 +255,8 @@
 		/// </summary>
 		/// <param name="callback">The callback.</param>
 		/// <param name="state">The state.</param>
-		protected TypedAsyncResult(AsyncCallback callback, object state) : base(callback, state)
+		protected TypedAsyncResult(AsyncCallback callback, object state)
+			: base(callback, state)
 		{
 		}
 
@@ -299,7 +301,8 @@
 		/// <param name="data">The data.</param>
 		/// <param name="callback">The callback.</param>
 		/// <param name="state">The state.</param>
-		public TypedCompletedAsyncResult(T data, AsyncCallback callback, object state) : base(callback, state)
+		public TypedCompletedAsyncResult(T data, AsyncCallback callback, object state)
+			: base(callback, state)
 		{
 			Complete(data, true);
 		}
@@ -312,7 +315,7 @@
 		public new static T End(IAsyncResult result)
 		{
 			TypedCompletedAsyncResult<T> completedResult = result as TypedCompletedAsyncResult<T>;
-			if (completedResult == null)
+			if(completedResult == null)
 			{
 				throw new ArgumentException("Invalid async messageBody.", "messageBody");
 			}

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/CommonAssemblyInfo.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/CommonAssemblyInfo.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/CommonAssemblyInfo.cs Fri Oct 31 12:13:10 2008
@@ -23,6 +23,6 @@
 [assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2008 Apache Software Foundation")]
 [assembly: AssemblyTrademarkAttribute("")]
 [assembly: AssemblyCultureAttribute("")]
-[assembly: AssemblyVersionAttribute("1.1.0")]
-[assembly: AssemblyInformationalVersionAttribute("1.1.0")]
+[assembly: AssemblyVersionAttribute("1.0.0")]
+[assembly: AssemblyInformationalVersionAttribute("1.0.0")]
 

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsBinding.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsBinding.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsBinding.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsBinding.cs Fri Oct 31 12:13:10 2008
@@ -50,7 +50,8 @@
 		/// The default transport is set to <see cref="NmsTransportBindingElement" />, while the
 		/// default message encoding is set to <see cref="TextMessageEncodingBindingElement" />.
 		/// </remarks>
-		public NmsBinding(string configurationName) : this()
+		public NmsBinding(string configurationName)
+			: this()
 		{
 			ApplyConfiguration(configurationName);
 		}
@@ -66,7 +67,7 @@
 		/// <value>The message element.</value>
 		public MessageEncodingBindingElement MessageElement
 		{
-			get { return _messageElement; } 
+			get { return _messageElement; }
 			set { _messageElement = value; }
 		}
 
@@ -85,7 +86,7 @@
 		/// </summary>
 		/// <value>The name of the destination.</value>
 		public string Destination
-		{ 
+		{
 			get { return _destination; }
 			set { _destination = value; }
 		}
@@ -141,9 +142,9 @@
 		/// <param name="configurationName">Name of the configuration.</param>
 		private void ApplyConfiguration(string configurationName)
 		{
-			NmsBindingCollection section = (NmsBindingCollection)ConfigurationManager.GetSection(NmsConstants.NmsBindingSectionName);
+			NmsBindingCollection section = (NmsBindingCollection) ConfigurationManager.GetSection(NmsConstants.NmsBindingSectionName);
 			NmsBindingElement element = section.Bindings[configurationName];
-			if (element == null)
+			if(element == null)
 			{
 				throw new ConfigurationErrorsException(String.Format(CultureInfo.CurrentCulture, "There is no binding named {0} at {1}.", configurationName, section.BindingName));
 			}

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsBindingElement.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsBindingElement.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsBindingElement.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsBindingElement.cs Fri Oct 31 12:13:10 2008
@@ -33,7 +33,8 @@
 		/// <summary>
 		/// Initializes a new instance of the <see cref="NmsBindingElement"/> class.
 		/// </summary>
-		public NmsBindingElement() : this(null)
+		public NmsBindingElement()
+			: this(null)
 		{
 		}
 
@@ -41,7 +42,8 @@
 		/// Initializes a new instance of the <see cref="NmsBindingElement"/> class.
 		/// </summary>
 		/// <param name="configurationName">Name of the configuration.</param>
-		public NmsBindingElement(string configurationName) : base(configurationName)
+		public NmsBindingElement(string configurationName)
+			: base(configurationName)
 		{
 		}
 
@@ -56,7 +58,7 @@
 		[ConfigurationProperty(NmsConfigurationStrings.Destination, IsRequired = true)]
 		public string Destination
 		{
-			get { return (string)base[NmsConfigurationStrings.Destination]; }
+			get { return (string) base[NmsConfigurationStrings.Destination]; }
 			set { base[NmsConfigurationStrings.Destination] = value; }
 		}
 
@@ -68,7 +70,7 @@
 		[ConfigurationProperty(NmsConfigurationStrings.DestinationType, DefaultValue = NmsConfigurationDefaults.Destination)]
 		public DestinationType DestinationType
 		{
-			get { return (DestinationType)Enum.Parse(typeof(DestinationType), base[NmsConfigurationStrings.DestinationType].ToString(), true); }
+			get { return (DestinationType) Enum.Parse(typeof(DestinationType), base[NmsConfigurationStrings.DestinationType].ToString(), true); }
 			set { base[NmsConfigurationStrings.DestinationType] = value; }
 		}
 
@@ -102,7 +104,7 @@
 		protected override void InitializeFrom(Binding binding)
 		{
 			base.InitializeFrom(binding);
-			NmsBinding nmsBinding = (NmsBinding)binding;
+			NmsBinding nmsBinding = (NmsBinding) binding;
 			Destination = nmsBinding.Destination;
 			DestinationType = nmsBinding.DestinationType;
 		}
@@ -113,17 +115,17 @@
 		/// <param name="binding">A binding.</param>
 		protected override void OnApplyConfiguration(Binding binding)
 		{
-			if (binding == null)
+			if(binding == null)
 			{
 				throw new ArgumentNullException("binding");
 			}
 
-			if (binding.GetType() != typeof(NmsBinding))
+			if(binding.GetType() != typeof(NmsBinding))
 			{
 				throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, "Invalid type for binding. Expected tpye: {0}. Type passed in: {1}.", typeof(NmsBinding).AssemblyQualifiedName, binding.GetType().AssemblyQualifiedName));
 			}
 
-			NmsBinding nmsBinding = (NmsBinding)binding;
+			NmsBinding nmsBinding = (NmsBinding) binding;
 			nmsBinding.Destination = Destination;
 			nmsBinding.DestinationType = DestinationType;
 		}

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsTransportBindingElement.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsTransportBindingElement.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsTransportBindingElement.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsTransportBindingElement.cs Fri Oct 31 12:13:10 2008
@@ -41,7 +41,6 @@
 		/// </summary>
 		public NmsTransportBindingElement()
 		{
-			Console.WriteLine(".");
 		}
 
 		/// <summary>
@@ -122,15 +121,15 @@
 		/// <exception cref="ArgumentException">the requested channel does not implement <see cref="IReplyChannel" />.</exception>
 		public override IChannelFactory<TChannel> BuildChannelFactory<TChannel>(BindingContext context)
 		{
-			if (context == null)
+			if(context == null)
 			{
 				throw new ArgumentNullException("context");
 			}
-			if (!CanBuildChannelFactory<TChannel>(context))
+			if(!CanBuildChannelFactory<TChannel>(context))
 			{
 				throw new ArgumentException(String.Format("Unsupported channel type: {0}.", typeof(TChannel).Name));
 			}
-			return (IChannelFactory<TChannel>)new NmsChannelFactory(this, context);
+			return (IChannelFactory<TChannel>) new NmsChannelFactory(this, context);
 		}
 
 		/// <summary>
@@ -141,15 +140,15 @@
 		/// <returns></returns>
 		public override IChannelListener<TChannel> BuildChannelListener<TChannel>(BindingContext context)
 		{
-			if (context == null)
+			if(context == null)
 			{
 				throw new ArgumentNullException("context");
 			}
-			if (!CanBuildChannelListener<TChannel>(context))
+			if(!CanBuildChannelListener<TChannel>(context))
 			{
 				throw new ArgumentException(String.Format("Unsupported channel type: {0}.", typeof(TChannel).Name));
 			}
-			return (IChannelListener<TChannel>)new NmsChannelListener(this, context);
+			return (IChannelListener<TChannel>) new NmsChannelListener(this, context);
 		}
 
 		/// <summary>
@@ -181,7 +180,7 @@
 		/// <returns></returns>
 		public override T GetProperty<T>(BindingContext context)
 		{
-			if (context == null)
+			if(context == null)
 			{
 				throw new ArgumentNullException("context");
 			}
@@ -212,7 +211,7 @@
 			BindingElementCollection bindingElements = context.Endpoint.Binding.CreateBindingElements();
 			MessageEncodingBindingElement encodingBindingElement = bindingElements.Find<MessageEncodingBindingElement>() ?? new TextMessageEncodingBindingElement();
 
-			if (context.WsdlPort != null)
+			if(context.WsdlPort != null)
 			{
 				AddAddressToWsdlPort(context.WsdlPort, context.Endpoint.Address, encodingBindingElement.MessageVersion.Addressing);
 			}
@@ -229,27 +228,27 @@
 		/// <param name="context">The <see cref="T:System.ServiceModel.Description.PolicyConversionContext" /> that you can use to insert your custom policy assertion.</param>
 		public void ExportPolicy(MetadataExporter exporter, PolicyConversionContext context)
 		{
-			if (exporter == null)
+			if(exporter == null)
 			{
 				throw new ArgumentNullException("exporter");
 			}
 
-			if (context == null)
+			if(context == null)
 			{
 				throw new ArgumentNullException("context");
 			}
 
 			bool createdNew = false;
 			MessageEncodingBindingElement encodingBindingElement = context.BindingElements.Find<MessageEncodingBindingElement>();
-			if (encodingBindingElement == null)
+			if(encodingBindingElement == null)
 			{
 				createdNew = true;
 				encodingBindingElement = new TextMessageEncodingBindingElement();
 			}
 
-			if (createdNew && encodingBindingElement is IPolicyExportExtension)
+			if(createdNew && encodingBindingElement is IPolicyExportExtension)
 			{
-				((IPolicyExportExtension)encodingBindingElement).ExportPolicy(exporter, context);
+				((IPolicyExportExtension) encodingBindingElement).ExportPolicy(exporter, context);
 			}
 
 			AddWSAddressingAssertion(context, encodingBindingElement.MessageVersion.Addressing);
@@ -263,7 +262,7 @@
 		/// <param name="addressing">The addressing.</param>
 		private static void AddAddressToWsdlPort(Port wsdlPort, EndpointAddress endpointAddress, AddressingVersion addressing)
 		{
-			if (addressing == AddressingVersion.None)
+			if(addressing == AddressingVersion.None)
 			{
 				return;
 			}
@@ -272,11 +271,11 @@
 			XmlWriter xmlWriter = XmlWriter.Create(memoryStream);
 			xmlWriter.WriteStartElement("temp");
 
-			if (addressing == AddressingVersion.WSAddressing10)
+			if(addressing == AddressingVersion.WSAddressing10)
 			{
 				xmlWriter.WriteAttributeString("xmlns", "wsa10", null, AddressingVersions.WSAddressing10NameSpace);
 			}
-			else if (addressing == AddressingVersion.WSAddressingAugust2004)
+			else if(addressing == AddressingVersion.WSAddressingAugust2004)
 			{
 				xmlWriter.WriteAttributeString("xmlns", "wsa", null, AddressingVersions.WSAddressingAugust2004NameSpace);
 			}
@@ -294,7 +293,7 @@
 			XmlReader xmlReader = XmlReader.Create(memoryStream);
 			xmlReader.MoveToContent();
 
-			XmlElement endpointReference = (XmlElement)XmlDoc.ReadNode(xmlReader).ChildNodes[0];
+			XmlElement endpointReference = (XmlElement) XmlDoc.ReadNode(xmlReader).ChildNodes[0];
 
 			wsdlPort.Extensions.Add(endpointReference);
 		}
@@ -308,15 +307,15 @@
 		{
 			XmlElement addressingAssertion;
 
-			if (addressing == AddressingVersion.WSAddressing10)
+			if(addressing == AddressingVersion.WSAddressing10)
 			{
 				addressingAssertion = XmlDoc.CreateElement("wsaw", "UsingAddressing", "http://www.w3.org/2006/05/addressing/wsdl");
 			}
-			else if (addressing == AddressingVersion.WSAddressingAugust2004)
+			else if(addressing == AddressingVersion.WSAddressingAugust2004)
 			{
 				addressingAssertion = XmlDoc.CreateElement("wsap", "UsingAddressing", AddressingVersions.WSAddressingAugust2004NameSpace + "/policy");
 			}
-			else if (addressing == AddressingVersion.None)
+			else if(addressing == AddressingVersion.None)
 			{
 				// do nothing
 				addressingAssertion = null;
@@ -326,7 +325,7 @@
 				throw new InvalidOperationException("This addressing version is not supported:\n" + addressing);
 			}
 
-			if (addressingAssertion != null)
+			if(addressingAssertion != null)
 			{
 				context.GetBindingAssertions().Add(addressingAssertion);
 			}
@@ -339,7 +338,7 @@
 		{
 			get
 			{
-				if (_xmlDocument == null)
+				if(_xmlDocument == null)
 				{
 					NameTable nameTable = new NameTable();
 					nameTable.Add("Policy");

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsTransportElement.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsTransportElement.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsTransportElement.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/Configuration/NmsTransportElement.cs Fri Oct 31 12:13:10 2008
@@ -16,9 +16,9 @@
  */
 
 using System;
+using System.Configuration;
 using System.ServiceModel.Channels;
 using System.ServiceModel.Configuration;
-using System.Configuration;
 
 namespace Apache.NMS.WCF
 {
@@ -36,8 +36,10 @@
 		[ConfigurationProperty(NmsConfigurationStrings.Destination, IsRequired = true)]
 		public string Destination
 		{
-			get { return (string)base[NmsConfigurationStrings.Destination]; }
-			set { base[NmsConfigurationStrings.Destination] = value; 
+			get { return (string) base[NmsConfigurationStrings.Destination]; }
+			set
+			{
+				base[NmsConfigurationStrings.Destination] = value;
 			}
 		}
 
@@ -49,7 +51,7 @@
 		[ConfigurationProperty(NmsConfigurationStrings.DestinationType, DefaultValue = NmsConfigurationDefaults.Destination)]
 		public DestinationType DestinationType
 		{
-			get { return (DestinationType)Enum.Parse(typeof(DestinationType), base[NmsConfigurationStrings.DestinationType].ToString(), true); }
+			get { return (DestinationType) Enum.Parse(typeof(DestinationType), base[NmsConfigurationStrings.DestinationType].ToString(), true); }
 			set { base[NmsConfigurationStrings.DestinationType] = value; }
 		}
 
@@ -93,7 +95,7 @@
 		{
 			base.ApplyConfiguration(bindingElement);
 
-			NmsTransportBindingElement nmsBindingElement = (NmsTransportBindingElement)bindingElement;
+			NmsTransportBindingElement nmsBindingElement = (NmsTransportBindingElement) bindingElement;
 			nmsBindingElement.Destination = Destination;
 			nmsBindingElement.DestinationType = DestinationType;
 		}
@@ -109,7 +111,7 @@
 		{
 			base.CopyFrom(from);
 
-			NmsTransportElement source = (NmsTransportElement)from;
+			NmsTransportElement source = (NmsTransportElement) from;
 			Destination = source.Destination;
 			DestinationType = source.DestinationType;
 		}
@@ -122,7 +124,7 @@
 		{
 			base.InitializeFrom(bindingElement);
 
-			NmsTransportBindingElement nmsBindingElement = (NmsTransportBindingElement)bindingElement;
+			NmsTransportBindingElement nmsBindingElement = (NmsTransportBindingElement) bindingElement;
 			Destination = nmsBindingElement.Destination;
 			DestinationType = nmsBindingElement.DestinationType;
 		}

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/ConnectionFactoryManager.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/ConnectionFactoryManager.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/ConnectionFactoryManager.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/ConnectionFactoryManager.cs Fri Oct 31 12:13:10 2008
@@ -16,9 +16,6 @@
  */
 
 using System;
-using Apache.NMS;
-using Apache.NMS.ActiveMQ;
-using System.Diagnostics;
 
 namespace Apache.NMS.WCF
 {
@@ -42,7 +39,7 @@
 		/// <returns></returns>
 		public static ConnectionFactoryManager GetInstance()
 		{
-			if (_instance == null)
+			if(_instance == null)
 			{
 				_instance = new ConnectionFactoryManager();
 			}
@@ -60,10 +57,10 @@
 		/// <returns></returns>
 		public IConnection CreateConnection(Uri connection)
 		{
-			lock (this)
+			lock(this)
 			{
-				Console.WriteLine("Connecting to {0}{1}{2}", connection.Scheme, Uri.SchemeDelimiter, connection.Authority);
-				primaryFactory = new ConnectionFactory(connection);
+				Tracer.InfoFormat("Connecting to {0}{1}{2}", connection.Scheme, Uri.SchemeDelimiter, connection.Authority);
+				primaryFactory = new NMSConnectionFactory(connection);
 				return primaryFactory.CreateConnection();
 			}
 		}

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/InputQueue.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/InputQueue.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/InputQueue.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/InputQueue.cs Fri Oct 31 12:13:10 2008
@@ -85,7 +85,7 @@
 		{
 			get
 			{
-				lock (ThisLock)
+				lock(ThisLock)
 				{
 					return itemQueue.ItemCount;
 				}
@@ -101,11 +101,11 @@
 		{
 			Item item = default(Item);
 
-			lock (ThisLock)
+			lock(ThisLock)
 			{
-				if (_queueState == QueueState.Open)
+				if(_queueState == QueueState.Open)
 				{
-					if (itemQueue.HasAvailableItem)
+					if(itemQueue.HasAvailableItem)
 					{
 						item = itemQueue.DequeueAvailableItem();
 					}
@@ -116,13 +116,13 @@
 						return reader;
 					}
 				}
-				else if (_queueState == QueueState.Shutdown)
+				else if(_queueState == QueueState.Shutdown)
 				{
-					if (itemQueue.HasAvailableItem)
+					if(itemQueue.HasAvailableItem)
 					{
 						item = itemQueue.DequeueAvailableItem();
 					}
-					else if (itemQueue.HasAnyItem)
+					else if(itemQueue.HasAnyItem)
 					{
 						AsyncQueueReader reader = new AsyncQueueReader(this, timeout, callback, state);
 						readerQueue.Enqueue(reader);
@@ -137,20 +137,20 @@
 
 		public IAsyncResult BeginWaitForItem(TimeSpan timeout, AsyncCallback callback, object state)
 		{
-			lock (ThisLock)
+			lock(ThisLock)
 			{
-				if (_queueState == QueueState.Open)
+				if(_queueState == QueueState.Open)
 				{
-					if (!itemQueue.HasAvailableItem)
+					if(!itemQueue.HasAvailableItem)
 					{
 						AsyncQueueWaiter waiter = new AsyncQueueWaiter(timeout, callback, state);
 						waiterList.Add(waiter);
 						return waiter;
 					}
 				}
-				else if (_queueState == QueueState.Shutdown)
+				else if(_queueState == QueueState.Shutdown)
 				{
-					if (!itemQueue.HasAvailableItem && itemQueue.HasAnyItem)
+					if(!itemQueue.HasAvailableItem && itemQueue.HasAnyItem)
 					{
 						AsyncQueueWaiter waiter = new AsyncQueueWaiter(timeout, callback, state);
 						waiterList.Add(waiter);
@@ -164,9 +164,9 @@
 
 		static void CompleteOutstandingReadersCallback(object state)
 		{
-			IQueueReader[] outstandingReaders = (IQueueReader[])state;
+			IQueueReader[] outstandingReaders = (IQueueReader[]) state;
 
-			for (int i = 0; i < outstandingReaders.Length; i++)
+			for(int i = 0; i < outstandingReaders.Length; i++)
 			{
 				outstandingReaders[i].Set(default(Item));
 			}
@@ -174,17 +174,17 @@
 
 		static void CompleteWaitersFalseCallback(object state)
 		{
-			CompleteWaiters(false, (IQueueWaiter[])state);
+			CompleteWaiters(false, (IQueueWaiter[]) state);
 		}
 
 		static void CompleteWaitersTrueCallback(object state)
 		{
-			CompleteWaiters(true, (IQueueWaiter[])state);
+			CompleteWaiters(true, (IQueueWaiter[]) state);
 		}
 
 		static void CompleteWaiters(bool itemAvailable, IQueueWaiter[] waiters)
 		{
-			for (int i = 0; i < waiters.Length; i++)
+			for(int i = 0; i < waiters.Length; i++)
 			{
 				waiters[i].Set(itemAvailable);
 			}
@@ -192,9 +192,9 @@
 
 		static void CompleteWaitersLater(bool itemAvailable, IQueueWaiter[] waiters)
 		{
-			if (itemAvailable)
+			if(itemAvailable)
 			{
-				if (completeWaitersTrueCallback == null)
+				if(completeWaitersTrueCallback == null)
 				{
 					completeWaitersTrueCallback = CompleteWaitersTrueCallback;
 				}
@@ -203,7 +203,7 @@
 			}
 			else
 			{
-				if (completeWaitersFalseCallback == null)
+				if(completeWaitersFalseCallback == null)
 				{
 					completeWaitersFalseCallback = CompleteWaitersFalseCallback;
 				}
@@ -214,7 +214,7 @@
 
 		void GetWaiters(out IQueueWaiter[] waiters)
 		{
-			if (waiterList.Count > 0)
+			if(waiterList.Count > 0)
 			{
 				waiters = waiterList.ToArray();
 				waiterList.Clear();
@@ -227,27 +227,27 @@
 
 		public void Close()
 		{
-			((IDisposable)this).Dispose();
+			((IDisposable) this).Dispose();
 		}
 
 		public void Shutdown()
 		{
 			IQueueReader[] outstandingReaders = null;
-			lock (ThisLock)
+			lock(ThisLock)
 			{
-				if (_queueState == QueueState.Shutdown)
+				if(_queueState == QueueState.Shutdown)
 				{
 					return;
 				}
 
-				if (_queueState == QueueState.Closed)
+				if(_queueState == QueueState.Closed)
 				{
 					return;
 				}
 
 				_queueState = QueueState.Shutdown;
 
-				if (readerQueue.Count > 0 && itemQueue.ItemCount == 0)
+				if(readerQueue.Count > 0 && itemQueue.ItemCount == 0)
 				{
 					outstandingReaders = new IQueueReader[readerQueue.Count];
 					readerQueue.CopyTo(outstandingReaders, 0);
@@ -255,11 +255,11 @@
 				}
 			}
 
-			if (outstandingReaders != null)
+			if(outstandingReaders != null)
 			{
-				for (int i = 0; i < outstandingReaders.Length; i++)
+				for(int i = 0; i < outstandingReaders.Length; i++)
 				{
-					outstandingReaders[i].Set(new Item((Exception)null, null));
+					outstandingReaders[i].Set(new Item((Exception) null, null));
 				}
 			}
 		}
@@ -268,7 +268,7 @@
 		{
 			T value;
 
-			if (!Dequeue(timeout, out value))
+			if(!Dequeue(timeout, out value))
 			{
 				throw new TimeoutException(string.Format("Dequeue timed out in {0}.", timeout));
 			}
@@ -281,11 +281,11 @@
 			WaitQueueReader reader = null;
 			Item item = new Item();
 
-			lock (ThisLock)
+			lock(ThisLock)
 			{
-				if (_queueState == QueueState.Open)
+				if(_queueState == QueueState.Open)
 				{
-					if (itemQueue.HasAvailableItem)
+					if(itemQueue.HasAvailableItem)
 					{
 						item = itemQueue.DequeueAvailableItem();
 					}
@@ -295,13 +295,13 @@
 						readerQueue.Enqueue(reader);
 					}
 				}
-				else if (_queueState == QueueState.Shutdown)
+				else if(_queueState == QueueState.Shutdown)
 				{
-					if (itemQueue.HasAvailableItem)
+					if(itemQueue.HasAvailableItem)
 					{
 						item = itemQueue.DequeueAvailableItem();
 					}
-					else if (itemQueue.HasAnyItem)
+					else if(itemQueue.HasAnyItem)
 					{
 						reader = new WaitQueueReader(this);
 						readerQueue.Enqueue(reader);
@@ -319,7 +319,7 @@
 				}
 			}
 
-			if (reader != null)
+			if(reader != null)
 			{
 				return reader.Wait(timeout, out value);
 			}
@@ -337,28 +337,28 @@
 
 		protected void Dispose(bool disposing)
 		{
-			if (disposing)
+			if(disposing)
 			{
 				bool dispose = false;
 
-				lock (ThisLock)
+				lock(ThisLock)
 				{
-					if (_queueState != QueueState.Closed)
+					if(_queueState != QueueState.Closed)
 					{
 						_queueState = QueueState.Closed;
 						dispose = true;
 					}
 				}
 
-				if (dispose)
+				if(dispose)
 				{
-					while (readerQueue.Count > 0)
+					while(readerQueue.Count > 0)
 					{
 						IQueueReader reader = readerQueue.Dequeue();
 						reader.Set(default(Item));
 					}
 
-					while (itemQueue.HasAnyItem)
+					while(itemQueue.HasAnyItem)
 					{
 						Item item = itemQueue.DequeueAnyItem();
 						item.Dispose();
@@ -376,21 +376,21 @@
 			IQueueWaiter[] waiters = null;
 			bool itemAvailable = true;
 
-			lock (ThisLock)
+			lock(ThisLock)
 			{
 				itemAvailable = !((_queueState == QueueState.Closed) || (_queueState == QueueState.Shutdown));
 				GetWaiters(out waiters);
 
-				if (_queueState != QueueState.Closed)
+				if(_queueState != QueueState.Closed)
 				{
 					itemQueue.MakePendingItemAvailable();
 
-					if (readerQueue.Count > 0)
+					if(readerQueue.Count > 0)
 					{
 						item = itemQueue.DequeueAvailableItem();
 						reader = readerQueue.Dequeue();
 
-						if (_queueState == QueueState.Shutdown && readerQueue.Count > 0 && itemQueue.ItemCount == 0)
+						if(_queueState == QueueState.Shutdown && readerQueue.Count > 0 && itemQueue.ItemCount == 0)
 						{
 							outstandingReaders = new IQueueReader[readerQueue.Count];
 							readerQueue.CopyTo(outstandingReaders, 0);
@@ -402,20 +402,20 @@
 				}
 			}
 
-			if (outstandingReaders != null)
+			if(outstandingReaders != null)
 			{
-				if (completeOutstandingReadersCallback == null)
+				if(completeOutstandingReadersCallback == null)
 					completeOutstandingReadersCallback = CompleteOutstandingReadersCallback;
 
 				ThreadPool.QueueUserWorkItem(completeOutstandingReadersCallback, outstandingReaders);
 			}
 
-			if (waiters != null)
+			if(waiters != null)
 			{
 				CompleteWaitersLater(itemAvailable, waiters);
 			}
 
-			if (reader != null)
+			if(reader != null)
 			{
 				InvokeDequeuedCallback(item.DequeuedCallback);
 				reader.Set(item);
@@ -427,7 +427,7 @@
 		{
 			T value;
 
-			if (!EndDequeue(result, out value))
+			if(!EndDequeue(result, out value))
 			{
 				throw new TimeoutException("Asynchronous Dequeue operation timed out.");
 			}
@@ -439,7 +439,7 @@
 		{
 			TypedCompletedAsyncResult<T> typedResult = result as TypedCompletedAsyncResult<T>;
 
-			if (typedResult != null)
+			if(typedResult != null)
 			{
 				value = TypedCompletedAsyncResult<T>.End(result);
 				return true;
@@ -451,7 +451,7 @@
 		public bool EndWaitForItem(IAsyncResult result)
 		{
 			TypedCompletedAsyncResult<bool> typedResult = result as TypedCompletedAsyncResult<bool>;
-			if (typedResult != null)
+			if(typedResult != null)
 			{
 				return TypedCompletedAsyncResult<bool>.End(result);
 			}
@@ -489,16 +489,16 @@
 			IQueueWaiter[] waiters = null;
 			bool itemAvailable = true;
 
-			lock (ThisLock)
+			lock(ThisLock)
 			{
 				itemAvailable = !((_queueState == QueueState.Closed) || (_queueState == QueueState.Shutdown));
 				GetWaiters(out waiters);
 
-				if (_queueState == QueueState.Open)
+				if(_queueState == QueueState.Open)
 				{
-					if (canDispatchOnThisThread)
+					if(canDispatchOnThisThread)
 					{
-						if (readerQueue.Count == 0)
+						if(readerQueue.Count == 0)
 						{
 							itemQueue.EnqueueAvailableItem(item);
 						}
@@ -509,7 +509,7 @@
 					}
 					else
 					{
-						if (readerQueue.Count == 0)
+						if(readerQueue.Count == 0)
 						{
 							itemQueue.EnqueueAvailableItem(item);
 						}
@@ -526,9 +526,9 @@
 				}
 			}
 
-			if (waiters != null)
+			if(waiters != null)
 			{
-				if (canDispatchOnThisThread)
+				if(canDispatchOnThisThread)
 				{
 					CompleteWaiters(itemAvailable, waiters);
 				}
@@ -538,22 +538,22 @@
 				}
 			}
 
-			if (reader != null)
+			if(reader != null)
 			{
 				InvokeDequeuedCallback(item.DequeuedCallback);
 				reader.Set(item);
 			}
 
-			if (dispatchLater)
+			if(dispatchLater)
 			{
-				if (onDispatchCallback == null)
+				if(onDispatchCallback == null)
 				{
 					onDispatchCallback = OnDispatchCallback;
 				}
 
 				ThreadPool.QueueUserWorkItem(onDispatchCallback, this);
 			}
-			else if (disposeItem)
+			else if(disposeItem)
 			{
 				InvokeDequeuedCallback(item.DequeuedCallback);
 				item.Dispose();
@@ -576,12 +576,12 @@
 		// returns true.
 		bool EnqueueWithoutDispatch(Item item)
 		{
-			lock (ThisLock)
+			lock(ThisLock)
 			{
 				// Open
-				if (_queueState != QueueState.Closed && _queueState != QueueState.Shutdown)
+				if(_queueState != QueueState.Closed && _queueState != QueueState.Shutdown)
 				{
-					if (readerQueue.Count == 0)
+					if(readerQueue.Count == 0)
 					{
 						itemQueue.EnqueueAvailableItem(item);
 						return false;
@@ -598,14 +598,14 @@
 
 		static void OnDispatchCallback(object state)
 		{
-			((InputQueue<T>)state).Dispatch();
+			((InputQueue<T>) state).Dispatch();
 		}
 
 		static void InvokeDequeuedCallbackLater(ItemDequeuedCallback dequeuedCallback)
 		{
-			if (dequeuedCallback != null)
+			if(dequeuedCallback != null)
 			{
-				if (onInvokeDequeuedCallback == null)
+				if(onInvokeDequeuedCallback == null)
 				{
 					onInvokeDequeuedCallback = OnInvokeDequeuedCallback;
 				}
@@ -616,7 +616,7 @@
 
 		static void InvokeDequeuedCallback(ItemDequeuedCallback dequeuedCallback)
 		{
-			if (dequeuedCallback != null)
+			if(dequeuedCallback != null)
 			{
 				dequeuedCallback();
 			}
@@ -624,22 +624,22 @@
 
 		static void OnInvokeDequeuedCallback(object state)
 		{
-			ItemDequeuedCallback dequeuedCallback = (ItemDequeuedCallback)state;
+			ItemDequeuedCallback dequeuedCallback = (ItemDequeuedCallback) state;
 			dequeuedCallback();
 		}
 
 		bool RemoveReader(IQueueReader reader)
 		{
-			lock (ThisLock)
+			lock(ThisLock)
 			{
-				if (_queueState == QueueState.Open || _queueState == QueueState.Shutdown)
+				if(_queueState == QueueState.Open || _queueState == QueueState.Shutdown)
 				{
 					bool removed = false;
 
-					for (int i = readerQueue.Count; i > 0; i--)
+					for(int i = readerQueue.Count; i > 0; i--)
 					{
 						IQueueReader temp = readerQueue.Dequeue();
-						if (ReferenceEquals(temp, reader))
+						if(ReferenceEquals(temp, reader))
 						{
 							removed = true;
 						}
@@ -661,11 +661,11 @@
 			WaitQueueWaiter waiter = null;
 			bool itemAvailable = false;
 
-			lock (ThisLock)
+			lock(ThisLock)
 			{
-				if (_queueState == QueueState.Open)
+				if(_queueState == QueueState.Open)
 				{
-					if (itemQueue.HasAvailableItem)
+					if(itemQueue.HasAvailableItem)
 					{
 						itemAvailable = true;
 					}
@@ -675,13 +675,13 @@
 						waiterList.Add(waiter);
 					}
 				}
-				else if (_queueState == QueueState.Shutdown)
+				else if(_queueState == QueueState.Shutdown)
 				{
-					if (itemQueue.HasAvailableItem)
+					if(itemQueue.HasAvailableItem)
 					{
 						itemAvailable = true;
 					}
-					else if (itemQueue.HasAnyItem)
+					else if(itemQueue.HasAnyItem)
 					{
 						waiter = new WaitQueueWaiter();
 						waiterList.Add(waiter);
@@ -734,7 +734,7 @@
 
 			public void Set(Item item)
 			{
-				lock (ThisLock)
+				lock(ThisLock)
 				{
 					Debug.Assert(_item == null, "InputQueue.WaitQueueReader.Set: (this.item == null)");
 					Debug.Assert(_exception == null, "InputQueue.WaitQueueReader.Set: (this.exception == null)");
@@ -750,13 +750,13 @@
 				bool isSafeToClose = false;
 				try
 				{
-					if (timeout == TimeSpan.MaxValue)
+					if(timeout == TimeSpan.MaxValue)
 					{
 						_waitEvent.WaitOne();
 					}
-					else if (!_waitEvent.WaitOne(timeout, false))
+					else if(!_waitEvent.WaitOne(timeout, false))
 					{
-						if (_inputQueue.RemoveReader(this))
+						if(_inputQueue.RemoveReader(this))
 						{
 							value = default(T);
 							isSafeToClose = true;
@@ -772,7 +772,7 @@
 				}
 				finally
 				{
-					if (isSafeToClose)
+					if(isSafeToClose)
 					{
 						_waitEvent.Close();
 					}
@@ -796,7 +796,7 @@
 				: base(callback, state)
 			{
 				_inputQueue = inputQueue;
-				if (timeout != TimeSpan.MaxValue)
+				if(timeout != TimeSpan.MaxValue)
 				{
 					_timer = new Timer(timerCallback, this, timeout, TimeSpan.FromMilliseconds(-1));
 				}
@@ -806,7 +806,7 @@
 			{
 				AsyncQueueReader readerResult = AsyncResult.End<AsyncQueueReader>(result);
 
-				if (readerResult._expired)
+				if(readerResult._expired)
 				{
 					value = default(T);
 					return false;
@@ -818,8 +818,8 @@
 
 			static void TimerCallback(object state)
 			{
-				AsyncQueueReader thisPtr = (AsyncQueueReader)state;
-				if (thisPtr._inputQueue.RemoveReader(thisPtr))
+				AsyncQueueReader thisPtr = (AsyncQueueReader) state;
+				if(thisPtr._inputQueue.RemoveReader(thisPtr))
 				{
 					thisPtr._expired = true;
 					thisPtr.Complete(false);
@@ -829,7 +829,7 @@
 			public void Set(Item item)
 			{
 				_item = item.Value;
-				if (_timer != null)
+				if(_timer != null)
 				{
 					_timer.Change(-1, -1);
 				}
@@ -848,7 +848,8 @@
 			/// </summary>
 			/// <param name="value">The value.</param>
 			/// <param name="dequeuedCallback">The dequeued callback.</param>
-			public Item(T value, ItemDequeuedCallback dequeuedCallback) : this(value, null, dequeuedCallback)
+			public Item(T value, ItemDequeuedCallback dequeuedCallback)
+				: this(value, null, dequeuedCallback)
 			{
 			}
 
@@ -857,7 +858,8 @@
 			/// </summary>
 			/// <param name="exception">The exception.</param>
 			/// <param name="dequeuedCallback">The dequeued callback.</param>
-			public Item(Exception exception, ItemDequeuedCallback dequeuedCallback) : this(null, exception, dequeuedCallback)
+			public Item(Exception exception, ItemDequeuedCallback dequeuedCallback)
+				: this(null, exception, dequeuedCallback)
 			{
 			}
 
@@ -867,7 +869,7 @@
 			/// <param name="value">The value.</param>
 			/// <param name="exception">The exception.</param>
 			/// <param name="dequeuedCallback">The dequeued callback.</param>
-			internal Item(T value, Exception exception, ItemDequeuedCallback dequeuedCallback) 
+			internal Item(T value, Exception exception, ItemDequeuedCallback dequeuedCallback)
 			{
 				_value = value;
 				_exception = exception;
@@ -906,15 +908,15 @@
 			/// </summary>
 			public void Dispose()
 			{
-				if (_value != null)
+				if(_value != null)
 				{
-					if (_value is IDisposable)
+					if(_value is IDisposable)
 					{
-						((IDisposable)_value).Dispose();
+						((IDisposable) _value).Dispose();
 					}
-					else if (_value is ICommunicationObject)
+					else if(_value is ICommunicationObject)
 					{
-						((ICommunicationObject)_value).Abort();
+						((ICommunicationObject) _value).Abort();
 					}
 				}
 			}
@@ -925,7 +927,7 @@
 			/// <returns></returns>
 			public T GetValue()
 			{
-				if (_exception != null)
+				if(_exception != null)
 				{
 					throw _exception;
 				}
@@ -966,7 +968,7 @@
 			/// <param name="itemAvailable">if set to <see langword="true"/> [item available].</param>
 			public void Set(bool itemAvailable)
 			{
-				lock (ThisLock)
+				lock(ThisLock)
 				{
 					_itemAvailable = itemAvailable;
 					_waitEvent.Set();
@@ -980,11 +982,11 @@
 			/// <returns></returns>
 			public bool Wait(TimeSpan timeout)
 			{
-				if (timeout == TimeSpan.MaxValue)
+				if(timeout == TimeSpan.MaxValue)
 				{
 					_waitEvent.WaitOne();
 				}
-				else if (!_waitEvent.WaitOne(timeout, false))
+				else if(!_waitEvent.WaitOne(timeout, false))
 				{
 					return false;
 				}
@@ -1006,9 +1008,10 @@
 			/// <param name="timeout">The timeout.</param>
 			/// <param name="callback">The callback.</param>
 			/// <param name="state">The state.</param>
-			public AsyncQueueWaiter(TimeSpan timeout, AsyncCallback callback, object state) : base(callback, state)
+			public AsyncQueueWaiter(TimeSpan timeout, AsyncCallback callback, object state)
+				: base(callback, state)
 			{
-				if (timeout != TimeSpan.MaxValue)
+				if(timeout != TimeSpan.MaxValue)
 				{
 					_timer = new Timer(timerCallback, this, timeout, TimeSpan.FromMilliseconds(-1));
 				}
@@ -1043,7 +1046,7 @@
 			/// <param name="state">The state.</param>
 			public static void TimerCallback(object state)
 			{
-				AsyncQueueWaiter thisPtr = (AsyncQueueWaiter)state;
+				AsyncQueueWaiter thisPtr = (AsyncQueueWaiter) state;
 				thisPtr.Complete(false);
 			}
 
@@ -1055,13 +1058,13 @@
 			{
 				bool timely;
 
-				lock (ThisLock)
+				lock(ThisLock)
 				{
 					timely = (_timer == null) || _timer.Change(-1, -1);
 					_itemAvailable = itemAvailable;
 				}
 
-				if (timely)
+				if(timely)
 				{
 					Complete(false);
 				}
@@ -1089,7 +1092,7 @@
 			/// <returns></returns>
 			public Item DequeueAvailableItem()
 			{
-				if (_totalCount == _pendingCount)
+				if(_totalCount == _pendingCount)
 				{
 					throw new Exception("Internal Error - ItemQueue does not contain any available items");
 				}
@@ -1102,7 +1105,7 @@
 			/// <returns></returns>
 			public Item DequeueAnyItem()
 			{
-				if (_pendingCount == _totalCount)
+				if(_pendingCount == _totalCount)
 				{
 					_pendingCount--;
 				}
@@ -1115,10 +1118,10 @@
 			/// <param name="item">The item.</param>
 			void EnqueueItemCore(Item item)
 			{
-				if (_totalCount == _items.Length)
+				if(_totalCount == _items.Length)
 				{
 					Item[] newItems = new Item[_items.Length * 2];
-					for (int i = 0; i < _totalCount; i++)
+					for(int i = 0; i < _totalCount; i++)
 					{
 						newItems[i] = _items[(_head + i) % _items.Length];
 					}
@@ -1136,7 +1139,7 @@
 			/// <returns></returns>
 			Item DequeueItemCore()
 			{
-				if (_totalCount == 0)
+				if(_totalCount == 0)
 				{
 					throw new Exception("Internal Error - ItemQueue does not contain any items");
 				}
@@ -1171,7 +1174,7 @@
 			/// </summary>
 			public void MakePendingItemAvailable()
 			{
-				if (_pendingCount == 0)
+				if(_pendingCount == 0)
 				{
 					throw new Exception("Internal Error - ItemQueue does not contain any pending items");
 				}

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsAsyncResult.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsAsyncResult.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsAsyncResult.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsAsyncResult.cs Fri Oct 31 12:13:10 2008
@@ -32,7 +32,8 @@
 		/// <param name="message">The message.</param>
 		/// <param name="callback">The callback.</param>
 		/// <param name="state">The state.</param>
-		public NmsAsyncResult(NmsOutputChannel channel, Message message, AsyncCallback callback, object state) : base(callback, state)
+		public NmsAsyncResult(NmsOutputChannel channel, Message message, AsyncCallback callback, object state)
+			: base(callback, state)
 		{
 			_channel = channel;
 			_messageBuffer = _channel.EncodeMessage(message);
@@ -40,14 +41,14 @@
 			try
 			{
 				IAsyncResult result = _channel.BeginSend(message, new AsyncCallback(OnSend), this);
-				if (!result.CompletedSynchronously)
+				if(!result.CompletedSynchronously)
 				{
 					return;
 				}
 
 				CompleteSend(result, true);
 			}
-			catch (Exception)
+			catch(Exception)
 			{
 				CleanupBuffer();
 				throw;
@@ -56,7 +57,7 @@
 
 		private void CleanupBuffer()
 		{
-			if (_messageBuffer.Array != null)
+			if(_messageBuffer.Array != null)
 			{
 				_channel.BufferManager.ReturnBuffer(_messageBuffer.Array);
 				_messageBuffer = new ArraySegment<byte>();
@@ -74,7 +75,7 @@
 
 		internal void OnSend(IAsyncResult result)
 		{
-			if (result.CompletedSynchronously)
+			if(result.CompletedSynchronously)
 			{
 				return;
 			}
@@ -83,7 +84,7 @@
 			{
 				CompleteSend(result, false);
 			}
-			catch (Exception e)
+			catch(Exception e)
 			{
 				Complete(false, e);
 			}

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelBase.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelBase.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelBase.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelBase.cs Fri Oct 31 12:13:10 2008
@@ -15,11 +15,8 @@
  * limitations under the License.
  */
 
-using System;
-using System.Collections.Generic;
-using System.ServiceModel.Channels;
-using System.Text;
 using System.ServiceModel;
+using System.ServiceModel.Channels;
 
 namespace Apache.NMS.WCF
 {
@@ -39,7 +36,8 @@
 		/// <param name="parent">The parent.</param>
 		/// <param name="destination">The destination.</param>
 		/// <param name="destinationType">Type of the destionation.</param>
-		public NmsChannelBase(BufferManager bufferManager, MessageEncoderFactory encoderFactory, EndpointAddress address, ChannelManagerBase parent, string destination, DestinationType destinationType) : base(parent)
+		public NmsChannelBase(BufferManager bufferManager, MessageEncoderFactory encoderFactory, EndpointAddress address, ChannelManagerBase parent, string destination, DestinationType destinationType)
+			: base(parent)
 		{
 			_bufferManager = bufferManager;
 			_encoder = encoderFactory.CreateSessionEncoder();

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelFactory.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelFactory.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelFactory.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelFactory.cs Fri Oct 31 12:13:10 2008
@@ -34,10 +34,11 @@
 		/// </summary>
 		/// <param name="context">The context.</param>
 		/// <param name="transportElement">The binding element.</param>
-		internal NmsChannelFactory(NmsTransportBindingElement transportElement, BindingContext context) : base(context.Binding)
+		internal NmsChannelFactory(NmsTransportBindingElement transportElement, BindingContext context)
+			: base(context.Binding)
 		{
 			Collection<MessageEncodingBindingElement> messageEncoderBindingElements = context.BindingParameters.FindAll<MessageEncodingBindingElement>();
-			if (messageEncoderBindingElements.Count > 1)
+			if(messageEncoderBindingElements.Count > 1)
 			{
 				throw new InvalidOperationException("More than one MessageEncodingBindingElement was found in the BindingParameters of the BindingContext");
 			}
@@ -49,7 +50,7 @@
 			_destination = transportElement.Destination;
 			_destinationType = transportElement.DestinationType;
 
-			Console.WriteLine("Destination ({0}) : {1}", _destinationType, _destination);
+			Tracer.DebugFormat("Destination ({0}) : {1}", _destinationType, _destination);
 		}
 
 		#endregion

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelHelper.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelHelper.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelHelper.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelHelper.cs Fri Oct 31 12:13:10 2008
@@ -31,7 +31,7 @@
 		/// <exception cref="ArgumentOutOfRangeException">the timeout value was negative.</exception>
 		public static void ValidateTimeout(TimeSpan timeout)
 		{
-			if (timeout < TimeSpan.Zero)
+			if(timeout < TimeSpan.Zero)
 			{
 				throw new ArgumentOutOfRangeException("timeout", timeout, "Timeout must be greater than or equal to TimeSpan.Zero. To disable timeout, specify TimeSpan.MaxValue.");
 			}
@@ -54,16 +54,16 @@
 		/// <param name="destinationType">Type of the destination.</param>
 		public static IDestination GetDestination(NMS.ISession session, string destination, DestinationType destinationType)
 		{
-			switch (destinationType)
+			switch(destinationType)
 			{
-				case DestinationType.Topic:
-					return session.GetTopic(destination);
-				case DestinationType.TemporaryQueue:
-					return session.CreateTemporaryQueue();
-				case DestinationType.TemporaryTopic:
-					return session.CreateTemporaryTopic();
-				default:
-					return session.GetQueue(destination);
+			case DestinationType.Topic:
+			return session.GetTopic(destination);
+			case DestinationType.TemporaryQueue:
+			return session.CreateTemporaryQueue();
+			case DestinationType.TemporaryTopic:
+			return session.CreateTemporaryTopic();
+			default:
+			return session.GetQueue(destination);
 			}
 		}
 	}

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelListener.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelListener.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelListener.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsChannelListener.cs Fri Oct 31 12:13:10 2008
@@ -19,8 +19,6 @@
 using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.Text;
-using Apache.NMS;
-using ISession = Apache.NMS.ISession;
 
 namespace Apache.NMS.WCF
 {
@@ -36,21 +34,22 @@
 		/// </summary>
 		/// <param name="transportElement">The binding element.</param>
 		/// <param name="context">The context.</param>
-		internal NmsChannelListener(NmsTransportBindingElement transportElement, BindingContext context) : base(context.Binding)
+		internal NmsChannelListener(NmsTransportBindingElement transportElement, BindingContext context)
+			: base(context.Binding)
 		{
-			_bufferManager = BufferManager.CreateBufferManager(transportElement.MaxBufferPoolSize, (int)transportElement.MaxReceivedMessageSize);
+			_bufferManager = BufferManager.CreateBufferManager(transportElement.MaxBufferPoolSize, (int) transportElement.MaxReceivedMessageSize);
 
 			MessageEncodingBindingElement messageEncoderBindingElement = context.BindingParameters.Remove<MessageEncodingBindingElement>();
 			_messageEncoderFactory = (messageEncoderBindingElement != null)
-				? messageEncoderBindingElement.CreateMessageEncoderFactory() 
+				? messageEncoderBindingElement.CreateMessageEncoderFactory()
 				: NmsConstants.DefaultMessageEncoderFactory;
-			
+
 			_channelQueue = new InputQueue<IInputChannel>();
 			_currentChannelLock = new object();
 			_destinationName = transportElement.Destination;
 			_destinationType = transportElement.DestinationType;
 			_uri = new Uri(context.ListenUriBaseAddress, context.ListenUriRelativeAddress);
-			Console.WriteLine("Listening to {0} at {1}/{2}", _destinationType, _uri, _destinationName);
+			Tracer.DebugFormat("Listening to {0} at {1}/{2}", _destinationType, _uri, _destinationName);
 		}
 
 		#endregion
@@ -61,7 +60,7 @@
 		/// <value>The message encoder factory.</value>
 		public MessageEncoderFactory MessageEncoderFactory
 		{
-			get	{ return _messageEncoderFactory; }
+			get { return _messageEncoderFactory; }
 		}
 
 		/// <summary>
@@ -106,30 +105,30 @@
 		/// <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="timeout" /> is less than zero.</exception>
 		protected override void OnClose(TimeSpan timeout)
 		{
-			lock (ThisLock)
+			lock(ThisLock)
 			{
-				if (_consumer != null)
+				if(_consumer != null)
 				{
-					Console.WriteLine("Listener is terminating consumer...");
+					Tracer.Debug("Listener is terminating consumer...");
 					_consumer.Close();
 					_consumer.Dispose();
-					Console.WriteLine("Listener has terminated consumer");
+					Tracer.Debug("Listener has terminated consumer");
 				}
 
-				if (_session != null)
+				if(_session != null)
 				{
-					Console.WriteLine("Listener is terminating session...");
+					Tracer.Debug("Listener is terminating session...");
 					_session.Close();
-					Console.WriteLine("Listener has terminated session");
+					Tracer.Debug("Listener has terminated session");
 				}
 
-				if (_connection != null)
+				if(_connection != null)
 				{
-					Console.WriteLine("Listener is terminating connection...");
+					Tracer.Debug("Listener is terminating connection...");
 					_connection.Stop();
 					_connection.Close();
 					_connection.Dispose();
-					Console.WriteLine("Listener has terminated connection");
+					Tracer.Debug("Listener has terminated connection");
 				}
 
 				_channelQueue.Close();
@@ -169,7 +168,7 @@
 		/// <exception cref="T:System.TimeoutException">The interval of time specified by <paramref name="timeout" /> that was allotted for the operation was exceeded before the operation was completed.</exception>
 		protected override void OnOpen(TimeSpan timeout)
 		{
-			if (Uri == null)
+			if(Uri == null)
 			{
 				throw new InvalidOperationException("Uri must be set before ChannelListener is opened.");
 			}
@@ -266,15 +265,15 @@
 		/// <param name="timeout">The <see cref="T:System.TimeSpan" /> that specifies how long the accept channel operation has to complete before timing out.</param>
 		protected override IInputChannel OnAcceptChannel(TimeSpan timeout)
 		{
-			Console.WriteLine("Accepting channel");
+			Tracer.Debug("Accepting channel");
 			NmsChannelHelper.ValidateTimeout(timeout);
-			if (!IsDisposed)
+			if(!IsDisposed)
 			{
 				EnsureChannelAvailable();
 			}
 
 			IInputChannel channel;
-			if (_channelQueue.Dequeue(timeout, out channel))
+			if(_channelQueue.Dequeue(timeout, out channel))
 			{
 				return channel;
 			}
@@ -293,7 +292,7 @@
 		protected override IAsyncResult OnBeginAcceptChannel(TimeSpan timeout, AsyncCallback callback, object state)
 		{
 			NmsChannelHelper.ValidateTimeout(timeout);
-			if (!IsDisposed)
+			if(!IsDisposed)
 			{
 				EnsureChannelAvailable();
 			}
@@ -310,7 +309,7 @@
 		protected override IInputChannel OnEndAcceptChannel(IAsyncResult result)
 		{
 			IInputChannel channel;
-			if (_channelQueue.EndDequeue(result, out channel))
+			if(_channelQueue.EndDequeue(result, out channel))
 			{
 				return channel;
 			}
@@ -325,7 +324,7 @@
 		/// <param name="state">The state.</param>
 		internal void DispatchCallback(object state)
 		{
-			Dispatch((Message)state);
+			Dispatch((Message) state);
 		}
 
 		/// <summary>
@@ -336,12 +335,12 @@
 		/// </summary>
 		internal void Dispatch(Message message)
 		{
-			if (message == null)
+			if(message == null)
 			{
 				return;
 			}
 
-			Console.WriteLine("Dispatching incoming message");
+			Tracer.Debug("Dispatching incoming message");
 			try
 			{
 				NmsInputChannel newChannel;
@@ -349,16 +348,15 @@
 
 				newChannel.Dispatch(message);
 
-				if (channelCreated)
+				if(channelCreated)
 				{
 					//Hand the channel off to whomever is waiting for AcceptChannel() to complete
 					_channelQueue.EnqueueAndDispatch(newChannel);
 				}
 			}
-			catch (Exception e)
+			catch(Exception e)
 			{
-				Console.WriteLine("Error dispatching Message.");
-				Console.WriteLine(e.ToString());
+				Tracer.ErrorFormat("Error dispatching Message: {0}", e.ToString());
 			}
 		}
 
@@ -370,11 +368,11 @@
 		{
 			bool channelCreated = false;
 
-			if ((newChannel = _currentChannel) == null)
+			if((newChannel = _currentChannel) == null)
 			{
-				lock (_currentChannelLock)
+				lock(_currentChannelLock)
 				{
-					if ((newChannel = _currentChannel) == null)
+					if((newChannel = _currentChannel) == null)
 					{
 						newChannel = CreateNmsChannel(Uri);
 						newChannel.Closed += OnChannelClosed;
@@ -394,11 +392,11 @@
 		/// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 		private void OnChannelClosed(object sender, EventArgs args)
 		{
-			NmsInputChannel channel = (NmsInputChannel)sender;
+			NmsInputChannel channel = (NmsInputChannel) sender;
 
-			lock (_currentChannelLock)
+			lock(_currentChannelLock)
 			{
-				if (channel == _currentChannel)
+				if(channel == _currentChannel)
 				{
 					_currentChannel = null;
 				}
@@ -431,7 +429,7 @@
 			IConnection connection = ConnectionFactoryManager.GetInstance().CreateConnection(uri);
 			connection.ExceptionListener += OnExceptionThrown;
 			connection.Start();
-			Console.WriteLine("Connection open");
+			Tracer.Debug("Connection open");
 			return connection;
 		}
 
@@ -444,14 +442,14 @@
 		/// been started.</exception>
 		private NMS.ISession OpenSession(IConnection connection)
 		{
-			if (!connection.IsStarted)
+			if(!connection.IsStarted)
 			{
 				throw new InvalidOperationException("The connection has not yet been opened");
 			}
 
-			Console.WriteLine("Opening session...");
+			Tracer.Debug("Opening session...");
 			NMS.ISession session = connection.CreateSession();
-			Console.WriteLine("Session open");
+			Tracer.Debug("Session open");
 			return session;
 		}
 
@@ -463,9 +461,9 @@
 		private IDestination OpenDestination(NMS.ISession session, Uri uri)
 		{
 			string queueName = NmsChannelHelper.GetQueueName(uri);
-			Console.WriteLine("Connecting to queue '{0}'...", queueName);
+			Tracer.DebugFormat("Connecting to queue '{0}'...", queueName);
 			IDestination destination = session.GetQueue(queueName);
-			Console.WriteLine("Connected to queue");
+			Tracer.Debug("Connected to queue");
 
 			return destination;
 		}
@@ -479,10 +477,10 @@
 		/// messages will be consumed by the attached Listener.</returns>
 		private IMessageConsumer CreateConsumer(NMS.ISession session, IDestination destination)
 		{
-			Console.WriteLine("Creating message listener...");
+			Tracer.Debug("Creating message listener...");
 			IMessageConsumer consumer = session.CreateConsumer(destination);
 			consumer.Listener += OnReceiveMessage;
-			Console.WriteLine("Created message listener");
+			Tracer.Debug("Created message listener");
 			return consumer;
 		}
 
@@ -492,8 +490,8 @@
 		/// <param name="message">The message.</param>
 		private void OnReceiveMessage(IMessage message)
 		{
-			Console.WriteLine("Received message");
-			string soapMsg = ((ITextMessage)message).Text;
+			Tracer.Info("Received message");
+			string soapMsg = ((ITextMessage) message).Text;
 			byte[] buffer = Encoding.ASCII.GetBytes(soapMsg);
 			int dataLength = buffer.Length;
 			byte[] data1 = _bufferManager.TakeBuffer(dataLength);
@@ -505,7 +503,7 @@
 			Array.Copy(data.Array, data.Offset, msgContents, 0, msgContents.Length);
 			Message msg = _messageEncoderFactory.Encoder.ReadMessage(data, _bufferManager);
 
-			Console.WriteLine(msg);
+			Tracer.Info(msg);
 			Dispatch(msg);
 		}
 
@@ -516,15 +514,15 @@
 		private void OnExceptionThrown(Exception exception)
 		{
 			// TODO: investigate whether it is normal behaviour for a NRE to be thrown during shutdown
-			if (exception.GetType() == typeof(NullReferenceException))
+			if(exception.GetType() == typeof(NullReferenceException))
 			{
 				return;
 			}
 
 			// TODO: can we recover from the exception? Do we convert to WCF exceptions?
-			Console.WriteLine("{0} thrown : {1}\n{2}", 
-				exception.GetType().Name, 
-				exception.Message, 
+			Tracer.ErrorFormat("{0} thrown : {1}\n{2}",
+				exception.GetType().Name,
+				exception.Message,
 				exception.StackTrace);
 		}
 
@@ -534,7 +532,7 @@
 		private void EnsureChannelAvailable()
 		{
 			NmsInputChannel newChannel;
-			if (CreateOrRetrieveChannel(out newChannel))
+			if(CreateOrRetrieveChannel(out newChannel))
 			{
 				_channelQueue.EnqueueAndDispatch(newChannel);
 			}

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputChannel.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputChannel.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputChannel.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsInputChannel.cs Fri Oct 31 12:13:10 2008
@@ -19,8 +19,6 @@
 using System.ServiceModel;
 using System.ServiceModel.Channels;
 using System.Text;
-using Apache.NMS;
-using ISession = Apache.NMS.ISession;
 
 namespace Apache.NMS.WCF
 {
@@ -63,13 +61,13 @@
 		/// <typeparam name="T">The type of the property to attempt to retrieve.</typeparam>
 		public override T GetProperty<T>()
 		{
-			if (typeof(T) == typeof(IInputChannel))
+			if(typeof(T) == typeof(IInputChannel))
 			{
-				return (T)(object)this;
+				return (T) (object) this;
 			}
 
 			T messageEncoderProperty = Encoder.GetProperty<T>();
-			if (messageEncoderProperty != null)
+			if(messageEncoderProperty != null)
 			{
 				return messageEncoderProperty;
 			}
@@ -102,7 +100,7 @@
 		public Message Receive(TimeSpan timeout)
 		{
 			Message message;
-			if (TryReceive(timeout, out message))
+			if(TryReceive(timeout, out message))
 			{
 				return message;
 			}
@@ -115,7 +113,7 @@
 		/// <returns>
 		/// true if a message is received before the <paramref name="timeout" /> has been exceeded; otherwise false.
 		/// </returns>
-		/// <param name="timeout">The <see cref="T:System.IAsyncResult" /> returned by a call to one of the <see cref="System.ServiceModel.Channels.IInputChannel.BeginReceive" /> methods.</param>
+		/// <param name="timeout">The <see cref="T:System.IAsyncResult" /> returned by a call to one of the <see cref="System.ServiceModel.Channels.IInputChannel.BeginReceive(AsyncCallback, object)" /> methods.</param>
 		/// <param name="message">The <see cref="T:System.ServiceModel.Channels.Message" /> received. </param>
 		/// <exception cref="T:System.TimeoutException">The specified <paramref name="timeout" /> is exceeded before the operation is completed.</exception>
 		/// <exception cref="T:System.ArgumentOutOfRangeException">The timeout specified is less than zero.</exception>
@@ -160,7 +158,7 @@
 		/// <returns>
 		/// The <see cref="T:System.ServiceModel.Channels.Message" /> received. 
 		/// </returns>
-		/// <param name="result">The <see cref="T:System.IAsyncResult" /> returned by a call to one of the <see cref="System.ServiceModel.Channels.IInputChannel.BeginReceive" /> methods.</param>
+		/// <param name="result">The <see cref="T:System.IAsyncResult" /> returned by a call to one of the <see cref="System.ServiceModel.Channels.IInputChannel.BeginReceive(AsyncCallback, object)" /> methods.</param>
 		public Message EndReceive(IAsyncResult result)
 		{
 			return _messages.EndDequeue(result);

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsOutputChannel.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsOutputChannel.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsOutputChannel.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/main/csharp/NmsOutputChannel.cs Fri Oct 31 12:13:10 2008
@@ -20,7 +20,6 @@
 using System.ServiceModel.Channels;
 using System.Text;
 using System.Xml;
-using Apache.NMS;
 
 namespace Apache.NMS.WCF
 {
@@ -69,10 +68,10 @@
 		{
 			ThrowIfDisposedOrNotOpen();
 
-			using (NMS.ISession session = _connection.CreateSession())
+			using(NMS.ISession session = _connection.CreateSession())
 			{
 				IDestination destination = NmsChannelHelper.GetDestination(session, Destination, DestinationType);
-				using (IMessageProducer producer = session.CreateProducer(destination))
+				using(IMessageProducer producer = session.CreateProducer(destination))
 				{
 					producer.Persistent = true;
 					message.Headers.To = RemoteAddress.Uri;
@@ -83,8 +82,8 @@
 					producer.Send(request);
 					producer.Close();
 
-					Console.WriteLine("Sending message:");
-					Console.WriteLine(request.Text);
+					Tracer.Info("Sending message:");
+					Tracer.Info(request.Text);
 				}
 			}
 		}
@@ -164,7 +163,7 @@
 		/// <summary>
 		/// Completes an asynchronous operation to transmit a message to the destination of the output channel.
 		/// </summary>
-		/// <param name="result">The <see cref="T:System.IAsyncResult"/> returned by a call to the <see cref="System.ServiceModel.Channels.IOutputChannel.BeginSend"/>  method.</param>
+		/// <param name="result">The <see cref="T:System.IAsyncResult"/> returned by a call to the <see cref="System.ServiceModel.Channels.IOutputChannel.BeginSend(System.ServiceModel.Channels.Message, System.AsyncCallback, object)"/>  method.</param>
 		public void EndSend(IAsyncResult result)
 		{
 			NmsAsyncResult.End(result);
@@ -192,13 +191,13 @@
 		/// <returns></returns>
 		public override T GetProperty<T>()
 		{
-			if (typeof(T) == typeof(IOutputChannel))
+			if(typeof(T) == typeof(IOutputChannel))
 			{
-				return (T)(object)this;
+				return (T) (object) this;
 			}
 
 			T messageEncoderProperty = Encoder.GetProperty<T>();
-			if (messageEncoderProperty != null)
+			if(messageEncoderProperty != null)
 			{
 				return messageEncoderProperty;
 			}
@@ -221,7 +220,7 @@
 		/// <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="timeout" /> is less than zero.</exception>
 		protected override void OnClose(TimeSpan timeout)
 		{
-			if (_connection != null)
+			if(_connection != null)
 			{
 				_connection.Close();
 				_connection.Dispose();

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/test/csharp/CommonAssemblyInfo.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/test/csharp/CommonAssemblyInfo.cs?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/test/csharp/CommonAssemblyInfo.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/src/test/csharp/CommonAssemblyInfo.cs Fri Oct 31 12:13:10 2008
@@ -23,6 +23,6 @@
 [assembly: AssemblyCopyrightAttribute("Copyright (C) 2005-2008 Apache Software Foundation")]
 [assembly: AssemblyTrademarkAttribute("")]
 [assembly: AssemblyCultureAttribute("")]
-[assembly: AssemblyVersionAttribute("1.1.0")]
-[assembly: AssemblyInformationalVersionAttribute("1.1.0")]
+[assembly: AssemblyVersionAttribute("1.0.0")]
+[assembly: AssemblyInformationalVersionAttribute("1.0.0")]
 

Propchange: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/vendor/
------------------------------------------------------------------------------
--- svn:externals (added)
+++ svn:externals Fri Oct 31 12:13:10 2008
@@ -0,0 +1 @@
+Apache.NMS              https://svn.apache.org/repos/asf/activemq/activemq-dotnet/Apache.NMS/trunk/deploy

Modified: activemq/activemq-dotnet/Apache.NMS.WCF/trunk/vs2008-nms-wcf.csproj
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.WCF/trunk/vs2008-nms-wcf.csproj?rev=709535&r1=709534&r2=709535&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.WCF/trunk/vs2008-nms-wcf.csproj (original)
+++ activemq/activemq-dotnet/Apache.NMS.WCF/trunk/vs2008-nms-wcf.csproj Fri Oct 31 12:13:10 2008
@@ -39,6 +39,7 @@
     <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
     <TargetFrameworkSubset>
     </TargetFrameworkSubset>
+    <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
@@ -48,7 +49,8 @@
     <DefineConstants>TRACE;DEBUG;NET,NET_2_0,NET_3_5</DefineConstants>
     <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
     <DocumentationFile>build\net-3.5\debug\Apache.NMS.WCF.xml</DocumentationFile>
-    <NoWarn>0419</NoWarn>
+    <NoWarn>
+    </NoWarn>
     <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -60,7 +62,8 @@
     <DebugType>full</DebugType>
     <DocumentationFile>build\net-3.5\release\Apache.NMS.WCF.xml</DocumentationFile>
     <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-    <NoWarn>0419</NoWarn>
+    <NoWarn>
+    </NoWarn>
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Apache.NMS, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
@@ -82,11 +85,9 @@
     <Content Include="LICENSE.txt">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
-    <Content Include="nant-common.xml" />
     <Content Include="NOTICE.txt">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
-    <Content Include="README.txt" />
   </ItemGroup>
   <ItemGroup>
     <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
@@ -127,8 +128,11 @@
     <Compile Include="src\main\csharp\NmsInputChannel.cs" />
     <Compile Include="src\main\csharp\NmsOutputChannel.cs" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="nant.build" />
-  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
+  <PropertyGroup>
+    <PreBuildEvent>cd $(ProjectDir)
+nant -nologo download-vendor -D:vendor.build.config=$(ConfigurationName) -D:vendor.build.framework=net-3.5</PreBuildEvent>
+    <PostBuildEvent>cd $(ProjectDir)
+nant -nologo -q install-all -D:compile.skip=true</PostBuildEvent>
+  </PropertyGroup>
 </Project>
\ No newline at end of file