qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ai...@apache.org
Subject svn commit: r886962 [2/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
Copied: qpid/trunk/qpid/dotnet/client-010/client/transport/IProtocolDelegate.cs (from r886946, 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/IProtocolDelegate.cs?p2=qpid/trunk/qpid/dotnet/client-010/client/transport/IProtocolDelegate.cs&p1=qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs&r1=886946&r2=886962&rev=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/IProtocolDelegate.cs Thu Dec  3 22:31:12 2009
@@ -19,23 +19,19 @@
 *
 */
 
-using System;
-
 namespace org.apache.qpid.transport
 {
-    public class ExceptionArgs : EventArgs
+    /// <summary> 
+    /// ProtocolDelegate
+    /// </summary>
+    public interface IProtocolDelegate<T>
     {
-        public ExceptionArgs(Exception e)
-        {
-            m_exception = e;
-        }
-        private Exception m_exception;
+        void Init(T context, ProtocolHeader header);
+
+        void Control(T context, Method control);
 
-        public Exception Exception
-        {
-            get { return m_exception; }
-            set { m_exception = value; }
-        }
+        void Command(T context, Method command);
 
+        void Error(T context, ProtocolError error);
     }
 }

Copied: qpid/trunk/qpid/dotnet/client-010/client/transport/IProtocolEvent.cs (from r886946, 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/IProtocolEvent.cs?p2=qpid/trunk/qpid/dotnet/client-010/client/transport/IProtocolEvent.cs&p1=qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs&r1=886946&r2=886962&rev=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/IProtocolEvent.cs Thu Dec  3 22:31:12 2009
@@ -18,24 +18,25 @@
 * under the License.
 *
 */
-
-using System;
-
 namespace org.apache.qpid.transport
 {
-    public class ExceptionArgs : EventArgs
+    /// <summary> 
+    /// IProtocolEvent
+    /// </summary>
+    public interface IProtocolEvent
     {
-        public ExceptionArgs(Exception e)
+        int Channel
         {
-            m_exception = e;
+            get;
+            set;
         }
-        private Exception m_exception;
 
-        public Exception Exception
+        byte EncodedTrack
         {
-            get { return m_exception; }
-            set { m_exception = value; }
+            set; 
+            get;
         }
 
-    }
+        void ProcessProtocolEvent<C>(C context, IProtocolDelegate<C> protocoldelegate);  
+    }    
 }

Copied: qpid/trunk/qpid/dotnet/client-010/client/transport/IReceiver.cs (from r886946, 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/IReceiver.cs?p2=qpid/trunk/qpid/dotnet/client-010/client/transport/IReceiver.cs&p1=qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs&r1=886946&r2=886962&rev=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/IReceiver.cs Thu Dec  3 22:31:12 2009
@@ -18,32 +18,21 @@
 * under the License.
 *
 */
+
 using System;
+
 namespace org.apache.qpid.transport
-{
-	
-	
+{		
 	/// <summary> 
-	/// ConnectionException
+    /// a receiver will raise an event when:
+    /// - data is received 
+    /// - an exception is thrown 
+    /// - it is Closed 
 	/// </summary>
-	
-	[Serializable]
-	public class ConnectionException : Exception
+	public interface IReceiver <T> where T : EventArgs
 	{
-		virtual public ConnectionClose Close
-		{
-			get
-			{
-				return _close;
-			}
-			
-		}
-		
-		private ConnectionClose _close;
-		
-		public ConnectionException(ConnectionClose close):base(close.getReplyText())
-		{
-			_close = close;
-		}
+        event EventHandler<T> Received;
+        event EventHandler<ExceptionArgs> Exception;		
+	    event EventHandler Closed;		
 	}
-}
\ No newline at end of file
+}

Copied: qpid/trunk/qpid/dotnet/client-010/client/transport/ISender.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/ISender.cs?p2=qpid/trunk/qpid/dotnet/client-010/client/transport/ISender.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/ISender.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
 {
-	
-	/// <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
+    /// <summary> 
+    /// Sender
+    /// </summary>
+    public interface ISender<T>
+    {
+        void Send(T msg);
+        void Flush();
+        void Close();
+    }
+}

Added: qpid/trunk/qpid/dotnet/client-010/client/transport/ISession.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/ISession.cs?rev=886962&view=auto
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/ISession.cs (added)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/ISession.cs Thu Dec  3 22:31:12 2009
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+
+namespace org.apache.qpid.transport
+{
+    public interface ISession : IInvoker
+    {
+        bool IsClosed { get; set; }
+        string Name { get; }
+        int CommandsIn { get; set; }
+        byte[] GetName();
+        void SetAutoSync(bool value);
+        Dictionary<int, Method> GetOutstandingCommands();
+        int GetCommandsOut();
+        int NextCommandId();
+        void Identify(Method cmd);
+        void Processed(Method command);
+        void Processed(int command);
+        void Processed(int lower, int upper);
+        void Processed(Range range);
+        void FlushProcessed(params Option[] options);
+        void KnownComplete(RangeSet kc);
+        void SyncPoint();
+        void Attach(Channel channel);
+        Method GetCommand(int id);
+        bool Complete(int lower, int upper);
+        void Sync();
+        void Sync(long timeout);
+        void Result(int command, Struct result);
+        void AddException(ExecutionException exc);
+        void CloseCode(ConnectionClose close);
+        List<ExecutionException> GetExceptions();
+
+        void MessageTransfer(String destination,
+                             MessageAcceptMode acceptMode,
+                             MessageAcquireMode acquireMode,
+                             Header header,
+                             byte[] body,
+                             params Option[] options);
+
+        void MessageTransfer(String destination,
+                             MessageAcceptMode acceptMode,
+                             MessageAcquireMode acquireMode,
+                             Header header,
+                             String body,
+                             params Option[] options);
+
+        void Close();
+        void Exception(Exception t);
+        void Closed();
+    }
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/Method.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/Method.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/Method.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/Method.cs Thu Dec  3 22:31:12 2009
@@ -28,9 +28,9 @@
     /// <summary> 
     /// Method
     /// </summary>
-    public abstract class Method : Struct, ProtocolEvent
+    public abstract class Method : Struct, IProtocolEvent
     {
-        public new static Method create(int type)
+        public new static Method Create(int type)
         {
             return (Method) StructFactory.createInstruction(type);
         }
@@ -65,7 +65,7 @@
             set { batch = value; }
         }
 
-        public abstract bool hasPayload();
+        public abstract bool HasPayload();
 
         public virtual Header Header
         {
@@ -80,9 +80,9 @@
         }
 
 
-        public abstract void dispatch<C>(C context, MethodDelegate<C> mdelegate );
+        public abstract void Dispatch<C>(C context, MethodDelegate<C> mdelegate );
 
-        #region ProtocolEvent
+        #region IProtocolEvent
 
         public int Channel
         {
@@ -92,7 +92,7 @@
 
         public abstract byte EncodedTrack { get; set; }
 
-        public void ProcessProtocolEvent<C>(C context, ProtocolDelegate<C> protocoldelegate)
+        public void ProcessProtocolEvent<C>(C context, IProtocolDelegate<C> protocoldelegate)
         {
             if (EncodedTrack == Frame.L4)
             {
@@ -106,7 +106,7 @@
 
         #endregion
 
-        public new String toString()
+        public override String ToString()
         {
             StringBuilder str = new StringBuilder();
 
@@ -134,10 +134,10 @@
                 str.Append("]");
             }
             str.Append(" ");
-            str.Append(base.toString());
+            str.Append(base.ToString());
             if (Header != null)
             {
-                str.Append(Header.toString());
+                str.Append(Header.ToString());
             }
             if (Body != null)
             {
@@ -147,4 +147,4 @@
             return str.ToString();
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolError.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolError.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolError.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolError.cs Thu Dec  3 22:31:12 2009
@@ -19,15 +19,14 @@
 *
 */
 using System;
-using NetworkDelegate = org.apache.qpid.transport.network.NetworkDelegate;
-using NetworkEvent = org.apache.qpid.transport.network.NetworkEvent;
+using org.apache.qpid.transport.network;
 
 namespace org.apache.qpid.transport
 {
     /// <summary> 
     /// ProtocolError
     /// </summary>
-    public sealed class ProtocolError : NetworkEvent, ProtocolEvent
+    public sealed class ProtocolError : INetworkEvent, IProtocolEvent
     {
         private int channel;
         private byte track;
@@ -41,16 +40,16 @@
             this.args = args;
         }
 
-        #region NetworkEvent Methods
+        #region INetworkEvent Methods
 
-        public void ProcessNetworkEvent(NetworkDelegate ndelegate)
+        public void ProcessNetworkEvent(INetworkDelegate ndelegate)
         {
             ndelegate.Error(this);
         }
 
         #endregion
 
-        #region ProtocolEvent Methods
+        #region IProtocolEvent Methods
 
         public int Channel
         {
@@ -64,7 +63,7 @@
             set { throw new NotImplementedException(); }
         }
 
-        public void ProcessProtocolEvent<C>(C context, ProtocolDelegate<C> protocoldelegate)
+        public void ProcessProtocolEvent<C>(C context, IProtocolDelegate<C> protocoldelegate)
         {
             protocoldelegate.Error(context, this);
         }
@@ -77,10 +76,10 @@
         }
 
 
-        public String toString()
+        public override String ToString()
         {
             return String.Format("protocol error: {0}", Message);
         }
 
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolHeader.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolHeader.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolHeader.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/ProtocolHeader.cs Thu Dec  3 22:31:12 2009
@@ -21,8 +21,7 @@
 using System;
 using System.IO;
 using System.Text;
-using NetworkDelegate = org.apache.qpid.transport.network.NetworkDelegate;
-using NetworkEvent = org.apache.qpid.transport.network.NetworkEvent;
+using org.apache.qpid.transport.network;
 using Frame = org.apache.qpid.transport.network.Frame;
 
 namespace org.apache.qpid.transport
@@ -30,7 +29,7 @@
     /// <summary> ProtocolHeader
     /// 
     /// </summary>
-    public sealed class ProtocolHeader : NetworkEvent, ProtocolEvent
+    public sealed class ProtocolHeader : INetworkEvent, IProtocolEvent
     {
         private readonly char[] AMQP = new char[] {'A', 'M', 'Q', 'P'};
         private const byte CLASS = 1;
@@ -51,16 +50,16 @@
         {
         }
 
-        #region NetworkEvent Methods
+        #region INetworkEvent Methods
 
-        public void ProcessNetworkEvent(NetworkDelegate ndelegate)
+        public void ProcessNetworkEvent(INetworkDelegate ndelegate)
         {
             ndelegate.Init(this);
         }
 
         #endregion
 
-        #region ProtocolEvent Methods
+        #region IProtocolEvent Methods
 
         public int Channel
         {
@@ -83,7 +82,7 @@
             set { throw new NotImplementedException(); }
         }
 
-        public void ProcessProtocolEvent<C>(C context, ProtocolDelegate<C> protocoldelegate)
+        public void ProcessProtocolEvent<C>(C context, IProtocolDelegate<C> protocoldelegate)
         {
             protocoldelegate.Init(context, this);
         }
@@ -117,9 +116,9 @@
             return buf;
         }
 
-        public String toString()
+        public override String ToString()
         {
             return String.Format("AMQP.{0:d} {1:d}-{2:d}", instance, major, minor);
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/Range.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/Range.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/Range.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/Range.cs Thu Dec  3 22:31:12 2009
@@ -52,49 +52,49 @@
             set { _upper = value; }
         }
 
-        public bool includes(int value)
+        public bool Includes(int value)
         {
-            return Serial.le(_lower, value) && Serial.le(value, _upper);
+            return Serial.Le(_lower, value) && Serial.Le(value, _upper);
         }
 
-        public bool includes(Range range)
+        public bool Includes(Range range)
         {
-            return includes(range._lower) && includes(range._upper);
+            return Includes(range._lower) && Includes(range._upper);
         }
 
-        public bool intersects(Range range)
+        public bool Intersects(Range range)
         {
-            return (includes(range._lower) || includes(range._upper) ||
-                    range.includes(_lower) || range.includes(_upper));
+            return (Includes(range._lower) || Includes(range._upper) ||
+                    range.Includes(_lower) || range.Includes(_upper));
         }
 
-        public bool touches(Range range)
+        public bool Touches(Range range)
         {
-            return (intersects(range) ||
-                    includes(range._upper + 1) || includes(range._lower - 1) ||
-                    range.includes(_upper + 1) || range.includes(_lower - 1));
+            return (Intersects(range) ||
+                    Includes(range._upper + 1) || Includes(range._lower - 1) ||
+                    range.Includes(_upper + 1) || range.Includes(_lower - 1));
         }
 
-        public Range span(Range range)
+        public Range Span(Range range)
         {
-            return new Range(Serial.min(_lower, range._lower), Serial.max(_upper, range._upper));
+            return new Range(Serial.Min(_lower, range._lower), Serial.Max(_upper, range._upper));
         }
 
-        public List<Range> subtract(Range range)
+        public List<Range> Subtract(Range range)
         {
             List<Range> result = new List<Range>();
 
-            if (includes(range._lower) && Serial.le(_lower, range._lower - 1))
+            if (Includes(range._lower) && Serial.Le(_lower, range._lower - 1))
             {
                 result.Add(new Range(_lower, range._lower - 1));
             }
 
-            if (includes(range._upper) && Serial.le(range._upper + 1, _upper))
+            if (Includes(range._upper) && Serial.Le(range._upper + 1, _upper))
             {
                 result.Add(new Range(range._upper + 1, _upper));
             }
 
-            if (result.Count == 0 && !range.includes(this))
+            if (result.Count == 0 && !range.Includes(this))
             {
                 result.Add(this);
             }
@@ -102,16 +102,16 @@
             return result;
         }
 
-        public Range intersect(Range range)
+        public Range Intersect(Range range)
         {
-            int l = Serial.max(_lower, range._lower);
-            int r = Serial.min(_upper, range._upper);
-            return Serial.gt(l, r) ? null : new Range(l, r);
+            int l = Serial.Max(_lower, range._lower);
+            int r = Serial.Min(_upper, range._upper);
+            return Serial.Gt(l, r) ? null : new Range(l, r);
         }
 
-        public String toString()
+        public override String ToString()
         {
             return "[" + _lower + ", " + _upper + "]";
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/RangeSet.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/RangeSet.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/RangeSet.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/RangeSet.cs Thu Dec  3 22:31:12 2009
@@ -45,22 +45,22 @@
         }
 
 
-        public int size()
+        public int Size()
         {
             return _ranges.Count;
         }
 
 
-        public Range getFirst()
+        public Range GetFirst()
         {
             return _ranges[0];
         }
 
-        public bool includes(Range range)
+        public bool Includes(Range range)
         {
             foreach (Range r in this)
             {
-                if (r.includes(range))
+                if (r.Includes(range))
                 {
                     return true;
                 }
@@ -69,11 +69,11 @@
             return false;
         }
 
-        public bool includes(int n)
+        public bool Includes(int n)
         {
             foreach (Range r in this)
             {
-                if (r.includes(n))
+                if (r.Includes(n))
                 {
                     return true;
                 }
@@ -82,17 +82,17 @@
             return false;
         }
 
-        public void add(Range range)
+        public void Add(Range range)
         {
             for (int i = 0; i < _ranges.Count; i++)
             {
                 Range r = _ranges[i];
-                if (range.touches(r))
+                if (range.Touches(r))
                 {
                     _ranges.Remove(r);
-                    range = range.span(r);
+                    range = range.Span(r);
                 }
-                else if (Serial.lt(range.Upper, r.Lower))
+                else if (Serial.Lt(range.Upper, r.Lower))
                 {
                     _ranges.Insert(i - 1 , range);
                     return;
@@ -101,22 +101,22 @@
             _ranges.Add(range);
         }
 
-        public void add(int lower, int upper)
+        public void Add(int lower, int upper)
         {
-            add(new Range(lower, upper));
+            Add(new Range(lower, upper));
         }
 
-        public void add(int value)
+        public void Add(int value)
         {
-            add(value, value);
+            Add(value, value);
         }
 
-        public void clear()
+        public void Clear()
         {
             _ranges.Clear();
         }
 
-        public RangeSet copy()
+        public RangeSet Copy()
         {
             RangeSet copy = new RangeSet();
             foreach (Range r in _ranges)
@@ -126,7 +126,7 @@
             return copy;
         }
 
-        public String toString()
+        public override String ToString()
         {
             StringBuilder str = new StringBuilder();
             str.Append("{");
@@ -147,4 +147,4 @@
             return str.ToString();
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/Session.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/Session.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/Session.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/Session.cs Thu Dec  3 22:31:12 2009
@@ -34,9 +34,9 @@
     ///  Session
     /// 
     /// </summary>
-    public class Session : Invoker
+    public class Session : Invoker, ISession
     {
-        private static readonly Logger log = Logger.get(typeof (Session));
+        private static readonly Logger log = Logger.Get(typeof (Session));
         private static readonly bool ENABLE_REPLAY;
 
         static Session()
@@ -77,11 +77,11 @@
         private int _maxComplete = - 1;
         private bool _needSync = false;
         private bool _closed;
-        private readonly Dictionary<int, Future> _results = new Dictionary<int, Future>();
+        private readonly Dictionary<int, IFuture> _results = new Dictionary<int, IFuture>();
         private readonly List<ExecutionException> _exceptions = new List<ExecutionException>();
 
 
-        public bool Closed
+        public bool IsClosed
         {
             get
             {
@@ -113,12 +113,12 @@
             _name = name;
         }
 
-        public byte[] getName()
+        public byte[] GetName()
         {
             return _name;
         }
 
-        public void setAutoSync(bool value)
+        public void SetAutoSync(bool value)
         {
             lock (_commands)
             {
@@ -126,12 +126,12 @@
             }
         }
 
-        public Dictionary<int, Method> getOutstandingCommands()
+        public Dictionary<int, Method> GetOutstandingCommands()
         {
             return _commands;
         }
 
-        public int getCommandsOut()
+        public int GetCommandsOut()
         {
             return _commandsOut;
         }
@@ -142,79 +142,79 @@
             set { _commandsIn = value; }
         }
 
-        public int nextCommandId()
+        public int NextCommandId()
         {
             return _commandsIn++;
         }
 
-        public void identify(Method cmd)
+        public void Identify(Method cmd)
         {
-            int id = nextCommandId();
+            int id = NextCommandId();
             cmd.Id = id;
 
-            if (log.isDebugEnabled())
+            if (log.IsDebugEnabled())
             {
-                log.debug("ID: [{0}] %{1}", _channel, id);
+                log.Debug("ID: [{0}] %{1}", _channel, id);
             }
 
             //if ((id % 65536) == 0)
             if ((id & 0xff) == 0)
             {
-                flushProcessed(Option.TIMELY_REPLY);
+                FlushProcessed(Option.TIMELY_REPLY);
             }
         }
 
-        public void processed(Method command)
+        public void Processed(Method command)
         {
-            processed(command.Id);
+            Processed(command.Id);
         }
 
-        public void processed(int command)
+        public void Processed(int command)
         {
-            processed(new Range(command, command));
+            Processed(new Range(command, command));
         }
 
-        public void processed(int lower, int upper)
+        public void Processed(int lower, int upper)
         {
-            processed(new Range(lower, upper));
+            Processed(new Range(lower, upper));
         }
 
-        public void processed(Range range)
+        public void Processed(Range range)
         {
-            log.debug("{0} processed({1})", this, range);
+            log.Debug("{0} processed({1})", this, range);
 
             bool flush;
             lock (_processedLock)
             {
-                _processed.add(range);
-                Range first = _processed.getFirst();
+                _processed.Add(range);
+                Range first = _processed.GetFirst();
                 int lower = first.Lower;
                 int upper = first.Upper;
                 int old = _maxProcessed;
-                if (Serial.le(lower, _maxProcessed + 1))
+                if (Serial.Le(lower, _maxProcessed + 1))
                 {
-                    _maxProcessed = Serial.max(_maxProcessed, upper);
+                    _maxProcessed = Serial.Max(_maxProcessed, upper);
                 }
-                flush = Serial.lt(old, _syncPoint) && Serial.ge(_maxProcessed, _syncPoint);
+                flush = Serial.Lt(old, _syncPoint) && Serial.Ge(_maxProcessed, _syncPoint);
                 _syncPoint = _maxProcessed;
             }
             if (flush)
             {
-                flushProcessed();
+                FlushProcessed();
             }
         }
 
-        public void flushProcessed(params Option[] options)
+        public void FlushProcessed(params Option[] options)
         {
             RangeSet copy;
             lock (_processedLock)
             {
-                copy = _processed.copy();
+                copy = _processed.Copy();
             }
-            sessionCompleted(copy, options);
+            SessionCompleted(copy, options);
         }
 
-        public void knownComplete(RangeSet kc)
+        public void KnownComplete(RangeSet kc)
         {
             lock (_processedLock)
             {
@@ -223,9 +223,9 @@
                 {
                     foreach (Range kr in kc)
                     {
-                        foreach (Range r in pr.subtract(kr))
+                        foreach (Range r in pr.Subtract(kr))
                         {
-                            newProcessed.add(r);
+                            newProcessed.Add(r);
                         }
                     }
                 }
@@ -233,29 +233,29 @@
             }
         }
 
-        public void syncPoint()
+        public void SyncPoint()
         {
             int id = CommandsIn - 1;
-            log.debug("{0} synced to {1}", this, id);
+            log.Debug("{0} synced to {1}", this, id);
             bool flush;
             lock (_processedLock)
             {
                 _syncPoint = id;
-                flush = Serial.ge(_maxProcessed, _syncPoint);
+                flush = Serial.Ge(_maxProcessed, _syncPoint);
             }
             if (flush)
             {
-                flushProcessed();
+                FlushProcessed();
             }
         }
 
-        public void attach(Channel channel)
+        public void Attach(Channel channel)
         {
             _channel = channel;
             _channel.Session = this;
         }
 
-        public Method getCommand(int id)
+        public Method GetCommand(int id)
         {
             lock (_commands)
             {
@@ -263,35 +263,35 @@
             }
         }
 
-        public bool complete(int lower, int upper)
+        public bool Complete(int lower, int upper)
         {
             //avoid autoboxing
-            if (log.isDebugEnabled())
+            if (log.IsDebugEnabled())
             {
-                log.debug("{0} complete({1}, {2})", this, lower, upper);
+                log.Debug("{0} complete({1}, {2})", this, lower, upper);
             }
             lock (_commands)
             {
                 int old = _maxComplete;
-                for (int id = Serial.max(_maxComplete, lower); Serial.le(id, upper); id++)
+                for (int id = Serial.Max(_maxComplete, lower); Serial.Le(id, upper); id++)
                 {
                     _commands.Remove(id);
                 }
-                if (Serial.le(lower, _maxComplete + 1))
+                if (Serial.Le(lower, _maxComplete + 1))
                 {
-                    _maxComplete = Serial.max(_maxComplete, upper);
+                    _maxComplete = Serial.Max(_maxComplete, upper);
                 }
-                log.debug("{0} commands remaining: {1}", this, _commands);
+                log.Debug("{0} commands remaining: {1}", this, _commands);
                 Monitor.PulseAll(_commands);
-                return Serial.gt(_maxComplete, old);
+                return Serial.Gt(_maxComplete, old);
             }
         }
 
-        protected override void invoke(Method m)
+        protected override void Invoke(Method m)
         {
-            if (Closed)
+            if (IsClosed)
             {
-                List<ExecutionException> exc = getExceptions();
+                List<ExecutionException> exc = GetExceptions();
                 if (exc.Count > 0)
                 {
                     throw new SessionException(exc);
@@ -314,7 +314,7 @@
                     m.Id = next;
                     if (next == 0)
                     {
-                        sessionCommandPoint(0, 0);
+                        SessionCommandPoint(0, 0);
                     }
                     if (ENABLE_REPLAY)
                     {
@@ -325,59 +325,59 @@
                         m.Sync = true;
                     }
                     _needSync = ! m.Sync;
-                    _channel.method(m);
+                    _channel.Method(m);
                     if (_autoSync)
                     {
-                        sync();
+                        Sync();
                     }
 
                     // flush every 64K commands to avoid ambiguity on
                     // wraparound
                     if ((next%65536) == 0)
                     {
-                        sessionFlush(Option.COMPLETED);
+                        SessionFlush(Option.COMPLETED);
                     }
                 }
             }
             else
             {
-                _channel.method(m);
+                _channel.Method(m);
             }
         }
 
-        public void sync()
+        public void Sync()
         {
-            sync(_timeout);
+            Sync(_timeout);
         }
 
-        public void sync(long timeout)
+        public void Sync(long timeout)
         {
-            log.debug("{0} sync()", this);
+            log.Debug("{0} sync()", this);
             lock (_commands)
             {
                 int point = _commandsOut - 1;
 
-                if (_needSync && Serial.lt(_maxComplete, point))
+                if (_needSync && Serial.Lt(_maxComplete, point))
                 {
-                    executionSync(Option.SYNC);
+                    ExecutionSync(Option.SYNC);
                 }
 
                 DateTime start = DateTime.Now;
                 long elapsed = 0;
 
-                while (! Closed && elapsed < timeout && Serial.lt(_maxComplete, point))
+                while (!IsClosed && elapsed < timeout && Serial.Lt(_maxComplete, point))
                 {
-                    log.debug("{0}   waiting for[{1}]: {2}, {3}", this, point,
+                    log.Debug("{0}   waiting for[{1}]: {2}, {3}", this, point,
                               _maxComplete, _commands);
                     Monitor.Wait(_commands, (int) (timeout - elapsed));
                     elapsed = DateTime.Now.Subtract(start).Milliseconds;
                 }
 
-                if (Serial.lt(_maxComplete, point))
+                if (Serial.Lt(_maxComplete, point))
                 {
-                    if (Closed)
+                    if (IsClosed)
                     {
-                        throw new SessionException(getExceptions());
+                        throw new SessionException(GetExceptions());
                     }
                     else
                     {
@@ -390,9 +390,9 @@
         }
 
 
-        public void result(int command, Struct result)
+        public void Result(int command, Struct result)
         {
-            Future future;
+            IFuture future;
             lock (_results)
             {
                 if (_results.ContainsKey(command))
@@ -408,7 +408,7 @@
             future.Result = result;
         }
 
-        public void addException(ExecutionException exc)
+        public void AddException(ExecutionException exc)
         {
             lock (_exceptions)
             {
@@ -418,12 +418,12 @@
 
         private ConnectionClose _close = null;
 
-        public void closeCode(ConnectionClose close)
+        public void CloseCode(ConnectionClose close)
         {
             _close = close;
         }
 
-        public List<ExecutionException> getExceptions()
+        public List<ExecutionException> GetExceptions()
         {
             lock (_exceptions)
             {
@@ -431,7 +431,7 @@
             }
         }
 
-        public override Future invoke(Method m, Future future)     
+        public override IFuture Invoke(Method m, IFuture future)     
         {
             lock (_commands)
             {
@@ -441,13 +441,13 @@
                 {
                     _results.Add(command, future);
                 }
-                invoke(m);
+                Invoke(m);
             }
             return future;
         }
 
 
-        public void messageTransfer(String destination,
+        public void MessageTransfer(String destination,
                                     MessageAcceptMode acceptMode,
                                     MessageAcquireMode acquireMode,
                                     Header header,
@@ -456,31 +456,31 @@
         {
             MemoryStream mbody = new MemoryStream();
             mbody.Write(body,0, body.Length);
-            messageTransfer(destination, acceptMode, acquireMode, header,
+            MessageTransfer(destination, acceptMode, acquireMode, header,
                             mbody, options);
         }
 
-        public void messageTransfer(String destination,
+        public void MessageTransfer(String destination,
                                     MessageAcceptMode acceptMode,
                                     MessageAcquireMode acquireMode,
                                     Header header,
                                     String body,
                                     params Option[] options)
         {
-            messageTransfer(destination, acceptMode, acquireMode, header,
+            MessageTransfer(destination, acceptMode, acquireMode, header,
                             new MemoryStream(Convert.ToByte(body)), options);
         }
 
-        public void close()
+        public void Close()
         {
-            sessionRequestTimeout(0);
-            sessionDetach(_name);
+            SessionRequestTimeout(0);
+            SessionDetach(_name);
             lock (_commands)
             {
                 DateTime start = DateTime.Now;
                 long elapsed = 0;
 
-                while (! Closed && elapsed < _timeout)
+                while (!IsClosed && elapsed < _timeout)
                 {
                     Monitor.Wait(_commands, (int) (_timeout - elapsed));
                     elapsed = DateTime.Now.Subtract(start).Milliseconds;
@@ -488,21 +488,21 @@
             }
         }
 
-        public void exception(Exception t)
+        public void Exception(Exception t)
         {
-            log.error(t, "Caught exception");
+            log.Error(t, "Caught exception");
         }
 
-        public void closed()
+        public void Closed()
         {
-            Closed = true;
+            IsClosed = true;
             lock (_commands)
             {
                 Monitor.PulseAll(_commands);
             }
             lock (_results)
             {
-                foreach (Future result in _results.Values)
+                foreach (IFuture result in _results.Values)
                 {
                     lock (result)
                     {
@@ -514,9 +514,9 @@
             _channel = null;
         }
 
-        public String toString()
+        public override String ToString()
         {
             return String.Format("session:{0}", _name);
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/SessionDelegate.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/SessionDelegate.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/SessionDelegate.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/SessionDelegate.cs Thu Dec  3 22:31:12 2009
@@ -25,7 +25,7 @@
     /// SessionDelegate
     /// 
     /// </summary>
-    public abstract class SessionDelegate : MethodDelegate<Session>, ProtocolDelegate<Session>
+    public abstract class SessionDelegate : MethodDelegate<Session>, IProtocolDelegate<Session>
     {
         public void Init(Session ssn, ProtocolHeader hdr)
         {
@@ -33,16 +33,16 @@
 
         public void Control(Session ssn, Method method)
         {
-            method.dispatch(ssn, this);
+            method.Dispatch(ssn, this);
         }
 
         public void Command(Session ssn, Method method)
         {
-            ssn.identify(method);
-            method.dispatch(ssn, this);
-            if (!method.hasPayload())
+            ssn.Identify(method);
+            method.Dispatch(ssn, this);
+            if (!method.HasPayload())
             {
-                ssn.processed(method);
+                ssn.Processed(method);
             }
         }
 
@@ -50,21 +50,21 @@
         {
         }
 
-        public override void executionResult(Session ssn, ExecutionResult result)
+        public override void ExecutionResult(Session ssn, ExecutionResult result)
         {
-            ssn.result(result.getCommandId(), result.getValue());
+            ssn.Result(result.GetCommandId(), result.GetValue());
         }
 
-        public override void executionException(Session ssn, ExecutionException exc)
+        public override void ExecutionException(Session ssn, ExecutionException exc)
         {
-            ssn.addException(exc);
+            ssn.AddException(exc);
         }
 
-        public override void sessionCompleted(Session ssn, SessionCompleted cmp)
+        public override void SessionCompleted(Session ssn, SessionCompleted cmp)
         {           
-                RangeSet ranges = cmp.getCommands();
+                RangeSet ranges = cmp.GetCommands();
                 RangeSet known = null;
-                if (cmp.getTimelyReply())
+                if (cmp.GetTimelyReply())
                 {
                     known = new RangeSet();
                 }
@@ -73,54 +73,54 @@
                 {
                     foreach (Range range in ranges)
                     {
-                        bool advanced = ssn.complete(range.Lower, range.Upper);
+                        bool advanced = ssn.Complete(range.Lower, range.Upper);
                         if (advanced && known != null)
                         {
-                            known.add(range);
+                            known.Add(range);
                         }
                     }
                 }
 
                 if (known != null)
                 {
-                    ssn.sessionKnownCompleted(known);
+                    ssn.SessionKnownCompleted(known);
                 }           
         }
 
-        public override void sessionKnownCompleted(Session ssn, SessionKnownCompleted kcmp)
+        public override void SessionKnownCompleted(Session ssn, SessionKnownCompleted kcmp)
         {
-            RangeSet kc = kcmp.getCommands();
+            RangeSet kc = kcmp.GetCommands();
             if (kc != null)
             {
-                ssn.knownComplete(kc);
+                ssn.KnownComplete(kc);
             }
         }
 
-        public override void sessionFlush(Session ssn, SessionFlush flush)
+        public override void SessionFlush(Session ssn, SessionFlush flush)
         {
-            if (flush.getCompleted())
+            if (flush.GetCompleted())
             {
-                ssn.flushProcessed();
+                ssn.FlushProcessed();
             }
-            if (flush.getConfirmed())
+            if (flush.GetConfirmed())
             {
-                ssn.flushProcessed();
+                ssn.FlushProcessed();
             }
-            if (flush.getExpected())
+            if (flush.GetExpected())
             {
                // to be done
                 //throw new Exception("not implemented");
             }
         }
 
-        public override void sessionCommandPoint(Session ssn, SessionCommandPoint scp)
+        public override void SessionCommandPoint(Session ssn, SessionCommandPoint scp)
         {
-            ssn.CommandsIn = scp.getCommandId();
+            ssn.CommandsIn = scp.GetCommandId();
         }
 
-        public override void executionSync(Session ssn, ExecutionSync sync)
+        public override void ExecutionSync(Session ssn, ExecutionSync sync)
         {
-            ssn.syncPoint();
+            ssn.SyncPoint();
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/Struct.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/Struct.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/Struct.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/Struct.cs Thu Dec  3 22:31:12 2009
@@ -21,18 +21,17 @@
 using System;
 using System.Collections.Generic;
 using System.Text;
-using Decoder = org.apache.qpid.transport.codec.Decoder;
-using Encodable = org.apache.qpid.transport.codec.Encodable;
-using Encoder = org.apache.qpid.transport.codec.Encoder;
+using org.apache.qpid.transport.codec;
+
 namespace org.apache.qpid.transport
 {
 	/// <summary> 
 	/// Struct
 	/// </summary>
 
-    public abstract class Struct : Encodable
+    public abstract class Struct : IEncodable
     {
-        public  static Struct create(int type)
+        public  static Struct Create(int type)
         {
             return StructFactory.create(type);
         }
@@ -45,15 +44,15 @@
             set { dirty = value; }
         }
 
-        public abstract int getStructType();
+        public abstract int GetStructType();
 
-        public abstract int getSizeWidth();
+        public abstract int GetSizeWidth();
 
-        public abstract int getPackWidth();
+        public abstract int GetPackWidth();
 
-        public int getEncodedType()
+        public int GetEncodedType()
         {
-            int type = getStructType();
+            int type = GetStructType();
             if (type < 0)
             {
                 throw new Exception();
@@ -61,41 +60,41 @@
             return type;
         }
 
-        private bool isBit<C, T>(Field<C, T> f)
+        private bool IsBit<C, T>(Field<C, T> f)
         {
             return Equals(f.Type, typeof(Boolean));
         }
 
-        private bool packed()
+        private bool Packed()
         {
-            return getPackWidth() > 0;
+            return GetPackWidth() > 0;
         }
 
-        private bool encoded<C, T>(Field<C, T> f)
+        private bool Encoded<C, T>(Field<C, T> f)
         {
-            return !packed() || !isBit(f) && f.has(this);
+            return !Packed() || !IsBit(f) && f.Has(this);
         }
 
-        private int getFlagWidth()
+        private int GetFlagWidth()
         {
             return (Fields.Count + 7) / 8;
         }
 
-        private int getFlagCount()
+        private int GetFlagCount()
         {
-            return 8 * getPackWidth();
+            return 8 * GetPackWidth();
         }
 
-        public abstract void read(Decoder dec);
+        public abstract void Read(IDecoder dec);
 
-        public abstract void write(Encoder enc);
+        public abstract void Write(IEncoder enc);
 
         public abstract Dictionary<String, Object> Fields
         {
             get;
         }
 
-        public String toString()
+        public override String ToString()
         {
             StringBuilder str = new StringBuilder();
             str.Append(GetType());
@@ -119,4 +118,4 @@
             return str.ToString();
         }
     }
-}
\ No newline at end of file
+}

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/codec/AbstractDecoder.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/AbstractDecoder.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/codec/AbstractDecoder.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/codec/AbstractDecoder.cs Thu Dec  3 22:31:12 2009
@@ -29,133 +29,133 @@
     /// <summary> 
     /// AbstractDecoder
     /// </summary>
-    public abstract class AbstractDecoder : Decoder
+    public abstract class AbstractDecoder : IDecoder
     {
         private readonly Dictionary<Binary, String> str8cache = new Dictionary<Binary, String>();
 
-        protected abstract byte doGet();
+        protected abstract byte DoGet();
 
-        protected abstract void doGet(byte[] bytes);
-        public abstract bool hasRemaining();
+        protected abstract void DoGet(byte[] bytes);
+        public abstract bool HasRemaining();
 
-        protected byte get()
+        protected byte Get()
         {
-            return doGet();
+            return DoGet();
         }
 
-        protected void get(byte[] bytes)
+        protected void Get(byte[] bytes)
         {
-            doGet(bytes);
+            DoGet(bytes);
         }
 
-        protected Binary get(int size)
+        protected Binary Get(int size)
         {
             byte[] bytes = new byte[size];
-            get(bytes);
+            Get(bytes);
             return new Binary(bytes);
         }
 
-        protected short uget()
+        protected short Uget()
         {
-            return (short) (0xFF & get());
+            return (short) (0xFF & Get());
         }
 
-        public virtual short readUint8()
+        public virtual short ReadUint8()
         {
-            return uget();
+            return Uget();
         }
 
-        public abstract int readUint16();
+        public abstract int ReadUint16();
        
 
-        public abstract long readUint32();
+        public abstract long ReadUint32();
       
 
-        public int readSequenceNo()
+        public int ReadSequenceNo()
         {
-            return (int) readUint32();
+            return (int) ReadUint32();
         }
 
-        public virtual long readUint64()
+        public virtual long ReadUint64()
         {
             long l = 0;
             for (int i = 0; i < 8; i++)
             {
-                l |= ((long) (0xFF & get())) << (56 - i*8);
+                l |= ((long) (0xFF & Get())) << (56 - i*8);
             }
             return l;
         }
 
-        public abstract short readInt8();
-        public abstract int readInt16();       
-        public abstract long readInt32() ;
-        public abstract long readInt64();     
-        public abstract float readFloat() ;  
-        public abstract double readDouble() ;          
+        public abstract short ReadInt8();
+        public abstract int ReadInt16();       
+        public abstract long ReadInt32() ;
+        public abstract long ReadInt64();     
+        public abstract float ReadFloat() ;  
+        public abstract double ReadDouble() ;          
 
-        public long readDatetime()
+        public long ReadDatetime()
         {
-            return readUint64();
+            return ReadUint64();
         }
 
-        private static String decode(byte[] bytes, int offset, int length, Encoding encoding)
+        private static String Decode(byte[] bytes, int offset, int length, Encoding encoding)
         {
             return encoding.GetString(bytes, offset, length);
         }
 
-        private static String decode(byte[] bytes, Encoding encoding)
+        private static String Decode(byte[] bytes, Encoding encoding)
         {
-            return decode(bytes, 0, bytes.Length, encoding);
+            return Decode(bytes, 0, bytes.Length, encoding);
         }
 
-        public String readStr8()
+        public String ReadStr8()
         {
-            short size = readUint8();
-            Binary bin = get(size);
+            short size = ReadUint8();
+            Binary bin = Get(size);
             String str;
             if (! str8cache.TryGetValue(bin, out str))
             {
-                str = decode(bin.array(), bin.offset(), bin.size(), Encoding.UTF8);
+                str = Decode(bin.Array(), bin.Offset(), bin.Size(), Encoding.UTF8);
                 str8cache.Add(bin, str);
             }
             return str;
         }
 
-        public String readStr16()
+        public String ReadStr16()
         {
-            int size = readUint16();
+            int size = ReadUint16();
             byte[] bytes = new byte[size];
-            get(bytes);
-            return decode(bytes, Encoding.UTF8);
+            Get(bytes);
+            return Decode(bytes, Encoding.UTF8);
         }
 
-        public byte[] readVbin8()
+        public byte[] ReadVbin8()
         {
-            int size = readUint8();
+            int size = ReadUint8();
             byte[] bytes = new byte[size];
-            get(bytes);
+            Get(bytes);
             return bytes;
         }
 
-        public byte[] readVbin16()
+        public byte[] ReadVbin16()
         {
-            int size = readUint16();
+            int size = ReadUint16();
             byte[] bytes = new byte[size];
-            get(bytes);
+            Get(bytes);
             return bytes;
         }
 
-        public byte[] readVbin32()
+        public byte[] ReadVbin32()
         {
-            int size = (int) readUint32();
+            int size = (int) ReadUint32();
             byte[] bytes = new byte[size];
-            get(bytes);
+            Get(bytes);
             return bytes;
         }
 
-        public RangeSet readSequenceSet()
+        public RangeSet ReadSequenceSet()
         {
-            int count = readUint16()/8;
+            int count = ReadUint16()/8;
             if (count == 0)
             {
                 return null;
@@ -163,35 +163,35 @@
             RangeSet ranges = new RangeSet();
             for (int i = 0; i < count; i++)
             {
-                ranges.add(readSequenceNo(), readSequenceNo());
+                ranges.Add(ReadSequenceNo(), ReadSequenceNo());
             }
             return ranges;
         }
 
-        public RangeSet readByteRanges()
+        public RangeSet ReadByteRanges()
         {
             throw new Exception("not implemented");
         }
 
-        public UUID readUuid()
+        public UUID ReadUuid()
         {
-            long msb = readUint64();
-            long lsb = readUint64();
+            long msb = ReadUint64();
+            long lsb = ReadUint64();
             return new UUID(msb, lsb);
         }
 
-        public String readContent()
+        public String ReadContent()
         {
             throw new Exception("Deprecated");
         }
 
-        public Struct readStruct(int type)
+        public Struct ReadStruct(int type)
         {
-            Struct st = Struct.create(type);
-            int width = st.getSizeWidth();
+            Struct st = Struct.Create(type);
+            int width = st.GetSizeWidth();
             if (width > 0)
             {
-                long size = readSize(width);
+                long size = ReadSize(width);
                 if (size == 0)
                 {
                     return null;
@@ -199,200 +199,200 @@
             }
             if (type > 0)
             {
-                int code = readUint16();
+                int code = ReadUint16();
                 Debug.Assert(code == type);
             }
-            st.read(this);
+            st.Read(this);
             return st;
         }
 
-        public Struct readStruct32()
+        public Struct ReadStruct32()
         {
-            long size = readUint32();
+            long size = ReadUint32();
             if (size == 0)
             {
                 return null;
             }
-            int type = readUint16();
-            Struct result = Struct.create(type);
-            result.read(this);
+            int type = ReadUint16();
+            Struct result = Struct.Create(type);
+            result.Read(this);
             return result;
         }
 
-        public Dictionary<String, Object> readMap()
+        public Dictionary<String, Object> ReadMap()
         {
-            long size = readUint32();
+            long size = ReadUint32();
 
             if (size == 0)
             {
                 return null;
             }
 
-            long count = readUint32();
+            long count = ReadUint32();
 
             Dictionary<String, Object> result = new Dictionary<String, Object>();
             for (int i = 0; i < count; i++)
             {
-                String key = readStr8();
-                byte code = get();
-                QpidType t = getType(code);
-                Object value = read(t);
+                String key = ReadStr8();
+                byte code = Get();
+                QpidType t = GetType(code);
+                Object value = Read(t);
                 result.Add(key, value);
             }
 
             return result;
         }
 
-        public List<Object> readList()
+        public List<Object> ReadList()
         {
-            long size = readUint32();
+            long size = ReadUint32();
 
             if (size == 0)
             {
                 return null;
             }
 
-            long count = readUint32();
+            long count = ReadUint32();
 
             List<Object> result = new List<Object>();
             for (int i = 0; i < count; i++)
             {
-                byte code = get();
-                QpidType t = getType(code);
-                Object value = read(t);
+                byte code = Get();
+                QpidType t = GetType(code);
+                Object value = Read(t);
                 result.Add(value);
             }
             return result;
         }
 
-        public List<Object> readArray()
+        public List<Object> ReadArray()
         {
-            long size = readUint32();
+            long size = ReadUint32();
 
             if (size == 0)
             {
                 return null;
             }
 
-            byte code = get();
-            QpidType t = getType(code);
-            long count = readUint32();
+            byte code = Get();
+            QpidType t = GetType(code);
+            long count = ReadUint32();
 
             List<Object> result = new List<Object>();
             for (int i = 0; i < count; i++)
             {
-                Object value = read(t);
+                Object value = Read(t);
                 result.Add(value);
             }
             return result;
         }
 
-        private QpidType getType(byte code)
+        private QpidType GetType(byte code)
         {
             return QpidType.get(code);
         }
 
-        private long readSize(QpidType t)
+        private long ReadSize(QpidType t)
         {
-            return t.Fixed ? t.Width : readSize(t.Width);
+            return t.Fixed ? t.Width : ReadSize(t.Width);
         }
 
-        private long readSize(int width)
+        private long ReadSize(int width)
         {
             switch (width)
             {
                 case 1:
-                    return readUint8();
+                    return ReadUint8();
                 case 2:
-                    return readUint16();
+                    return ReadUint16();
                 case 4:
-                    return readUint32();
+                    return ReadUint32();
                 default:
                     throw new Exception("illegal width: " + width);
             }
         }
 
-        private byte[] readBytes(QpidType t)
+        private byte[] ReadBytes(QpidType t)
         {
-            long size = readSize(t);
+            long size = ReadSize(t);
             byte[] result = new byte[(int) size];
-            get(result);
+            Get(result);
             return result;
         }
 
-        private Object read(QpidType t)
+        private Object Read(QpidType t)
         {
             switch (t.Code)
             {
                 case Code.BIN8:
                 case Code.UINT8:
-                    return readUint8();
+                    return ReadUint8();
                 case Code.INT8:
-                    return get();
+                    return Get();
                 case Code.CHAR:
-                    return (char) get();
+                    return (char) Get();
                 case Code.BOOLEAN:
-                    return get() > 0;
+                    return Get() > 0;
 
                 case Code.BIN16:
                 case Code.UINT16:
-                    return readUint16();
+                    return ReadUint16();
                 case Code.INT16:
-                    return (short) readUint16();
+                    return (short) ReadUint16();
 
                 case Code.BIN32:
                 case Code.UINT32:
-                    return readUint32();
+                    return ReadUint32();
 
                 case Code.CHAR_UTF32:
                 case Code.INT32:
-                    return (int) readUint32();
+                    return (int) ReadUint32();
 
                 case Code.FLOAT:                    
-                    return  (float)BitConverter.Int64BitsToDouble(readUint32() << 32);
+                    return  (float)BitConverter.Int64BitsToDouble(ReadUint32() << 32);
                            
                 case Code.BIN64:
                 case Code.UINT64:
                 case Code.INT64:
                 case Code.DATETIME:
-                    return readUint64();
+                    return ReadUint64();
 
                 case Code.DOUBLE:                   
-                    return BitConverter.Int64BitsToDouble(readUint64());
+                    return BitConverter.Int64BitsToDouble(ReadUint64());
                 case Code.UUID:
-                    return readUuid();
+                    return ReadUuid();
                 case Code.STR8:
-                    return readStr8();
+                    return ReadStr8();
                 case Code.STR16:
-                    return readStr16();
+                    return ReadStr16();
                 case Code.STR8_LATIN:
                 case Code.STR8_UTF16:
                 case Code.STR16_LATIN:
                 case Code.STR16_UTF16:
                     // XXX: need to do character conversion
-                    return Encoding.UTF8.GetString(readBytes(t));
+                    return Encoding.UTF8.GetString(ReadBytes(t));
 
                 case Code.MAP:
-                    return readMap();
+                    return ReadMap();
                 case Code.LIST:
-                    return readList();
+                    return ReadList();
                 case Code.ARRAY:
-                    return readArray();
+                    return ReadArray();
                 case Code.STRUCT32:
-                    return readStruct32();
+                    return ReadStruct32();
 
                 case Code.BIN40:
                 case Code.DEC32:
                 case Code.BIN72:
                 case Code.DEC64:
                     // XXX: what types are we supposed to use here?
-                    return readBytes(t);
+                    return ReadBytes(t);
 
                 case Code.VOID:
                     return null;
 
                 default:
-                    return readBytes(t);
+                    return ReadBytes(t);
             }
         }
     }

Modified: qpid/trunk/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs?rev=886962&r1=886961&r2=886962&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs Thu Dec  3 22:31:12 2009
@@ -30,7 +30,7 @@
     /// <summary> 
     /// AbstractEncoder
     /// </summary>
-    public abstract class AbstractEncoder : Encoder
+    public abstract class AbstractEncoder : IEncoder
     {
         private static readonly Dictionary<Type, Code> ENCODINGS = new Dictionary<Type, Code>();
         private readonly Dictionary<String, byte[]> str8cache = new Dictionary<String, byte[]>();
@@ -51,88 +51,88 @@
             ENCODINGS.Add(typeof (byte[]), Code.VBIN32);
         }
 
-        protected abstract void doPut(byte b);
+        protected abstract void DoPut(byte b);
 
-        protected abstract void doPut(MemoryStream src);
+        protected abstract void DoPut(MemoryStream src);
 
 
-        protected void put(byte b)
+        protected void Put(byte b)
         {
-            doPut(b);
+            DoPut(b);
         }
 
-        protected void put(MemoryStream src)
+        protected void Put(MemoryStream src)
         {
-            doPut(src);
+            DoPut(src);
         }
 
-        protected virtual void put(byte[] bytes)
+        protected virtual void Put(byte[] bytes)
         {
-            put(new MemoryStream(bytes));
+            Put(new MemoryStream(bytes));
         }
 
-        protected abstract int beginSize8();
-        protected abstract void endSize8(int pos);
+        protected abstract int BeginSize8();
+        protected abstract void EndSize8(int pos);
 
-        protected abstract int beginSize16();
-        protected abstract void endSize16(int pos);
+        protected abstract int BeginSize16();
+        protected abstract void EndSize16(int pos);
 
-        protected abstract int beginSize32();
-        protected abstract void endSize32(int pos);
+        protected abstract int BeginSize32();
+        protected abstract void EndSize32(int pos);
 
-        public virtual void writeUint8(short b)
+        public virtual void WriteUint8(short b)
         {
             Debug.Assert(b < 0x100);
-            put((byte) b);
+            Put((byte) b);
         }
 
-        public virtual void writeUint16(int s)
+        public virtual void WriteUint16(int s)
         {
             Debug.Assert(s < 0x10000);
-            put((byte) Functions.lsb(s >> 8));
-            put((byte) Functions.lsb(s));
+            Put((byte) Functions.Lsb(s >> 8));
+            Put((byte) Functions.Lsb(s));
         }
 
-        public virtual void writeUint32(long i)
+        public virtual void WriteUint32(long i)
         {
             Debug.Assert(i < 0x100000000L);
-            put((byte) Functions.lsb(i >> 24));
-            put((byte) Functions.lsb(i >> 16));
-            put((byte) Functions.lsb(i >> 8));
-            put((byte) Functions.lsb(i));
+            Put((byte) Functions.Lsb(i >> 24));
+            Put((byte) Functions.Lsb(i >> 16));
+            Put((byte) Functions.Lsb(i >> 8));
+            Put((byte) Functions.Lsb(i));
         }
 
-        public void writeSequenceNo(int i)
+        public void WriteSequenceNo(int i)
         {
-            writeUint32(i);
+            WriteUint32(i);
         }
 
-        public virtual void writeUint64(long l)
+        public virtual void WriteUint64(long l)
         {
             for (int i = 0; i < 8; i++)
             {
-                put((byte) Functions.lsb(l >> (56 - i*8)));
+                Put((byte) Functions.Lsb(l >> (56 - i*8)));
             }
         }
 
-        public abstract void writeInt8(short b) ;
-        public abstract void writeInt16(int s) ;
-        public abstract void writeInt32(long i) ;
-        public abstract void writeInt64(long l) ;
-        public abstract void writeFloat(float f) ;
-        public abstract void writeDouble(double d) ;        
+        public abstract void WriteInt8(short b) ;
+        public abstract void WriteInt16(int s) ;
+        public abstract void WriteInt32(long i) ;
+        public abstract void WriteInt64(long l) ;
+        public abstract void WriteFloat(float f) ;
+        public abstract void WriteDouble(double d) ;        
 
-        public void writeDatetime(long l)
+        public void WriteDatetime(long l)
         {
-            writeUint64(l);
+            WriteUint64(l);
         }
 
-        private static byte[] encode(String s, Encoding encoding)
+        private static byte[] Encode(String s, Encoding encoding)
         {
             return encoding.GetBytes(s);
         }
 
-        public void writeStr8(String s)
+        public void WriteStr8(String s)
         {
             if (s == null)
             {
@@ -142,30 +142,30 @@
             byte[] bytes;
             if (! str8cache.ContainsKey(s))
             {
-                bytes = encode(s, Encoding.UTF8);
+                bytes = Encode(s, System.Text.Encoding.UTF8);
                 str8cache.Add(s, bytes);
             }
             else
             {
                 bytes = str8cache[s];
             }
-            writeUint8((short) bytes.Length);
-            put(bytes);
+            WriteUint8((short) bytes.Length);
+            Put(bytes);
         }
 
-        public void writeStr16(String s)
+        public void WriteStr16(String s)
         {
             if (s == null)
             {
                 s = "";
             }
 
-            byte[] bytes = encode(s, Encoding.UTF8);
-            writeUint16(bytes.Length);
-            put(bytes);
+            byte[] bytes = Encode(s, System.Text.Encoding.UTF8);
+            WriteUint16(bytes.Length);
+            Put(bytes);
         }
 
-        public void writeVbin8(byte[] bytes)
+        public void WriteVbin8(byte[] bytes)
         {
             if (bytes == null)
             {
@@ -175,53 +175,53 @@
             {
                 throw new Exception("array too long: " + bytes.Length);
             }
-            writeUint8((short) bytes.Length);
-            put(bytes);
+            WriteUint8((short) bytes.Length);
+            Put(bytes);
         }
 
-        public void writeVbin16(byte[] bytes)
+        public void WriteVbin16(byte[] bytes)
         {
             if (bytes == null)
             {
                 bytes = new byte[0];
             }
-            writeUint16(bytes.Length);
-            put(bytes);
+            WriteUint16(bytes.Length);
+            Put(bytes);
         }
 
-        public void writeVbin32(byte[] bytes)
+        public void WriteVbin32(byte[] bytes)
         {
             if (bytes == null)
             {
                 bytes = new byte[0];
             }
-            writeUint32(bytes.Length);
-            put(bytes);
+            WriteUint32(bytes.Length);
+            Put(bytes);
         }
 
-        public void writeSequenceSet(RangeSet ranges)
+        public void WriteSequenceSet(RangeSet ranges)
         {
             if (ranges == null)
             {
-                writeUint16(0);
+                WriteUint16(0);
             }
             else
             {
-                writeUint16(ranges.size()*8);
+                WriteUint16(ranges.Size()*8);
                 foreach (Range range in ranges)
                 {
-                    writeSequenceNo(range.Lower);
-                    writeSequenceNo(range.Upper);
+                    WriteSequenceNo(range.Lower);
+                    WriteSequenceNo(range.Upper);
                 }
             }
         }
 
-        public void writeByteRanges(RangeSet ranges)
+        public void WriteByteRanges(RangeSet ranges)
         {
             throw new Exception("not implemented");
         }
 
-        public void writeUuid(UUID uuid)
+        public void WriteUuid(UUID uuid)
         {
             long msb = 0;
             long lsb = 0;
@@ -230,53 +230,53 @@
                 msb = uuid.MostSignificantBits;
                 lsb = uuid.LeastSignificantBits;
             }
-            writeUint64(msb);
-            writeUint64(lsb);
+            WriteUint64(msb);
+            WriteUint64(lsb);
         }
 
-        public void writeStruct(int type, Struct s)
+        public void WriteStruct(int type, Struct s)
         {
             if (s == null)
             {
-                s = Struct.create(type);
+                s = Struct.Create(type);
             }
 
-            int width = s.getSizeWidth();
+            int width = s.GetSizeWidth();
             int pos = -1;
             if (width > 0)
             {
-                pos = beginSize(width);
+                pos = BeginSize(width);
             }
 
             if (type > 0)
             {
-                writeUint16(type);
+                WriteUint16(type);
             }
 
-            s.write(this);
+            s.Write(this);
 
             if (width > 0)
             {
-                endSize(width, pos);
+                EndSize(width, pos);
             }
         }
 
-        public void writeStruct32(Struct s)
+        public void WriteStruct32(Struct s)
         {
             if (s == null)
             {
-                writeUint32(0);
+                WriteUint32(0);
             }
             else
             {
-                int pos = beginSize32();
-                writeUint16(s.getEncodedType());
-                s.write(this);
-                endSize32(pos);
+                int pos = BeginSize32();
+                WriteUint16(s.GetEncodedType());
+                s.Write(this);
+                EndSize32(pos);
             }
         }
 
-        private Code encoding(Object value)
+        private Code Encoding(Object value)
         {
             if (value == null)
             {
@@ -284,7 +284,7 @@
             }
 
             Type klass = value.GetType();
-            Code type = resolve(klass);
+            Code type = Resolve(klass);
 
             if (type == Code.VOID)
             {
@@ -297,7 +297,7 @@
             }
         }
 
-        private static Code resolve(Type klass)
+        private static Code Resolve(Type klass)
         {
             Code type;
             if(ENCODINGS.ContainsKey(klass))
@@ -308,7 +308,7 @@
             Type sup = klass.BaseType;
             if (sup != null)
             {
-                type = resolve(sup);
+                type = Resolve(sup);
 
                 if (type != Code.VOID)
                 {
@@ -317,7 +317,7 @@
             }
             foreach (Type iface in klass.GetInterfaces())
             {
-                type = resolve(iface);
+                type = Resolve(iface);
                 if (type != Code.VOID)
                 {
                     return type;
@@ -326,62 +326,62 @@
             return Code.VOID;
         }
 
-        public void writeMap(Dictionary<String, Object> map)
+        public void WriteMap(Dictionary<String, Object> map)
         {
-            int pos = beginSize32();
+            int pos = BeginSize32();
             if (map != null)
             {
-                writeUint32(map.Count);
-                writeMapEntries(map);
+                WriteUint32(map.Count);
+                WriteMapEntries(map);
             }
-            endSize32(pos);
+            EndSize32(pos);
         }
 
-        protected void writeMapEntries(Dictionary<String, Object> map)
+        protected void WriteMapEntries(Dictionary<String, Object> map)
         {
             foreach (KeyValuePair<String, Object> entry in map)
             {
                 String key = entry.Key;
                 Object value = entry.Value;
-                Code type = encoding(value);
-                writeStr8(key);
-                put((byte) type);
-                write(type, value);
+                Code type = Encoding(value);
+                WriteStr8(key);
+                Put((byte) type);
+                Write(type, value);
             }
         }
 
-        public void writeList(List<Object> list)
+        public void WriteList(List<Object> list)
         {
-            int pos = beginSize32();
+            int pos = BeginSize32();
             if (list != null)
             {
-                writeUint32(list.Count);
-                writeListEntries(list);
+                WriteUint32(list.Count);
+                WriteListEntries(list);
             }
-            endSize32(pos);
+            EndSize32(pos);
         }
 
-        protected void writeListEntries(List<Object> list)
+        protected void WriteListEntries(List<Object> list)
         {
             foreach (Object value in list)
             {
-                Code type = encoding(value);
-                put((byte) type);
-                write(type, value);
+                Code type = Encoding(value);
+                Put((byte) type);
+                Write(type, value);
             }
         }
 
-        public void writeArray(List<Object> array)
+        public void WriteArray(List<Object> array)
         {
-            int pos = beginSize32();
+            int pos = BeginSize32();
             if (array != null)
             {
-                writeArrayEntries(array);
+                WriteArrayEntries(array);
             }
-            endSize32(pos);
+            EndSize32(pos);
         }
 
-        protected void writeArrayEntries(List<Object> array)
+        protected void WriteArrayEntries(List<Object> array)
         {
             Code type;
 
@@ -391,18 +391,18 @@
             }
             else
             {
-                type = encoding(array[0]);
+                type = Encoding(array[0]);
             }
-            put((byte) type);
-            writeUint32(array.Count);
+            Put((byte) type);
+            WriteUint32(array.Count);
 
             foreach (Object value in array)
             {
-                write(type, value);
+                Write(type, value);
             }
         }
 
-        private void writeSize(QpidType t, int size)
+        private void WriteSize(QpidType t, int size)
         {
             if (t.Fixed)
             {
@@ -413,139 +413,139 @@
             }
             else
             {
-                writeSize(t.width, size);
+                WriteSize(t.width, size);
             }
         }
 
-        private void writeSize(int width, int size)
+        private void WriteSize(int width, int size)
         {
             // XXX: should check lengths
             switch (width)
             {
                 case 1:
-                    writeUint8((short) size);
+                    WriteUint8((short) size);
                     break;
                 case 2:
-                    writeUint16(size);
+                    WriteUint16(size);
                     break;
                 case 4:
-                    writeUint32(size);
+                    WriteUint32(size);
                     break;
                 default:
                     throw new Exception("illegal width: " + width);
             }
         }
 
-        private int beginSize(int width)
+        private int BeginSize(int width)
         {
             switch (width)
             {
                 case 1:
-                    return beginSize8();
+                    return BeginSize8();
                 case 2:
-                    return beginSize16();
+                    return BeginSize16();
                 case 4:
-                    return beginSize32();
+                    return BeginSize32();
                 default:
                     throw new Exception("illegal width: " + width);
             }
         }
 
-        private void endSize(int width, int pos)
+        private void EndSize(int width, int pos)
         {
             switch (width)
             {
                 case 1:
-                    endSize8(pos);
+                    EndSize8(pos);
                     break;
                 case 2:
-                    endSize16(pos);
+                    EndSize16(pos);
                     break;
                 case 4:
-                    endSize32(pos);
+                    EndSize32(pos);
                     break;
                 default:
                     throw new Exception("illegal width: " + width);
             }
         }
 
-        private void writeBytes(QpidType t, byte[] bytes)
+        private void WriteBytes(QpidType t, byte[] bytes)
         {
-            writeSize(t, bytes.Length);
-            put(bytes);
+            WriteSize(t, bytes.Length);
+            Put(bytes);
         }
 
-        private void write(Code t, Object value)
+        private void Write(Code t, Object value)
         {
             switch (t)
             {
                 case Code.BIN8:
                 case Code.UINT8:
-                    writeUint8((short) value);
+                    WriteUint8((short) value);
                     break;
                 case Code.INT8:
-                    put((Byte) value);
+                    Put((Byte) value);
                     break;
                 case Code.CHAR:
                     byte[] b = BitConverter.GetBytes((char) value);
-                    put(b[0]);
+                    Put(b[0]);
                     break;
                 case Code.BOOLEAN:
                     if ((bool) value)
                     {
-                        put(1);
+                        Put(1);
                     }
                     else
                     {
-                        put(0);
+                        Put(0);
                     }
 
                     break;
 
                 case Code.BIN16:
                 case Code.UINT16:
-                    writeUint16((int) value);
+                    WriteUint16((int) value);
                     break;
 
                 case Code.INT16:
-                    writeUint16((short) value);
+                    WriteUint16((short) value);
                     break;
 
                 case Code.BIN32:
                 case Code.UINT32:
-                    writeUint32((long) value);
+                    WriteUint32((long) value);
                     break;
 
                 case Code.CHAR_UTF32:
                 case Code.INT32:
-                    writeUint32((int) value);
+                    WriteUint32((int) value);
                     break;
 
                 case Code.FLOAT:
-                    writeUint32(BitConverter.DoubleToInt64Bits((float) value) >> 32);
+                    WriteUint32(BitConverter.DoubleToInt64Bits((float) value) >> 32);
                     break;
 
                 case Code.BIN64:
                 case Code.UINT64:
                 case Code.INT64:                   
                 case Code.DATETIME:
-                    writeUint64((long) value);
+                    WriteUint64((long) value);
                     break;
 
                 case Code.DOUBLE:
-                    writeUint64( BitConverter.DoubleToInt64Bits((double) value));                    
+                    WriteUint64( BitConverter.DoubleToInt64Bits((double) value));                    
                     break;
 
                 case Code.UUID:
-                    writeUuid((UUID) value);
+                    WriteUuid((UUID) value);
                     break;
 
                 case Code.STR8:
-                    writeStr8((string) value);
+                    WriteStr8((string) value);
                     break;
 
                 case Code.STR16:
-                    writeStr16((string) value);
+                    WriteStr16((string) value);
                     break;
 
                 case Code.STR8_LATIN:
@@ -553,20 +553,20 @@
                 case Code.STR16_LATIN:
                 case Code.STR16_UTF16:
                     // XXX: need to do character conversion
-                    writeBytes(QpidType.get((byte) t), encode((string) value, Encoding.Unicode));
+                    WriteBytes(QpidType.get((byte) t), Encode((string) value, System.Text.Encoding.Unicode));
                     break;
 
                 case Code.MAP:
-                    writeMap((Dictionary<String, Object>) value);
+                    WriteMap((Dictionary<String, Object>) value);
                     break;
                 case Code.LIST:
-                    writeList((List<Object>) value);
+                    WriteList((List<Object>) value);
                     break;
                 case Code.ARRAY:
-                    writeList((List<Object>) value);
+                    WriteList((List<Object>) value);
                     break;
                 case Code.STRUCT32:
-                    writeStruct32((Struct) value);
+                    WriteStruct32((Struct) value);
                     break;
 
                 case Code.BIN40:
@@ -574,14 +574,14 @@
                 case Code.BIN72:
                 case Code.DEC64:
                     // XXX: what types are we supposed to use here?
-                    writeBytes(QpidType.get((byte) t), (byte[]) value);
+                    WriteBytes(QpidType.get((byte) t), (byte[]) value);
                     break;
 
                 case Code.VOID:
                     break;
 
                 default:
-                    writeBytes(QpidType.get((byte) t), (byte[]) value);
+                    WriteBytes(QpidType.get((byte) t), (byte[]) value);
                     break;
             }
         }

Added: qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IDecoder.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IDecoder.cs?rev=886962&view=auto
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IDecoder.cs (added)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IDecoder.cs Thu Dec  3 22:31:12 2009
@@ -0,0 +1,72 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using org.apache.qpid.transport.util;
+
+namespace org.apache.qpid.transport.codec
+{		
+	/// <summary> 
+	/// Decoder
+	/// </summary>
+	
+	public interface IDecoder
+	{
+		
+		bool HasRemaining();
+		
+		short ReadUint8();
+		int ReadUint16();
+		long ReadUint32();
+		long ReadUint64();
+
+        short ReadInt8();
+        int ReadInt16();
+        long ReadInt32();
+        long ReadInt64();   
+        
+        double ReadDouble() ;	
+		float ReadFloat() ;		
+		long ReadDatetime();
+	    
+        UUID ReadUuid();
+		
+		int ReadSequenceNo();
+		RangeSet ReadSequenceSet(); // XXX
+		RangeSet ReadByteRanges(); // XXX
+		
+		String ReadStr8();
+		String ReadStr16();
+		
+		byte[] ReadVbin8();
+		byte[] ReadVbin16();
+		byte[] ReadVbin32();
+		
+		Struct ReadStruct32();
+        Dictionary<String, Object> ReadMap();
+        List<Object> ReadList();
+        List<Object> ReadArray();
+
+        Struct ReadStruct(int type);
+	}
+	
+}

Copied: qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IEncodable.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/codec/IEncodable.cs?p2=qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IEncodable.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/codec/IEncodable.cs Thu Dec  3 22:31:12 2009
@@ -19,23 +19,19 @@
 *
 */
 
-namespace org.apache.qpid.transport.util
+namespace org.apache.qpid.transport.codec
 {
 	
+	
 	/// <summary> 
-	/// Functions	 
+    /// Encodable
 	/// </summary>
-	
-	public class Functions
-	{		
-		public static sbyte lsb(int i)
-		{
-			return (sbyte) (0xFF & i);
-		}
 		
-		public static sbyte lsb(long l)
-		{
-			return (sbyte) (0xFF & l);
-		}				
+	public interface IEncodable
+	{
+		
+		void  Write(IEncoder enc);
+		
+		void  Read(IDecoder dec);
 	}
-}
\ No newline at end of file
+}

Added: qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IEncoder.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IEncoder.cs?rev=886962&view=auto
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IEncoder.cs (added)
+++ qpid/trunk/qpid/dotnet/client-010/client/transport/codec/IEncoder.cs Thu Dec  3 22:31:12 2009
@@ -0,0 +1,70 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+
+using System;
+using System.Collections.Generic;
+using org.apache.qpid.transport.util;
+using RangeSet = org.apache.qpid.transport.RangeSet;
+using Struct = org.apache.qpid.transport.Struct;
+namespace org.apache.qpid.transport.codec
+{		
+	/// <summary> 
+    /// Encoder
+	/// </summary>
+	
+	public interface IEncoder
+	{
+		
+		void  WriteUint8(short b);
+		void  WriteUint16(int s);
+		void  WriteUint32(long i);
+		void  WriteUint64(long l);
+
+		void  WriteInt8(short b);
+		void  WriteInt16(int s);
+		void  WriteInt32(long i);
+		void  WriteInt64(long l);      
+		
+		void WriteFloat(float f) ;
+		void WriteDouble(double d) ;  
+		
+		void  WriteDatetime(long l);
+		void  WriteUuid(UUID uuid);
+		
+		void  WriteSequenceNo(int s);
+		void  WriteSequenceSet(RangeSet ranges); // XXX
+		void  WriteByteRanges(RangeSet ranges); // XXX
+		
+		void  WriteStr8(string s);
+		void  WriteStr16(string s);
+		
+		void  WriteVbin8(byte[] bytes);
+		void  WriteVbin16(byte[] bytes);
+		void  WriteVbin32(byte[] bytes);
+		
+		void WriteStruct32(Struct s);
+        void WriteMap(Dictionary<String, Object> map);
+        void WriteList(List<Object> list);
+        void WriteArray(List<Object> array);
+
+        void WriteStruct(int type, Struct s);
+	}
+}



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


Mime
View raw message