qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r886962 [3/5] - in /qpid/trunk/qpid/dotnet/client-010: ./ addins/ExcelAddIn/ addins/ExcelAddInMessageProcessor/ addins/ExcelAddInProducer/ client/ client/client/ client/transport/ client/transport/codec/ client/transport/exception/ client/t...
Date Thu, 03 Dec 2009 22:31:17 GMT
Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/codec/MSDecoder.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/MSDecoder.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/codec/MSDecoder.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/codec/MSDecoder.cs Thu Dec  3 22:31:12 2009
@@ -34,77 +34,77 @@
 	/// </summary>
 	
 	
-	public sealed class MSDecoder:AbstractDecoder
+	public sealed class MSDecoder : AbstractDecoder
 	{
 
-	    private BinaryReader reader;
+	    private BinaryReader _reader;
 
-        public void init(MemoryStream st)
+        public void Init(MemoryStream st)
 		{            
-            reader = new BinaryReader(st, Encoding.BigEndianUnicode);
+            _reader = new BinaryReader(st, Encoding.BigEndianUnicode);
 		}
 		
-		protected override byte doGet()
+		protected override byte DoGet()
 		{
-		    return reader.ReadByte();
+		    return _reader.ReadByte();
 		}
 
-        protected override void doGet(byte[] bytes)
+        protected override void DoGet(byte[] bytes)
 		{
-            reader.Read(bytes, 0, bytes.Length);
+            _reader.Read(bytes, 0, bytes.Length);
 		}
 	
-		public override bool hasRemaining()
+		public override bool HasRemaining()
 		{
-		    return (reader.BaseStream.Position < reader.BaseStream.Length);
+		    return (_reader.BaseStream.Position < _reader.BaseStream.Length);
 		}
 
-        public override short readUint8()
+        public override short ReadUint8()
 		{
-			return (short) (0xFF & reader.ReadByte());
+			return (short) (0xFF & _reader.ReadByte());
 		}
 
-        public override int readUint16()
+        public override int ReadUint16()
 		{
-		    return ByteEncoder.GetBigEndian((UInt16) reader.ReadInt16());
+		    return ByteEncoder.GetBigEndian((UInt16) _reader.ReadInt16());
 		}
 
-        public override long readUint32()
+        public override long ReadUint32()
 		{
-            return ByteEncoder.GetBigEndian((UInt32) reader.ReadInt32());
+            return ByteEncoder.GetBigEndian((UInt32) _reader.ReadInt32());
 		}
 
-        public override long readUint64()
+        public override long ReadUint64()
 		{
-		    return (long) ByteEncoder.GetBigEndian(reader.ReadInt64());            
+		    return (long) ByteEncoder.GetBigEndian(_reader.ReadInt64());            
 		}
 
-        public override short readInt8()
+        public override short ReadInt8()
 		{
-			return (short) (0xFF & reader.ReadByte());
+			return (short) (0xFF & _reader.ReadByte());
 		}
 
-        public override int readInt16()
+        public override int ReadInt16()
 		{
-		    return ByteEncoder.GetBigEndian((Int16) reader.ReadInt16());
+		    return ByteEncoder.GetBigEndian((Int16) _reader.ReadInt16());
 		}
 
-        public override long readInt32()
+        public override long ReadInt32()
 		{
-            return ByteEncoder.GetBigEndian((Int32) reader.ReadInt32());
+            return ByteEncoder.GetBigEndian((Int32) _reader.ReadInt32());
 		}
 
-        public override long readInt64()
+        public override long ReadInt64()
 		{
-		    return (long) ByteEncoder.GetBigEndian(reader.ReadInt64());            
+		    return (long) ByteEncoder.GetBigEndian(_reader.ReadInt64());            
 		}        
 		
-		public override double readDouble() {
-			return (double) ByteEncoder.GetBigEndian(reader.ReadDouble()) ;
+		public override double ReadDouble() {
+			return (double) ByteEncoder.GetBigEndian(_reader.ReadDouble()) ;
 		}
 		
-		public override float readFloat() {
-			return (float) reader.ReadSingle() ;
+		public override float ReadFloat() {
+			return (float) _reader.ReadSingle() ;
 		}		
 	}
 }

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/codec/MSEncoder.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/MSEncoder.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/codec/MSEncoder.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/codec/MSEncoder.cs Thu Dec  3 22:31:12 2009
@@ -40,12 +40,12 @@
             _writer = new BinaryWriter(_out);
         }
 
-        public void init()
+        public void Init()
         {
             _out.Seek(0, SeekOrigin.Begin);            
         }
 
-        public MemoryStream segment()
+        public MemoryStream Segment()
         {            
             int length = (int) _out.Position;
             MemoryStream result =  new MemoryStream(_out.ToArray(), 0, length);
@@ -55,83 +55,83 @@
         }
 
 
-        protected override void doPut(byte b)
+        protected override void DoPut(byte b)
         {
             _writer.Write(b);
         }
 
-        protected override void doPut(MemoryStream src)
+        protected override void DoPut(MemoryStream src)
         {
             _writer.Write(src.ToArray());
         }
 
-        protected override void put(byte[] bytes)
+        protected override void Put(byte[] bytes)
         {
             _writer.Write(bytes);
         }
 
-        public override void writeUint8(short b)
+        public override void WriteUint8(short b)
         {
             Debug.Assert(b < 0x100);
             _writer.Write((byte) b);
         }
 
-        public override void writeUint16(int s)
+        public override void WriteUint16(int s)
         {
             Debug.Assert(s < 0x10000);
             _writer.Write(ByteEncoder.GetBigEndian((UInt16) s));
         }
 
-        public override void writeUint32(long i)
+        public override void WriteUint32(long i)
         {
             Debug.Assert(i < 0x100000000L);
             _writer.Write(ByteEncoder.GetBigEndian((UInt32) i));
         }
 
-        public override void writeUint64(long l)
+        public override void WriteUint64(long l)
         {
             _writer.Write(ByteEncoder.GetBigEndian(l));
         }
 
-        public override void writeInt8(short b)
+        public override void WriteInt8(short b)
         {
             Debug.Assert(b < 0x100);
             _writer.Write((byte) b);
         }
 
-        public override void writeInt16(int s)
+        public override void WriteInt16(int s)
         {
             Debug.Assert(s < 0x10000);
             _writer.Write(ByteEncoder.GetBigEndian((Int16) s));
         }
 
-        public override void writeInt32(long i)
+        public override void WriteInt32(long i)
         {
             Debug.Assert(i < 0x100000000L);
             _writer.Write(ByteEncoder.GetBigEndian((Int32) i));
         }
 
-        public override void writeInt64(long l)
+        public override void WriteInt64(long l)
         {
             _writer.Write(ByteEncoder.GetBigEndian(l));
         }        
         
