Author: steshaw
Date: Tue Nov 28 13:43:07 2006
New Revision: 480221
URL: http://svn.apache.org/viewvc?view=rev&rev=480221
Log:
Fix compiler warnings.
Modified:
incubator/qpid/trunk/qpid/dotnet/ (props changed)
incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AMQConnection.cs
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs
Propchange: incubator/qpid/trunk/qpid/dotnet/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Nov 28 13:43:07 2006
@@ -1,3 +1,4 @@
_ReSharper.Qpid.NET
Qpid.NET.resharper.user
Qpid.NET.suo
+build
Modified:
incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs?view=diff&rev=480221&r1=480220&r2=480221
==============================================================================
---
incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs
(original)
+++
incubator/qpid/trunk/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs
Tue Nov 28 13:43:07 2006
@@ -53,7 +53,7 @@
{
_socket = new
System.Net.Sockets.Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
- IPHostEntry ipHostInfo = Dns.Resolve(_host);
+ IPHostEntry ipHostInfo = Dns.Resolve(_host); // Note: don't fix
this warning. We do this for .NET 1.1 compatibility.
IPAddress ipAddress = ipHostInfo.AddressList[0];
IPEndPoint ipe = new IPEndPoint(ipAddress, _port);
Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AMQConnection.cs
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AMQConnection.cs?view=diff&rev=480221&r1=480220&r2=480221
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AMQConnection.cs
(original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AMQConnection.cs Tue
Nov 28 13:43:07 2006
@@ -430,7 +430,7 @@
_log.Info("Closing channel " + channel);
if (cause != null)
{
- channel.Closed(cause);
+ channel.ClosedWithException(cause);
}
else
{
Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs?view=diff&rev=480221&r1=480220&r2=480221
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs
(original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs Tue
Nov 28 13:43:07 2006
@@ -27,17 +27,16 @@
{
public class AmqBrokerInfo : BrokerInfo
{
- private string _host = "localhost";
- private int _port = 5672;
- private string _transport = "amqp";
-
public readonly string URL_FORMAT_EXAMPLE =
"<transport>://<hostname>[:<port
Default=\""+BrokerDetailsConstants.DEFAULT_PORT+"\">][?<option>='<value>'[,<option>='<value>']]";
public const long DEFAULT_CONNECT_TIMEOUT = 30000L;
+ private string _host = "localhost";
+ private int _port = 5672;
+ private string _transport = "amqp";
private Hashtable _options = new Hashtable();
-
+
public AmqBrokerInfo()
{
}
@@ -204,7 +203,7 @@
{
return
long.Parse((string)_options[BrokerDetailsConstants.OPTIONS_CONNECT_TIMEOUT]);
}
- catch (FormatException nfe)
+ catch (FormatException)
{
//Do nothing as we will use the default below.
}
@@ -238,24 +237,24 @@
return sb.ToString();
}
-
- public override bool Equals(object o)
- {
- if (!(o is BrokerInfo))
- {
- return false;
- }
-
- BrokerInfo bd = (BrokerInfo) o;
-
- return StringEqualsIgnoreCase(_host, bd.getHost()) &&
- (_port == bd.getPort()) &&
- StringEqualsIgnoreCase(_transport, bd.getTransport()) &&
- (useSSL() == bd.useSSL());
-
- //todo do we need to compare all the options as well?
- }
+ public override bool Equals(object obj)
+ {
+ if (!(obj is BrokerInfo))
+ {
+ return false;
+ }
+
+ BrokerInfo bd = (BrokerInfo) obj;
+ return StringEqualsIgnoreCase(_host, bd.getHost()) &&
+ _port == bd.getPort();
+ }
+
+ public override int GetHashCode()
+ {
+ return _host.ToLower().GetHashCode() ^
_port.GetHashCode();
+ }
+
// TODO: move to util class.
private bool StringEqualsIgnoreCase(string one, string two)
{
@@ -310,4 +309,4 @@
setOption(BrokerDetailsConstants.OPTIONS_SSL, ssl.ToString());
}
}
-}
\ No newline at end of file
+}
Modified: incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs?view=diff&rev=480221&r1=480220&r2=480221
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs (original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs Tue Nov
28 13:43:07 2006
@@ -377,7 +377,7 @@
* unilaterally.
* @param e the exception that caused this session to be closed. Null
causes the
*/
- public void Closed(Exception e)
+ public void ClosedWithException(Exception e)
{
lock (_connection.FailoverMutex)
{
Modified:
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs?view=diff&rev=480221&r1=480220&r2=480221
==============================================================================
--- incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs
(original)
+++ incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs
Tue Nov 28 13:43:07 2006
@@ -34,14 +34,6 @@
private bool _noLocal;
- /// We need to store the "raw" field table so that we can resubscribe
in the event of failover being required.
-// private FieldTable _rawSelectorFieldTable;
-//
-// public FieldTable RawSelectorFieldTable
-// {
-// get { return _rawSelectorFieldTable; }
-// }
-
/**
* We store the exclusive field in order to be able to reuse it when
resubscribing in the event of failover
*/
Modified:
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs?view=diff&rev=480221&r1=480220&r2=480221
==============================================================================
---
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs
(original)
+++
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs
Tue Nov 28 13:43:07 2006
@@ -232,7 +232,7 @@
{
_closingChannels.Remove(channelId);
AmqChannel channel = (AmqChannel)
_channelId2SessionMap[channelId];
- channel.Closed(new AMQException(_logger, code, text));
+ channel.ClosedWithException(new AMQException(_logger, code,
text));
return true;
}
else
Modified:
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs?view=diff&rev=480221&r1=480220&r2=480221
==============================================================================
---
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs
(original)
+++
incubator/qpid/trunk/qpid/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs
Tue Nov 28 13:43:07 2006
@@ -112,7 +112,7 @@
{
_retries = int.Parse(retries);
}
- catch (FormatException nfe)
+ catch (FormatException)
{
_retries = DEFAULT_SERVER_RETRIES;
}
@@ -144,4 +144,4 @@
}
}
-}
\ No newline at end of file
+}