-        public override void writeFloat(float f) {
+        public override void WriteFloat(float f) {
         	_writer.Write(f) ;
         }
         
-        public override void writeDouble(double d) {
+        public override void WriteDouble(double d) {
         	_writer.Write(ByteEncoder.GetBigEndian(d)) ;
         }
         
-        protected override int beginSize8()
+        protected override int BeginSize8()
         {
             int pos = (int) _out.Position;
             _writer.Write((byte) 0);
             return pos;
         }
 
-        protected override void endSize8(int pos)
+        protected override void EndSize8(int pos)
         {
             int cur = (int) _out.Position;
             _out.Seek(pos, SeekOrigin.Begin);
@@ -139,14 +139,14 @@
             _out.Seek(cur, SeekOrigin.Begin);
         }
 
-        protected override int beginSize16()
+        protected override int BeginSize16()
         {
             int pos = (int) _out.Position;
             _writer.Write((short) 0);
             return pos;
         }
 
-        protected override void endSize16(int pos)
+        protected override void EndSize16(int pos)
         {
             int cur = (int) _out.Position;
             _out.Seek(pos, SeekOrigin.Begin);
@@ -154,14 +154,14 @@
             _out.Seek(cur, SeekOrigin.Begin);
         }
 
-        protected override int beginSize32()
+        protected override int BeginSize32()
         {
             int pos = (int) _out.Position;
             _writer.Write(0);
             return pos;
         }
 
-        protected override void endSize32(int pos)
+        protected override void EndSize32(int pos)
         {
             int cur = (int) _out.Position;
             _out.Seek(pos, SeekOrigin.Begin);

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs Thu Dec  3 22:31:12 2009
@@ -41,9 +41,9 @@
 		
 		private ConnectionClose _close;
 		
-		public ConnectionException(ConnectionClose close):base(close.getReplyText())
+		public ConnectionException(ConnectionClose close):base(close.GetReplyText())
 		{
 			_close = close;
 		}
 	}
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs Thu Dec  3 22:31:12 2009
@@ -27,14 +27,14 @@
     {
         public ExceptionArgs(Exception e)
         {
-            m_exception = e;
+            _exception = e;
         }
-        private Exception m_exception;
+        private Exception _exception;
 
         public Exception Exception
         {
-            get { return m_exception; }
-            set { m_exception = value; }
+            get { return _exception; }
+            set { _exception = value; }
         }
 
     }

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ProtocolVersionException.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ProtocolVersionException.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ProtocolVersionException.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ProtocolVersionException.cs Thu Dec  3 22:31:12 2009
@@ -34,7 +34,7 @@
 		{
 			get
 			{
-				return this.major;
+				return _major;
 			}
 			
 		}
@@ -42,18 +42,18 @@
 		{
 			get
 			{
-				return this.minor;
+				return _minor;
 			}
 			
 		}
 		
-		private sbyte major;
-		private sbyte minor;
+		private sbyte _major;
+		private sbyte _minor;
 		
 		public ProtocolVersionException(sbyte major, sbyte minor):base(String.Format("version missmatch: %{0}-{1}", major, minor))
 		{
-			this.major = major;
-			this.minor = minor;
+			this._major = major;
+			this._minor = minor;
 		}
 	}
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/network/Assembler.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/network/Assembler.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/network/Assembler.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/network/Assembler.cs Thu Dec  3 22:31:12 2009
@@ -30,22 +30,22 @@
     /// <summary> 
     /// Assembler
     /// </summary>
-    public delegate void Processor(NetworkDelegate ndelegate);
+    public delegate void Processor(INetworkDelegate ndelegate);
 
-    public class Assembler : NetworkDelegate, Receiver<ReceivedPayload<ProtocolEvent>>
+    public class Assembler : INetworkDelegate, IReceiver<ReceivedPayload<IProtocolEvent>>
     {
-        private static readonly Logger log = Logger.get(typeof (Assembler));
+        private static readonly Logger log = Logger.Get(typeof (Assembler));
         private readonly Dictionary<int, List<byte[]>> segments;
         private readonly Method[] incomplete;
         [ThreadStatic] static MSDecoder _decoder;
         private readonly Object m_objectLock = new object();
 
         // the event raised when a buffer is read from the wire        
-        public event EventHandler<ReceivedPayload<ProtocolEvent>> ReceivedEvent;
+        public event EventHandler<ReceivedPayload<IProtocolEvent>> ReceivedEvent;
         public event EventHandler<ExceptionArgs> ExceptionProcessing;
         public event EventHandler HandlerClosed;
 
-        event EventHandler<ReceivedPayload<ProtocolEvent>> Receiver<ReceivedPayload<ProtocolEvent>>.Received
+        event EventHandler<ReceivedPayload<IProtocolEvent>> IReceiver<ReceivedPayload<IProtocolEvent>>.Received
         {
             add
             {
@@ -63,7 +63,7 @@
             }
         }
 
-        event EventHandler<ExceptionArgs> Receiver<ReceivedPayload<ProtocolEvent>>.Exception
+        event EventHandler<ExceptionArgs> IReceiver<ReceivedPayload<IProtocolEvent>>.Exception
         {
             add
             {
@@ -81,7 +81,7 @@
             }
         }
 
-        event EventHandler Receiver<ReceivedPayload<ProtocolEvent>>.Closed
+        event EventHandler IReceiver<ReceivedPayload<IProtocolEvent>>.Closed
         {
             add
             {
@@ -106,12 +106,12 @@
         }
 
         // Invoked when a network event is received
-        public void On_ReceivedEvent(object sender, ReceivedPayload<NetworkEvent> payload)
+        public void On_ReceivedEvent(object sender, ReceivedPayload<INetworkEvent> payload)
         {
             payload.Payload.ProcessNetworkEvent(this);
         }
 
-        #region Interface NetworkDelegate
+        #region Interface INetworkDelegate
 
         public void Init(ProtocolHeader header)
         {
@@ -126,41 +126,41 @@
         public void Frame(Frame frame)
         {
             MemoryStream segment;
-            if (frame.isFirstFrame() && frame.isLastFrame())
+            if (frame.IsFirstFrame() && frame.IsLastFrame())
             {                
                 byte[] tmp = new byte[frame.BodySize];
                 frame.Body.Read(tmp, 0, tmp.Length);
                 segment = new MemoryStream();
                 BinaryWriter w = new BinaryWriter(segment);
                 w.Write(tmp);
-                assemble(frame, new MemoryStream(tmp));
+                Assemble(frame, new MemoryStream(tmp));
             }
             else
             {
                 List<byte[]> frames;
-                if (frame.isFirstFrame())
+                if (frame.IsFirstFrame())
                 {
                     frames = new List<byte[]>();
-                    setSegment(frame, frames);
+                    SetSegment(frame, frames);
                 }
                 else
                 {
-                    frames = getSegment(frame);
+                    frames = GetSegment(frame);
                 }
                 byte[] tmp = new byte[frame.BodySize];
                 frame.Body.Read(tmp, 0, tmp.Length);
                 frames.Add(tmp);
 
-                if (frame.isLastFrame())
+                if (frame.IsLastFrame())
                 {
-                    clearSegment(frame);
+                    ClearSegment(frame);
                     segment = new MemoryStream();
                     BinaryWriter w = new BinaryWriter(segment);
                     foreach (byte[] f in frames)
                     {
                         w.Write(f);
                     }
-                    assemble(frame, segment);
+                    Assemble(frame, segment);
                 }
             }
         }
@@ -170,7 +170,7 @@
         #region Private Support Functions
 
 
-        private MSDecoder getDecoder()
+        private MSDecoder GetDecoder()
         {
             if( _decoder == null )
             {
@@ -179,27 +179,27 @@
             return _decoder;
         }
 
-        private void assemble(Frame frame, MemoryStream segment)
+        private void Assemble(Frame frame, MemoryStream segment)
         {
-            MSDecoder decoder = getDecoder();
-            decoder.init(segment);
+            MSDecoder decoder = GetDecoder();
+            decoder.Init(segment);
             int channel = frame.Channel;
             Method command;
             switch (frame.Type)
             {
                 case SegmentType.CONTROL:
-                    int controlType = decoder.readUint16();                    
-                    Method control = Method.create(controlType);
-                    control.read(decoder);
+                    int controlType = decoder.ReadUint16();                    
+                    Method control = Method.Create(controlType);
+                    control.Read(decoder);
                     Emit(channel, control);
                     break;
                 case SegmentType.COMMAND:
-                    int commandType = decoder.readUint16();
+                    int commandType = decoder.ReadUint16();
                      // read in the session header, right now we don't use it
-                    decoder.readUint16();
-                    command = Method.create(commandType);
-                    command.read(decoder);
-                    if (command.hasPayload())
+                    decoder.ReadUint16();
+                    command = Method.Create(commandType);
+                    command.Read(decoder);
+                    if (command.HasPayload())
                     {
                         incomplete[channel] = command;
                     }
@@ -211,12 +211,12 @@
                 case SegmentType.HEADER:
                     command = incomplete[channel];
                     List<Struct> structs = new List<Struct>();
-                    while (decoder.hasRemaining())                    
+                    while (decoder.HasRemaining())                    
                     {
-                        structs.Add(decoder.readStruct32());
+                        structs.Add(decoder.ReadStruct32());
                     }
                     command.Header = new Header(structs);
-                    if (frame.isLastSegment())
+                    if (frame.IsLastSegment())
                     {
                         incomplete[channel] = null;
                         Emit(channel, command);
@@ -234,38 +234,38 @@
             }
         }
 
-        private int segmentKey(Frame frame)
+        private int SegmentKey(Frame frame)
         {
             return (frame.Track + 1)*frame.Channel;
         }
 
-        private List<byte[]> getSegment(Frame frame)
+        private List<byte[]> GetSegment(Frame frame)
         {
-            return segments[segmentKey(frame)];
+            return segments[SegmentKey(frame)];
         }
 
-        private void setSegment(Frame frame, List<byte[]> segment)
+        private void SetSegment(Frame frame, List<byte[]> segment)
         {
-            int key = segmentKey(frame);
+            int key = SegmentKey(frame);
             if (segments.ContainsKey(key))
             {
                 Error(new ProtocolError(network.Frame.L2, "segment in progress: %s",
                                         frame));
             }
-            segments.Add(segmentKey(frame), segment);            
+            segments.Add(SegmentKey(frame), segment);            
         }
 
-        private void clearSegment(Frame frame)
+        private void ClearSegment(Frame frame)
         {
-            segments.Remove(segmentKey(frame));
+            segments.Remove(SegmentKey(frame));
         }
 
         // Emit a protocol event 
-        private void Emit(int channel, ProtocolEvent protevent)
+        private void Emit(int channel, IProtocolEvent protevent)
         {
             protevent.Channel = channel;
-            log.debug("Assembler: protocol event:", protevent);
-            ReceivedPayload<ProtocolEvent> payload = new ReceivedPayload<ProtocolEvent>();
+            log.Debug("Assembler: protocol event:", protevent);
+            ReceivedPayload<IProtocolEvent> payload = new ReceivedPayload<IProtocolEvent>();
             payload.Payload = protevent;
             if (ReceivedEvent != null)
             {
@@ -273,10 +273,10 @@
             }
             else
             {
-                log.debug("No listener for event: {0}", protevent);
+                log.Debug("No listener for event: {0}", protevent);
             }
         }
 
         #endregion
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/network/Disassembler.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/network/Disassembler.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/network/Disassembler.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/network/Disassembler.cs Thu Dec  3 22:31:12 2009
@@ -28,9 +28,9 @@
     /// <summary> 
     /// Disassembler
     /// </summary>
-    public sealed class Disassembler : Sender<ProtocolEvent>, ProtocolDelegate<Object>
+    public sealed class Disassembler : ISender<IProtocolEvent>, IProtocolDelegate<Object>
     {
-        private readonly IIOSender<MemoryStream> _sender;
+        private readonly IIoSender<MemoryStream> _sender;
         private readonly int _maxPayload;
         private readonly MemoryStream _header;
         private readonly BinaryWriter _writer;
@@ -38,38 +38,38 @@
         [ThreadStatic] static MSEncoder _encoder;
 
 
-        public Disassembler(IIOSender<MemoryStream> sender, int maxFrame)
+        public Disassembler(IIoSender<MemoryStream> sender, int maxFrame)
         {
-            if (maxFrame <= Frame.HEADER_SIZE || maxFrame >= 64*1024)
+            if (maxFrame <= network.Frame.HEADER_SIZE || maxFrame >= 64*1024)
             {
-                throw new Exception(String.Format("maxFrame must be > {0} and < 64K: ", Frame.HEADER_SIZE) + maxFrame);
+                throw new Exception(String.Format("maxFrame must be > {0} and < 64K: ", network.Frame.HEADER_SIZE) + maxFrame);
             }
             _sender = sender;
-            _maxPayload = maxFrame - Frame.HEADER_SIZE;
-            _header = new MemoryStream(Frame.HEADER_SIZE);
+            _maxPayload = maxFrame - network.Frame.HEADER_SIZE;
+            _header = new MemoryStream(network.Frame.HEADER_SIZE);
             _writer = new BinaryWriter(_header);
         }
 
         #region Sender Interface 
 
-        public void send(ProtocolEvent pevent)
+        public void Send(IProtocolEvent pevent)
         {
             pevent.ProcessProtocolEvent(null, this);
         }
 
-        public void flush()
+        public void Flush()
         {
             lock (_sendlock)
             {
-                _sender.flush();
+                _sender.Flush();
             }
         }
 
-        public void close()
+        public void Close()
         {
             lock (_sendlock)
             {
-                _sender.close();
+                _sender.Close();
             }
         }
 
@@ -81,19 +81,19 @@
         {
             lock (_sendlock)
             {
-                _sender.send(header.ToMemoryStream());
-                _sender.flush();
+                _sender.Send(header.ToMemoryStream());
+                _sender.Flush();
             }
         }
 
         public void Control(Object v, Method method)
         {
-            invokeMethod(method, SegmentType.CONTROL);
+            InvokeMethod(method, SegmentType.CONTROL);
         }
 
         public void Command(Object v, Method method)
         {
-            invokeMethod(method, SegmentType.COMMAND);
+            InvokeMethod(method, SegmentType.COMMAND);
         }
 
         public void Error(Object v, ProtocolError error)
@@ -105,13 +105,13 @@
 
         #region private 
 
-        private void frame(byte flags, byte type, byte track, int channel, int size, MemoryStream buf)
+        private void Frame(byte flags, byte type, byte track, int channel, int size, MemoryStream buf)
         {
             lock (_sendlock)
             {
                  _writer.Write(flags);
                 _writer.Write(type);
-                _writer.Write(ByteEncoder.GetBigEndian((UInt16)(size + Frame.HEADER_SIZE)));
+                _writer.Write(ByteEncoder.GetBigEndian((UInt16)(size + network.Frame.HEADER_SIZE)));
                 _writer.Write((byte)0);
                 _writer.Write(track);
                 _writer.Write(ByteEncoder.GetBigEndian((UInt16)( channel)));               
@@ -119,16 +119,16 @@
                 _writer.Write((byte)0);
                 _writer.Write((byte)0);
                _writer.Write((byte)0);
-                _sender.send(_header);
+                _sender.Send(_header);
                 _header.Seek(0, SeekOrigin.Begin);               
-                _sender.send(buf, size);
+                _sender.Send(buf, size);
             }
         }
 
-        private void fragment(byte flags, SegmentType type, ProtocolEvent mevent, MemoryStream buf)
+        private void Fragment(byte flags, SegmentType type, IProtocolEvent mevent, MemoryStream buf)
         {
             byte typeb = (byte) type;
-            byte track = mevent.EncodedTrack == Frame.L4 ? (byte) 1 : (byte) 0;
+            byte track = mevent.EncodedTrack == network.Frame.L4 ? (byte) 1 : (byte) 0;
             int remaining = (int) buf.Length;
             buf.Seek(0, SeekOrigin.Begin);
             bool first = true;
@@ -140,15 +140,15 @@
                 byte newflags = flags;
                 if (first)
                 {
-                    newflags |= Frame.FIRST_FRAME;
+                    newflags |= network.Frame.FIRST_FRAME;
                     first = false;
                 }
                 if (remaining == 0)
                 {
-                    newflags |= Frame.LAST_FRAME;
+                    newflags |= network.Frame.LAST_FRAME;
                 }                
 
-                frame(newflags, typeb, track, mevent.Channel, size, buf);
+                Frame(newflags, typeb, track, mevent.Channel, size, buf);
 
                 if (remaining == 0)
                 {
@@ -157,7 +157,7 @@
             }
         }
 
-        private MSEncoder getEncoder()
+        private MSEncoder GetEncoder()
         {
             if( _encoder == null)
             {
@@ -166,31 +166,31 @@
             return _encoder;
         }
 
-        private void invokeMethod(Method method, SegmentType type)
+        private void InvokeMethod(Method method, SegmentType type)
         {
-            MSEncoder encoder = getEncoder();
-            encoder.init();
-            encoder.writeUint16(method.getEncodedType());
+            MSEncoder encoder = GetEncoder();
+            encoder.Init();
+            encoder.WriteUint16(method.GetEncodedType());
             if (type == SegmentType.COMMAND)
             {
                 if (method.Sync)
                 {
-                    encoder.writeUint16(0x0101);
+                    encoder.WriteUint16(0x0101);
                 }
                 else
                 {
-                    encoder.writeUint16(0x0100);
+                    encoder.WriteUint16(0x0100);
                 }
             }
-            method.write(_encoder);
-            MemoryStream methodSeg = encoder.segment();
+            method.Write(_encoder);
+            MemoryStream methodSeg = encoder.Segment();
 
-            byte flags = Frame.FIRST_SEG;
+            byte flags = network.Frame.FIRST_SEG;
 
-            bool payload = method.hasPayload();
+            bool payload = method.HasPayload();
             if (!payload)
             {
-                flags |= Frame.LAST_SEG;
+                flags |= network.Frame.LAST_SEG;
             }
 
             MemoryStream headerSeg = null;
@@ -201,22 +201,22 @@
 
                 foreach (Struct st in structs)
                 {
-                    encoder.writeStruct32(st);
+                    encoder.WriteStruct32(st);
                 }
-                headerSeg = encoder.segment();
+                headerSeg = encoder.Segment();
             }
 
             lock (_sendlock)
             {
-                fragment(flags, type, method, methodSeg);
+                Fragment(flags, type, method, methodSeg);
                 if (payload)
                 {
-                    fragment( 0x0, SegmentType.HEADER, method, headerSeg);
-                    fragment(Frame.LAST_SEG, SegmentType.BODY, method, method.Body);
+                    Fragment( 0x0, SegmentType.HEADER, method, headerSeg);
+                    Fragment(network.Frame.LAST_SEG, SegmentType.BODY, method, method.Body);
                 }
             }
         }
 
         #endregion
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/network/Frame.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/network/Frame.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/network/Frame.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/network/Frame.cs Thu Dec  3 22:31:12 2009
@@ -23,7 +23,7 @@
 
 namespace org.apache.qpid.transport.network
 {
-    public sealed class Frame : NetworkEvent
+    public sealed class Frame : INetworkEvent
     {
         internal static int HEADER_SIZE = 12;
 
@@ -96,48 +96,48 @@
             get { return track; }
         }
 
-        private bool flag(byte mask)
+        private bool Flag(byte mask)
         {
             return (flags & mask) != 0;
         }
 
-        public bool isFirstSegment()
+        public bool IsFirstSegment()
         {
-            return flag(FIRST_SEG);
+            return Flag(FIRST_SEG);
         }
 
-        public bool isLastSegment()
+        public bool IsLastSegment()
         {
-            return flag(LAST_SEG);
+            return Flag(LAST_SEG);
         }
 
-        public bool isFirstFrame()
+        public bool IsFirstFrame()
         {
-            return flag(FIRST_FRAME);
+            return Flag(FIRST_FRAME);
         }
 
-        public bool isLastFrame()
+        public bool IsLastFrame()
         {
-            return flag(LAST_FRAME);
+            return Flag(LAST_FRAME);
         }
 
-        #region NetworkEvent Methods
+        #region INetworkEvent Methods
 
-        public void ProcessNetworkEvent(NetworkDelegate ndelegate)
+        public void ProcessNetworkEvent(INetworkDelegate ndelegate)
         {
             ndelegate.Frame(this);
         }
 
         #endregion
 
-        public String toString()
+        public override String ToString()
         {
             return String.Format
                 ("[{0:d} {1:d} {2:d} {3} {4}{5}{6}{7}] ", Channel, Size, Track, Type,                 
-                 isFirstSegment() ? 1 : 0, isLastSegment() ? 1 : 0,
-                 isFirstFrame() ? 1 : 0, isLastFrame() ? 1 : 0);
+                 IsFirstSegment() ? 1 : 0, IsLastSegment() ? 1 : 0,
+                 IsFirstFrame() ? 1 : 0, IsLastFrame() ? 1 : 0);
         }
 
       
     }
-}
\ No newline at end of file
+}

Copied: qpid/trunk/qpid/dotnet/client-010/client/transport/network/INetworkDelegate.cs (from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/network/INetworkDelegate.cs?p2=qpid/trunk/qpid/dotnet/client-010/client/transport/network/INetworkDelegate.cs&p1=qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs&r1=886946&r2=886962&rev=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/network/INetworkDelegate.cs Thu Dec  3 22:31:12 2009
@@ -18,24 +18,23 @@
 * under the License.
 *
 */
-
-namespace org.apache.qpid.transport.util
+using ProtocolError = org.apache.qpid.transport.ProtocolError;
+using ProtocolHeader = org.apache.qpid.transport.ProtocolHeader;
+namespace org.apache.qpid.transport.network
 {
 	
+	
 	/// <summary> 
-	/// Functions	 
-	/// </summary>
+    /// NetworkDelegate
+	/// </summary>	
 	
-	public class Functions
-	{		
-		public static sbyte lsb(int i)
-		{
-			return (sbyte) (0xFF & i);
-		}
+	public interface INetworkDelegate
+	{
+		
+		void  Init(ProtocolHeader header);
+		
+		void  Frame(Frame frame);
 		
-		public static sbyte lsb(long l)
-		{
-			return (sbyte) (0xFF & l);
-		}				
+		void  Error(ProtocolError error);
 	}
-}
\ No newline at end of file
+}

Copied: qpid/trunk/qpid/dotnet/client-010/client/transport/network/INetworkEvent.cs (from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/network/INetworkEvent.cs?p2=qpid/trunk/qpid/dotnet/client-010/client/transport/network/INetworkEvent.cs&p1=qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs&r1=886946&r2=886962&rev=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/network/INetworkEvent.cs Thu Dec  3 22:31:12 2009
@@ -18,24 +18,15 @@
 * under the License.
 *
 */
-
-namespace org.apache.qpid.transport.util
+namespace org.apache.qpid.transport.network
 {
 	
 	/// <summary> 
-	/// Functions	 
+    /// INetworkEvent
 	/// </summary>
 	
-	public class Functions
+	public interface INetworkEvent
 	{		
-		public static sbyte lsb(int i)
-		{
-			return (sbyte) (0xFF & i);
-		}
-		
-		public static sbyte lsb(long l)
-		{
-			return (sbyte) (0xFF & l);
-		}				
+		 void  ProcessNetworkEvent(INetworkDelegate networkDelegate);
 	}
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/network/InputHandler.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/network/InputHandler.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/network/InputHandler.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/network/InputHandler.cs Thu Dec  3 22:31:12 2009
@@ -28,7 +28,7 @@
     /// <summary> 
     /// InputHandler
     /// </summary>
-    public sealed class InputHandler : Receiver<ReceivedPayload<NetworkEvent>>
+    public sealed class InputHandler : IReceiver<ReceivedPayload<INetworkEvent>>
     {
         public enum State
         {
@@ -38,15 +38,15 @@
             ERROR
         }
 
-        private static readonly Logger log = Logger.get(typeof(InputHandler));
+        private static readonly Logger log = Logger.Get(typeof(InputHandler));
         private readonly Object m_objectLock = new object();
 
         // the event raised when a buffer is read from the wire        
-        public event EventHandler<ReceivedPayload<NetworkEvent>> ReceivedEvent;
+        public event EventHandler<ReceivedPayload<INetworkEvent>> ReceivedEvent;
         public event EventHandler<ExceptionArgs> ExceptionProcessing;
         public event EventHandler HandlerClosed;
 
-        event EventHandler<ReceivedPayload<NetworkEvent>> Receiver<ReceivedPayload<NetworkEvent>>.Received
+        event EventHandler<ReceivedPayload<INetworkEvent>> IReceiver<ReceivedPayload<INetworkEvent>>.Received
         {
             add
             {
@@ -64,7 +64,7 @@
             }
         }
 
-        event EventHandler<ExceptionArgs> Receiver<ReceivedPayload<NetworkEvent>>.Exception
+        event EventHandler<ExceptionArgs> IReceiver<ReceivedPayload<INetworkEvent>>.Exception
         {
             add
             {
@@ -82,7 +82,7 @@
             }
         }
 
-        event EventHandler Receiver<ReceivedPayload<NetworkEvent>>.Closed
+        event EventHandler IReceiver<ReceivedPayload<INetworkEvent>>.Closed
         {
             add
             {
@@ -148,7 +148,7 @@
                         }                      
                         int startPos = (int)buf.Position;
                         int consumed = needed;
-                        state = next(buf);
+                        state = Next(buf);
                         if ((buf.Position - startPos) < consumed)
                         {
                             buf.Seek(consumed  - (buf.Position - startPos), SeekOrigin.Current);
@@ -187,7 +187,7 @@
 
         #region Private Support Functions
 
-        private State next(MemoryStream buf)
+        private State Next(MemoryStream buf)
         {
             BinaryReader reader = new BinaryReader(buf);
 
@@ -216,7 +216,7 @@
                 case State.FRAME_HDR:
                     reader = new BinaryReader(buf, Encoding.BigEndianUnicode);
                     flags = reader.ReadByte();
-                    type = SegmentTypeGetter.get(reader.ReadByte()); // generated code 
+                    type = SegmentTypeGetter.Get(reader.ReadByte()); // generated code 
                     int size =  reader.ReadUInt16();
                     size = ByteEncoder.GetBigEndian((UInt16)size);                    
                     size -= Frame.HEADER_SIZE;
@@ -262,10 +262,10 @@
             Fire_NetworkEvent(new ProtocolError(Frame.L1, fmt, args));            
         }
 
-        private void Fire_NetworkEvent(NetworkEvent netevent)
+        private void Fire_NetworkEvent(INetworkEvent netevent)
         {
-            log.debug("InputHandler: network event:", netevent);
-            ReceivedPayload<NetworkEvent> payload = new ReceivedPayload<NetworkEvent>();
+            log.Debug("InputHandler: network event:", netevent);
+            ReceivedPayload<INetworkEvent> payload = new ReceivedPayload<INetworkEvent>();
             payload.Payload = netevent;
             if (ReceivedEvent != null)
             {
@@ -273,10 +273,10 @@
             }
             else
             {
-                log.debug("Nobody listening for event: {0}");
+                log.Debug("Nobody listening for event: {0}");
             }
         }
 
         #endregion
     }
-}
\ No newline at end of file
+}

Copied: qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IIoSender.cs (from r886946, qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IIoSender.cs?p2=qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IIoSender.cs&p1=qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs&r1=886946&r2=886962&rev=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IIoSender.cs Thu Dec  3 22:31:12 2009
@@ -19,23 +19,10 @@
 *
 */
 
-namespace org.apache.qpid.transport.util
+namespace org.apache.qpid.transport.network
 {
-	
-	/// <summary> 
-	/// Functions	 
-	/// </summary>
-	
-	public class Functions
-	{		
-		public static sbyte lsb(int i)
-		{
-			return (sbyte) (0xFF & i);
-		}
-		
-		public static sbyte lsb(long l)
-		{
-			return (sbyte) (0xFF & l);
-		}				
-	}
-}
\ No newline at end of file
+    public interface IIoSender<T>:ISender<T>
+    {
+        void Send(T body, int siz);
+    }
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IIoTransport.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IIoTransport.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IIoTransport.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IIoTransport.cs Thu Dec  3 22:31:12 2009
@@ -29,7 +29,7 @@
             set;
         }
 
-        Receiver<ReceivedPayload<MemoryStream>> Receiver
+        IReceiver<ReceivedPayload<MemoryStream>> Receiver
         {
             get;
             set;

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoReceiver.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoReceiver.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoReceiver.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoReceiver.cs Thu Dec  3 22:31:12 2009
@@ -29,9 +29,9 @@
     /// <summary> 
     /// IoReceiver
     /// </summary>
-    public sealed class IoReceiver : Receiver<ReceivedPayload<MemoryStream>>
+    public sealed class IoReceiver : IReceiver<ReceivedPayload<MemoryStream>>
     {
-        private static readonly Logger log = Logger.get(typeof(IoReceiver));      
+        private static readonly Logger log = Logger.Get(typeof(IoReceiver));      
         private readonly int m_bufferSize;
         private readonly Stream m_bufStream;
         private readonly int m_timeout;
@@ -44,7 +44,7 @@
         event EventHandler<ExceptionArgs> ExceptionReading;
         event EventHandler ReceiverClosed;
 
-        event EventHandler<ReceivedPayload<MemoryStream>> Receiver<ReceivedPayload<MemoryStream>>.Received
+        event EventHandler<ReceivedPayload<MemoryStream>> IReceiver<ReceivedPayload<MemoryStream>>.Received
         {
             add
             {
@@ -62,7 +62,7 @@
             }
         }
 
-        event EventHandler<ExceptionArgs> Receiver<ReceivedPayload<MemoryStream>>.Exception
+        event EventHandler<ExceptionArgs> IReceiver<ReceivedPayload<MemoryStream>>.Exception
         {
             add
             {
@@ -80,7 +80,7 @@
             }
         }
 
-        event EventHandler Receiver<ReceivedPayload<MemoryStream>>.Closed
+        event EventHandler IReceiver<ReceivedPayload<MemoryStream>>.Closed
         {
             add
             {
@@ -109,7 +109,7 @@
             m_thread.Start();
         }
 
-        public void close()
+        public void Close()
         {
             Mutex mut = new Mutex();
             mut.WaitOne();
@@ -118,7 +118,7 @@
                 m_closed = true;               
                 try
                 {
-                    log.debug("Receiver closing");
+                    log.Debug("Receiver closing");
                     m_bufStream.Close();
                     m_thread.Join(m_timeout);
                     if (m_thread.IsAlive)
@@ -164,11 +164,11 @@
                         buffer = new byte[m_bufferSize];
                     }
                 }
-                log.debug("Receiver thread terminating");
+                log.Debug("Receiver thread terminating");
             }
-            catch (IOException e)
+            catch (IOException)
             {
-                // IOException is thrown when the socket is closed according to the docs
+                // IOException is thrown when the socket is Closed according to the docs
             }
             catch (Exception t)
             {
@@ -186,4 +186,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoSSLTransport.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoSSLTransport.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoSSLTransport.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoSSLTransport.cs Thu Dec  3 22:31:12 2009
@@ -33,15 +33,15 @@
         private const int TIMEOUT = 60000;
         private const int QUEUE_SIZE = 1000;
         // props
-        private static readonly Logger log = Logger.get(typeof (IoSSLTransport));
+        private static readonly Logger log = Logger.Get(typeof (IoSSLTransport));
         private Stream m_stream;
         private IoSender m_sender;
-        private Receiver<ReceivedPayload<MemoryStream>> m_receiver;
+        private IReceiver<ReceivedPayload<MemoryStream>> m_receiver;
         private TcpClient m_socket;
         private Connection m_con;
         private readonly bool _rejectUntrusted;
 
-        public static Connection connect(String host, int port, string serverName, string certPath, bool rejectUntrusted,  ConnectionDelegate conndel)
+        public static Connection Connect(String host, int port, string serverName, string certPath, bool rejectUntrusted,  ConnectionDelegate conndel)
         {            
             IIoTransport transport = new IoSSLTransport(host, port, serverName, certPath, rejectUntrusted, conndel);
             return transport.Connection;
@@ -50,7 +50,7 @@
         public IoSSLTransport(String host, int port, string serverName, string certPath, bool rejectUntrusted, ConnectionDelegate conndel)
         {
             _rejectUntrusted = rejectUntrusted;
-            createSocket(host, port, serverName, certPath);
+            CreateSocket(host, port, serverName, certPath);
             Sender = new IoSender(this, QUEUE_SIZE, TIMEOUT);
             Receiver = new IoReceiver(Stream, Socket.ReceiveBufferSize*2, TIMEOUT);
             Assembler assembler = new Assembler();
@@ -76,7 +76,7 @@
             set { m_con = value; }
         }
 
-        public Receiver<ReceivedPayload<MemoryStream>> Receiver
+        public IReceiver<ReceivedPayload<MemoryStream>> Receiver
         {
             get { return m_receiver; }
             set { m_receiver = value; }
@@ -103,7 +103,7 @@
 
         #region Private Support Functions
 
-        private void createSocket(String host, int port, string serverName, string certPath)
+        private void CreateSocket(String host, int port, string serverName, string certPath)
         {
             TcpClient socket;
             try
@@ -120,10 +120,10 @@
                                             ? DEFAULT_READ_WRITE_BUFFER_SIZE
                                             : int.Parse(writeBufferSize);
 
-                log.debug("NoDelay : {0}", socket.NoDelay);
-                log.debug("ReceiveBufferSize : {0}", socket.ReceiveBufferSize);
-                log.debug("SendBufferSize : {0}", socket.SendBufferSize);
-                log.debug("Openning connection with host : {0}; port: {1}", host, port);
+                log.Debug("NoDelay : {0}", socket.NoDelay);
+                log.Debug("ReceiveBufferSize : {0}", socket.ReceiveBufferSize);
+                log.Debug("SendBufferSize : {0}", socket.SendBufferSize);
+                log.Debug("Openning connection with host : {0}; port: {1}", host, port);
 
                 socket.Connect(host, port);
                 Socket = socket;
@@ -151,10 +151,10 @@
             }
             catch (AuthenticationException e)
             {
-                log.warn("Exception: {0}", e.Message);
+                log.Warn("Exception: {0}", e.Message);
                 if (e.InnerException != null)
                 {
-                    log.warn("Inner exception: {0}", e.InnerException.Message);
+                    log.Warn("Inner exception: {0}", e.InnerException.Message);
                 }
                 socket.Close();
                 throw new TransportException("Authentication failed - closing the connection.");
@@ -171,7 +171,7 @@
             bool result = true;
             if (sslPolicyErrors != SslPolicyErrors.None &&  _rejectUntrusted )
             {
-                log.warn("Certificate error: {0}", sslPolicyErrors);
+                log.Warn("Certificate error: {0}", sslPolicyErrors);
                 // Do not allow this client to communicate with unauthenticated servers.
                 result =  false;  
             }

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoSender.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoSender.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoSender.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoSender.cs Thu Dec  3 22:31:12 2009
@@ -24,9 +24,9 @@
 
 namespace org.apache.qpid.transport.network.io
 {
-    public sealed class IoSender : IIOSender<MemoryStream>
+    public sealed class IoSender : IIoSender<MemoryStream>
     {
-        private static readonly Logger log = Logger.get(typeof (IoReceiver));
+        private static readonly Logger log = Logger.Get(typeof (IoReceiver));
         private readonly Stream bufStream;
         private bool closed;
         private readonly Mutex mutClosed = new Mutex();
@@ -40,25 +40,25 @@
             bufStream = transport.Stream;
             queue = new CircularBuffer<byte[]>(queueSize);
             thread = new Thread(Go);
-            log.debug("Creating IoSender thread");
+            log.Debug("Creating IoSender thread");
             thread.Name = String.Format("IoSender - {0}", transport.Socket) ;
             thread.IsBackground = true;
             thread.Start();
         }
 
-        public void send(MemoryStream str)
+        public void Send(MemoryStream str)
         {
             int pos = (int) str.Position;
             str.Seek(0, SeekOrigin.Begin);
-            send(str, pos);
+            Send(str, pos);
         }
 
-        public void send(MemoryStream str, int size)
+        public void Send(MemoryStream str, int size)
         {
             mutClosed.WaitOne();
             if (closed)
             {
-                throw new TransportException("sender is closed");
+                throw new TransportException("sender is Closed");
             }
             mutClosed.ReleaseMutex();                    
             byte[] buf = new byte[size];
@@ -66,7 +66,7 @@
             _tobeSent.Write(buf, 0, size);          
         }
 
-        public void flush()
+        public void Flush()
         {
             int length = (int)_tobeSent.Position;
             byte[] buf = new byte[length];
@@ -80,16 +80,16 @@
             _tobeSent.Seek(0, SeekOrigin.Begin);
         }
 
-        public void close()
+        public void Close()
         {
-            log.debug("Closing Sender");
+            log.Debug("Closing Sender");
             mutClosed.WaitOne();
             if (!closed)
             {
                 try
                 {
                     closed = true;
-                    queue.close();
+                    queue.Close();
                     thread.Join(timeout);
                     if (thread.IsAlive)
                     {
@@ -131,4 +131,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoTransport.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoTransport.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoTransport.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/network/io/IoTransport.cs Thu Dec  3 22:31:12 2009
@@ -38,14 +38,14 @@
         private const int TIMEOUT = 60000;
         private const int QUEUE_SIZE = 1000;
         // props
-        private static readonly Logger log = Logger.get(typeof (IoTransport));
+        private static readonly Logger log = Logger.Get(typeof (IoTransport));
         private Stream  m_stream;
         private IoSender m_sender;
-        private Receiver<ReceivedPayload<MemoryStream>> m_receiver;
+        private IReceiver<ReceivedPayload<MemoryStream>> m_receiver;
         private TcpClient m_socket;
         private Connection m_con;
 
-        public static Connection connect(String host, int port, ConnectionDelegate conndel)
+        public static Connection Connect(String host, int port, ConnectionDelegate conndel)
         {
             IoTransport transport = new IoTransport(host, port, conndel);
             return transport.Connection;
@@ -53,7 +53,7 @@
 
         public IoTransport(String host, int port, ConnectionDelegate conndel)
         {
-            createSocket(host, port);
+            CreateSocket(host, port);
             Sender = new IoSender(this, QUEUE_SIZE, TIMEOUT);
             Receiver = new IoReceiver(Stream, Socket.ReceiveBufferSize * 2, TIMEOUT);
             Assembler assembler = new Assembler();                 
@@ -79,7 +79,7 @@
             set { m_con = value; }
         }
 
-        public Receiver<ReceivedPayload<MemoryStream>> Receiver
+        public IReceiver<ReceivedPayload<MemoryStream>> Receiver
         {
             get { return m_receiver; }
             set { m_receiver = value; }
@@ -106,7 +106,7 @@
 
         #region Private Support Functions
 
-        private void createSocket(String host, int port)
+        private void CreateSocket(String host, int port)
         {
             try
             {
@@ -118,10 +118,10 @@
                 socket.ReceiveBufferSize = readBufferSize == null ? DEFAULT_READ_WRITE_BUFFER_SIZE : int.Parse(readBufferSize);
                 socket.SendBufferSize = writeBufferSize == null ? DEFAULT_READ_WRITE_BUFFER_SIZE : int.Parse(writeBufferSize);
                 
-                log.debug("NoDelay : {0}", socket.NoDelay);
-                log.debug("ReceiveBufferSize : {0}", socket.ReceiveBufferSize);
-                log.debug("SendBufferSize : {0}", socket.SendBufferSize);
-                log.debug("Openning connection with host : {0}; port: {1}", host, port);
+                log.Debug("NoDelay : {0}", socket.NoDelay);
+                log.Debug("ReceiveBufferSize : {0}", socket.ReceiveBufferSize);
+                log.Debug("SendBufferSize : {0}", socket.SendBufferSize);
+                log.Debug("Openning connection with host : {0}; port: {1}", host, port);
 
                 socket.Connect(host, port);
                 Socket = socket;
@@ -140,4 +140,4 @@
 
         #endregion
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/util/ByteEncoder.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/util/ByteEncoder.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/util/ByteEncoder.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/util/ByteEncoder.cs Thu Dec  3 22:31:12 2009
@@ -34,7 +34,7 @@
         {
             if (BitConverter.IsLittleEndian)
             {
-                return swapByteOrder(value);
+                return SwapByteOrder(value);
             }
             return value;
         }
@@ -48,7 +48,7 @@
         {
             if (BitConverter.IsLittleEndian)
             {
-                return swapByteOrder(value);
+                return SwapByteOrder(value);
             }
             return value;
         }
@@ -62,7 +62,7 @@
         {
             if (BitConverter.IsLittleEndian)
             {
-                return swapByteOrder(value);
+                return SwapByteOrder(value);
             }
             return value;
         }
@@ -76,7 +76,7 @@
         {
             if (BitConverter.IsLittleEndian)
             {
-                return swapByteOrder(value);
+                return SwapByteOrder(value);
             }
             return value;
         }
@@ -85,7 +85,7 @@
         {
             if (BitConverter.IsLittleEndian)
             {
-                return swapByteOrder(value);
+                return SwapByteOrder(value);
             }
             return value;
         }        
@@ -101,7 +101,7 @@
             {
                 return value;
             }
-            return swapByteOrder(value);
+            return SwapByteOrder(value);
         }
 
         /// <summary>
@@ -115,7 +115,7 @@
             {
                 return value;
             }
-            return swapByteOrder(value);
+            return SwapByteOrder(value);
         }
 
         /// <summary>
@@ -129,7 +129,7 @@
             {
                 return value;
             }
-            return swapByteOrder(value);
+            return SwapByteOrder(value);
         }
 
         /// <summary>
@@ -143,7 +143,7 @@
             {
                 return value;
             }
-            return swapByteOrder(value);
+            return SwapByteOrder(value);
         }
         
         public static double GetLittleEndian(double value)
@@ -152,7 +152,7 @@
             {
                 return value;
             }
-            return swapByteOrder(value);
+            return SwapByteOrder(value);
         }        
 
         /// <summary>
@@ -160,7 +160,7 @@
         /// </summary>
         /// <param name="value"><see cref="Int32"/> to swap the bytes of.</param>
         /// <returns>Byte order swapped <see cref="Int32"/>.</returns>
-        private static Int32 swapByteOrder(Int32 value)
+        private static Int32 SwapByteOrder(Int32 value)
         {
             Int32 swapped = (Int32)((0x000000FF) & (value >> 24)
                                      | (0x0000FF00) & (value >> 8)
@@ -174,7 +174,7 @@
         /// </summary>
         /// <param name="value"><see cref="UInt16"/> to swap the bytes of.</param>
         /// <returns>Byte order swapped <see cref="UInt16"/>.</returns>
-        private static UInt16 swapByteOrder(UInt16 value)
+        private static UInt16 SwapByteOrder(UInt16 value)
         {
             return (UInt16)((0x00FF & (value >> 8))
                              | (0xFF00 & (value << 8)));
@@ -185,7 +185,7 @@
         /// </summary>
         /// <param name="value"><see cref="UInt32"/> to swap the bytes of.</param>
         /// <returns>Byte order swapped <see cref="UInt32"/>.</returns>
-        private static UInt32 swapByteOrder(UInt32 value)
+        private static UInt32 SwapByteOrder(UInt32 value)
         {
             UInt32 swapped = ((0x000000FF) & (value >> 24)
                              | (0x0000FF00) & (value >> 8)
@@ -199,14 +199,14 @@
         /// </summary>
         /// <param name="value"><see cref="Double"/> to swap.</param>
         /// <returns>Byte order swapped <see cref="Double"/> value.</returns>
-        private static long swapByteOrder(long value)
+        private static long SwapByteOrder(long value)
         {
             Byte[] buffer = BitConverter.GetBytes(value);
             Array.Reverse(buffer, 0, buffer.Length);
             return BitConverter.ToInt64(buffer, 0);
         }
         
-        private static double swapByteOrder(double value)
+        private static double SwapByteOrder(double value)
         {
             Byte[] buffer = BitConverter.GetBytes(value);
             Array.Reverse(buffer, 0, buffer.Length);

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/util/CircularBuffer.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/util/CircularBuffer.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/util/CircularBuffer.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/util/CircularBuffer.cs Thu Dec  3 22:31:12 2009
@@ -58,7 +58,7 @@
                             Monitor.Wait(this);                    
                 }
                 bool notifyDequeue = countValue <= 0;
-                load(t);
+                Load(t);
                 if (notifyDequeue) //notifyDequeue)
                 {
                     Monitor.PulseAll(this);
@@ -76,7 +76,7 @@
                         Monitor.Wait(this);                  
                 }
                 bool notifyEnqueue = countValue >= (len - 1);
-                T temp = get();
+                T temp = Get();
                 if (notifyEnqueue) //notifyEnqueue)
                 {
                         Monitor.PulseAll(this);               
@@ -85,7 +85,7 @@
             }
         }
 
-        public void close()
+        public void Close()
         {
             nrp = 0;
             nwp = 0;
@@ -99,24 +99,24 @@
 
         #region Private Support Functions
 
-        private void load(T t)
+        private void Load(T t)
         {
             Int32 i = nwp;
             buffer[i] = t;
             i += add;
             if (i < 0) i += len;
             nwp = i;
-            updateCount();
+            UpdateCount();
         }
 
-        private void updateCount()
+        private void UpdateCount()
         {
             countValue = nwp - nrp;
             if (countValue <= 0 )
                 countValue += len; // modulo buffer size			
         }
 
-        private T get()
+        private T Get()
         {
             Int32 i = nrp;
             T temp = buffer[i];           

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/util/Functions.cs Thu Dec  3 22:31:12 2009
@@ -28,14 +28,14 @@
 	
 	public class Functions
 	{		
-		public static sbyte lsb(int i)
+		public static sbyte Lsb(int i)
 		{
 			return (sbyte) (0xFF & i);
 		}
 		
-		public static sbyte lsb(long l)
+		public static sbyte Lsb(long l)
 		{
 			return (sbyte) (0xFF & l);
 		}				
 	}
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/util/Logger.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/util/Logger.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/util/Logger.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/util/Logger.cs Thu Dec  3 22:31:12 2009
@@ -32,7 +32,7 @@
     {
         private readonly ILog log;
 
-        public static Logger get(Type type)
+        public static Logger Get(Type type)
         {
             return new Logger(LogManager.GetLogger(type));
         }
@@ -42,12 +42,12 @@
             this.log = log;
         }
 
-        public bool isDebugEnabled()
+        public bool IsDebugEnabled()
         {
             return log.IsDebugEnabled;
         }
 
-        public void debug(String message, params Object[] args)
+        public void Debug(String message, params Object[] args)
         {
             if (log.IsDebugEnabled)
             {
@@ -55,7 +55,7 @@
             }
         }
 
-        public void debug(Exception t, String message, params Object[] args)
+        public void Debug(Exception t, String message, params Object[] args)
         {
             if (log.IsDebugEnabled)
             {
@@ -63,7 +63,7 @@
             }
         }
 
-        public void error(String message, params Object[] args)
+        public void Error(String message, params Object[] args)
         {
             if (log.IsErrorEnabled)
             {
@@ -71,7 +71,7 @@
             }
         }
 
-        public void error(Exception t, String message, params Object[] args)
+        public void Error(Exception t, String message, params Object[] args)
         {
             if (log.IsErrorEnabled)
             {
@@ -79,7 +79,7 @@
             }
         }
 
-        public void warn(String message, params Object[] args)
+        public void Warn(String message, params Object[] args)
         {
             if (log.IsWarnEnabled)
             {
@@ -87,7 +87,7 @@
             }
         }
 
-        public void warn(Exception t, String message, params Object[] args)
+        public void Warn(Exception t, String message, params Object[] args)
         {
             if (log.IsWarnEnabled)
             {
@@ -95,7 +95,7 @@
             }
         }
 
-        public void info(String message, params Object[] args)
+        public void Info(String message, params Object[] args)
         {
             if (log.IsInfoEnabled)
             {
@@ -103,7 +103,7 @@
             }
         }
 
-        public void info(Exception t, String message, params Object[] args)
+        public void Info(Exception t, String message, params Object[] args)
         {
             if (log.IsInfoEnabled)
             {
@@ -111,4 +111,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs Thu Dec  3 22:31:12 2009
@@ -26,36 +26,36 @@
 
 namespace common.org.apache.qpid.transport.util
 {
-    public class ResultFuture : Future
+    public class ResultFuture : IFuture
     {
         const long _timeout = 60000;
         private Struct _result;
         private Session _session;
-        private static readonly Logger log = Logger.get(typeof(ResultFuture));
+        private static readonly Logger log = Logger.Get(typeof(ResultFuture));
 
-        public Struct get(long timeout)
+        public Struct Get(long timeout)
         {
             lock (this)
             {
                 DateTime start = DateTime.Now;
                 long elapsed = 0;
-                while (! _session.Closed && timeout - elapsed > 0 && _result == null)
+                while (! _session.IsClosed && timeout - elapsed > 0 && _result == null)
                 {
-                        log.debug("{0} waiting for result: {1}", _session, this );
+                        log.Debug("{0} waiting for result: {1}", _session, this );
                         Monitor.Wait(this, (int) (timeout - elapsed));
                         elapsed = (long) (DateTime.Now.Subtract(start)).TotalMilliseconds;
                 }
             }
-            if( _session.Closed )
+            if( _session.IsClosed )
             {
-                throw new SessionException(_session.getExceptions());
+                throw new SessionException(_session.GetExceptions());
             }
            return _result;
         }
 
         public Struct Result
         {
-            get { return get(_timeout); }
+            get { return Get(_timeout); }
             set
             {
                 lock (this)
@@ -71,7 +71,7 @@
             set { _session = value; }
         }
 
-        public String toString()
+        public override String ToString()
         {
             return String.Format("Future({0})", _result);
         }

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/util/Serial.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/util/Serial.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/util/Serial.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/util/Serial.cs Thu Dec  3 22:31:12 2009
@@ -37,39 +37,39 @@
         /// first argument is less than, equal to, or greater than the
         ///  second
         ///
-        public static int compare(int s1, int s2)
+        public static int Compare(int s1, int s2)
         {
             return s1 - s2;
         }
 
-        public static bool lt(int s1, int s2)
+        public static bool Lt(int s1, int s2)
         {
-            return compare(s1, s2) < 0;
+            return Compare(s1, s2) < 0;
         }
 
-        public static bool le(int s1, int s2)
+        public static bool Le(int s1, int s2)
         {
-            return compare(s1, s2) <= 0;
+            return Compare(s1, s2) <= 0;
         }
 
-        public static bool gt(int s1, int s2)
+        public static bool Gt(int s1, int s2)
         {
-            return compare(s1, s2) > 0;
+            return Compare(s1, s2) > 0;
         }
 
-        public static bool ge(int s1, int s2)
+        public static bool Ge(int s1, int s2)
         {
-            return compare(s1, s2) >= 0;
+            return Compare(s1, s2) >= 0;
         }
 
-        public static bool eq(int s1, int s2)
+        public static bool Eq(int s1, int s2)
         {
             return s1 == s2;
         }
 
-        public static int min(int s1, int s2)
+        public static int Min(int s1, int s2)
         {
-            if (lt(s1, s2))
+            if (Lt(s1, s2))
             {
                 return s1;
             }
@@ -79,9 +79,9 @@
             }
         }
 
-        public static int max(int s1, int s2)
+        public static int Max(int s1, int s2)
         {
-            if (gt(s1, s2))
+            if (Gt(s1, s2))
             {
                 return s1;
             }
@@ -91,4 +91,4 @@
             }
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/demo/Demo.csproj
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/demo/Demo.csproj?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/demo/Demo.csproj (original)
+++ qpid/trunk/qpid/dotnet/client-010/demo/Demo.csproj Thu Dec  3 22:31:12 2009
@@ -3,10 +3,10 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{E4C46FBC-7560-406D-BFEF-CA010E584DF4}</ProjectGuid>
-    <OutputType>WinExe</OutputType>
+    <OutputType>Exe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>demo</RootNamespace>
     <AssemblyName>Qpid Demo</AssemblyName>
@@ -15,6 +15,8 @@
     <OldToolsVersion>2.0</OldToolsVersion>
     <UpgradeBackupLocation>
     </UpgradeBackupLocation>
+    <StartupObject>
+    </StartupObject>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
@@ -39,6 +41,7 @@
       <HintPath>..\lib\log4net\log4net.dll</HintPath>
     </Reference>
     <Reference Include="System" />
+    <Reference Include="System.configuration" />
     <Reference Include="System.Data" />
     <Reference Include="System.Deployment" />
     <Reference Include="System.Drawing" />
@@ -46,7 +49,7 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="*.cs" />    
+    <Compile Include="*.cs" />
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -57,6 +60,9 @@
       <DependentUpon>Resources.resx</DependentUpon>
       <DesignTime>True</DesignTime>
     </Compile>
+    <None Include="..\App.config">
+      <Link>App.config</Link>
+    </None>
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -81,4 +87,4 @@
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

Modified: qpid/trunk/qpid/dotnet/client-010/demo/Program.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/demo/Program.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/demo/Program.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/demo/Program.cs Thu Dec  3 22:31:12 2009
@@ -20,6 +20,7 @@
  */
 
 using System;
+using System.Configuration;
 using System.IO;
 using System.Text;
 using System.Threading;
@@ -36,35 +37,43 @@
         {
              XmlConfigurator.Configure(new FileInfo("..\\..\\log.xml"));
             // DOMConfigurator.Configure()            
+
+            string host = ConfigurationManager.AppSettings["Host"];
+            int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
+            string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
+            string username = ConfigurationManager.AppSettings["Username"];
+            string password = ConfigurationManager.AppSettings["Password"];
+
             Client client = new Client();
             Console.WriteLine("Client created");
-            client.connect("192.168.1.14", 5673, "test", "guest", "guest");
+            client.Connect(host, port, virtualhost, username, password);
             Console.WriteLine("Connection established");
 
-            ClientSession ssn = client.createSession(50000);
+            IClientSession ssn = client.CreateSession(50000);
             Console.WriteLine("Session created");
-            ssn.queueDeclare("queue1", null, null);
-            ssn.exchangeBind("queue1", "amq.direct", "queue1", null);
+            ssn.QueueDeclare("queue1", null, null);
+            ssn.ExchangeBind("queue1", "amq.direct", "queue1", null);
 
 
             Object wl = new Object();
-            ssn.attachMessageListener(new MyListener(ssn, wl), "myDest");
+            ssn.AttachMessageListener(new MyListener(ssn, wl), "myDest");
 
-            ssn.messageSubscribe("queue1", "myDest", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED, null,
+            ssn.MessageSubscribe("queue1", "myDest", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED, null,
                                  0, null);
             DateTime start = DateTime.Now;
 
             // issue credits     
-            ssn.messageSetFlowMode("myDest", MessageFlowMode.WINDOW);
-            ssn.messageFlow("myDest", MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
-            ssn.messageFlow("myDest", MessageCreditUnit.MESSAGE, 10000);
-            ssn.sync();
+            ssn.MessageSetFlowMode("myDest", MessageFlowMode.WINDOW);
+            ssn.MessageFlow("myDest", MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
+            ssn.MessageFlow("myDest", MessageCreditUnit.MESSAGE, 10000);
+            ssn.Sync();
+
 
             for (int i = 0; i < 10000; i ++)
             {            
-            ssn.messageTransfer("amq.direct", MessageAcceptMode.NONE, MessageAcquireMode.PRE_ACQUIRED,
-                                new Header(new DeliveryProperties().setRoutingKey("queue1"),
-                                           new MessageProperties().setMessageId(UUID.randomUUID())),
+            ssn.MessageTransfer("amq.direct", MessageAcceptMode.NONE, MessageAcquireMode.PRE_ACQUIRED,
+                                new Header(new DeliveryProperties().SetRoutingKey("queue1"),
+                                           new MessageProperties().SetMessageId(UUID.RandomUuid())),
                                 Encoding.UTF8.GetBytes("test: " + i));
             }
 
@@ -80,24 +89,24 @@
             {
                 Monitor.Wait(wl, 30000);
             }
-            client.close();
+            client.Close();
         }
     }
 
     class MyListener : IMessageListener
     {
         private readonly Object _wl;
-        private ClientSession _session;
+        private IClientSession _session;
         private int _count;
 
-        public MyListener(ClientSession session, object wl)
+        public MyListener(IClientSession session, object wl)
         {
             _wl = wl;
             _session = session;
             _count = 0;
         }
 
-        public void messageTransfer(IMessage m)
+        public void MessageTransfer(IMessage m)
         {
             BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
             byte[] body = new byte[m.Body.Length - m.Body.Position];

Modified: qpid/trunk/qpid/dotnet/client-010/demo/default.build
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/demo/default.build?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/demo/default.build (original)
+++ qpid/trunk/qpid/dotnet/client-010/demo/default.build Thu Dec  3 22:31:12 2009
@@ -39,7 +39,8 @@
          </sources>
          <references>
             <include name="${build.dir}/log4net.dll" />	
-            <include name="${build.dir}/qpid.client.dll" />	
+            <include name="${build.dir}/qpid.client.dll" />
+	    <include name="System.Configuration.dll"/>
          </references>
         </csc>
     </target>

Modified: qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/Listener.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/Listener.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/Listener.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/Listener.cs Thu Dec  3 22:31:12 2009
@@ -18,6 +18,7 @@
 */
 
 using System;
+using System.Configuration;
 using System.IO;
 using System.Text;
 using System.Threading;
@@ -43,34 +44,38 @@
     {        
         private static void Main(string[] args)
         {
-            string host = args.Length > 0 ? args[0] : "localhost";
-            int port = args.Length > 1 ? Convert.ToInt32(args[1]) : 5672;
+            string host = ConfigurationManager.AppSettings["Host"];
+            int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
+            string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
+            string username = ConfigurationManager.AppSettings["Username"];
+            string password = ConfigurationManager.AppSettings["Password"];
+
             Client connection = new Client();
             try
             {
-                connection.connect(host, port, "test", "guest", "guest");
-                ClientSession session = connection.createSession(50000);
+                connection.Connect(host, port, virtualhost, username, password);
+                IClientSession session = connection.CreateSession(50000);
 
                 //--------- Main body of program --------------------------------------------
                 // Create a queue named "message_queue", and route all messages whose
                 // routing key is "routing_key" to this newly created queue.
 
-                session.queueDeclare("message_queue");
-                session.exchangeBind("message_queue", "amq.direct", "routing_key");
+                session.QueueDeclare("message_queue");
+                session.ExchangeBind("message_queue", "amq.direct", "routing_key");
          
                 lock (session)
                 {
                     // Create a listener and subscribe it to the queue named "message_queue"
                     IMessageListener listener = new MessageListener(session);
-                    session.attachMessageListener(listener, "message_queue");                              
-                    session.messageSubscribe("message_queue");
+                    session.AttachMessageListener(listener, "message_queue");                              
+                    session.MessageSubscribe("message_queue");
                     // Receive messages until all messages are received
                     Monitor.Wait(session);
                 }
 
                 //---------------------------------------------------------------------------
 
-                connection.close();
+                connection.Close();
             }
             catch (Exception e)
             {
@@ -81,14 +86,14 @@
 
     public class MessageListener : IMessageListener
     {
-        private readonly ClientSession _session;
+        private readonly IClientSession _session;
         private readonly RangeSet _range = new RangeSet();
-        public MessageListener(ClientSession session)
+        public MessageListener(IClientSession session)
         {            
             _session = session;
         }
 
-        public void messageTransfer(IMessage m)
+        public void MessageTransfer(IMessage m)
         {
             BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
             byte[] body = new byte[m.Body.Length - m.Body.Position];
@@ -97,11 +102,11 @@
             string message = enc.GetString(body);
             Console.WriteLine("Message: " + message);
             // Add this message to the list of message to be acknowledged 
-            _range.add(m.Id);       
+            _range.Add(m.Id);       
             if( message.Equals("That's all, folks!") )
             {
                 // Acknowledge all the received messages 
-                _session.messageAccept(_range);     
+                _session.MessageAccept(_range);     
                 lock(_session)
                 {
                     Monitor.Pulse(_session);

Modified: qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/default.build
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/default.build?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/default.build (original)
+++ qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/default.build Thu Dec  3 22:31:12 2009
@@ -40,6 +40,7 @@
          <references>
             <include name="${build.dir}/log4net.dll" />	
             <include name="${build.dir}/qpid.client.dll" />	
+	    <include name="System.Configuration.dll" />
          </references>
         </csc>
     </target>

Modified: qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/example-direct-Listener.csproj
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/example-direct-Listener.csproj?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/example-direct-Listener.csproj (original)
+++ qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-Listener/example-direct-Listener.csproj Thu Dec  3 22:31:12 2009
@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
+    <ProductVersion>9.0.30729</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{AE65B1B9-8779-4CB1-91AF-E7F6C7A736D7}</ProjectGuid>
     <OutputType>Exe</OutputType>
@@ -35,6 +35,7 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="System" />
+    <Reference Include="System.configuration" />
     <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
   </ItemGroup>
@@ -48,6 +49,11 @@
       <Name>Client</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\..\App.config">
+      <Link>App.config</Link>
+    </None>
+  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.
@@ -56,4 +62,4 @@
   <Target Name="AfterBuild">
   </Target>
   -->
-</Project>
\ No newline at end of file
+</Project>

Modified: qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-producer/Producer.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-producer/Producer.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-producer/Producer.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/examples/direct/example-direct-producer/Producer.cs Thu Dec  3 22:31:12 2009
@@ -18,6 +18,7 @@
 */
 
 using System;
+using System.Configuration;
 using System.Text;
 using org.apache.qpid.client;
 
@@ -40,13 +41,17 @@
     {
         static void Main(string[] args)
         {
-            string host = args.Length > 0 ? args[0] : "localhost";
-            int port = args.Length > 1 ? Convert.ToInt32(args[1]) : 5672;
+            string host = ConfigurationManager.AppSettings["Host"];
+            int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
+            string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
+            string username = ConfigurationManager.AppSettings["Username"];
+            string password = ConfigurationManager.AppSettings["Password"];
+
             Client connection = new Client();
             try
             {
-                connection.connect(host, port, "test", "guest", "guest");
-                ClientSession session = connection.createSession(50000);
+                connection.Connect(host, port, virtualhost, username, password);
+                IClientSession session = connection.CreateSession(50000);
 
                 //--------- Main body of program --------------------------------------------
                 
@@ -57,26 +62,26 @@
                 // just once. (In most simple cases, there is no need to set
                 // other message properties.)
 
-                message.DeliveryProperties.setRoutingKey("routing_key"); 
+                message.DeliveryProperties.SetRoutingKey("routing_key"); 
 
                 // Asynchronous transfer sends messages as quickly as
                 // possible without waiting for confirmation.
                 for (int i = 0; i < 10; i++)
                 {
-                    message.clearData();
-                    message.appendData(Encoding.UTF8.GetBytes("Message " + i));                  
-                    session.messageTransfer("amq.direct", message);                    
+                    message.ClearData();
+                    message.AppendData(Encoding.UTF8.GetBytes("Message " + i));                  
+                    session.MessageTransfer("amq.direct", message);                    
                 }
 
                 // And send a syncrhonous final message to indicate termination.
-                message.clearData();
-                message.appendData(Encoding.UTF8.GetBytes("That's all, folks!"));
-                session.messageTransfer("amq.direct", "routing_key", message); 
-                session.sync();
+                message.ClearData();
+                message.AppendData(Encoding.UTF8.GetBytes("That's all, folks!"));
+                session.MessageTransfer("amq.direct", "routing_key", message); 
+                session.Sync();
 
                 //-----------------------------------------------------------------------------
 
-                connection.close();
+                connection.Close();
             }
             catch (Exception e)
             {



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message