2004-12-08 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / class / corlib / System.Runtime.Serialization.Formatters.Binary / MessageFormatter.cs
index 012ac230c0f7d6d7977c3c220ec7b7ace824bbd5..8347f04482343753eb869167295202084d2caa72 100644 (file)
@@ -5,6 +5,29 @@
 //
 // (C) 2003, Lluis Sanchez Gual
 //\r
+
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
 \r
 using System;\r
 using System.IO;\r
@@ -201,10 +224,10 @@ namespace System.Runtime.Serialization.Formatters.Binary
 \r
                        if (formatFlag == MethodFlags.PrimitiveArguments)\r
                        {\r
-                               writer.Write ((uint)resp.OutArgCount);\r
-                               for (int n=0; n<resp.OutArgCount; n++)\r
+                               writer.Write ((uint)resp.ArgCount);\r
+                               for (int n=0; n<resp.ArgCount; n++)\r
                                {\r
-                                       object val = resp.GetOutArg(n);\r
+                                       object val = resp.GetArg(n);\r
                                        if (val != null) {\r
                                                writer.Write (BinaryCommon.GetTypeCode (val.GetType()));\r
                                                ObjectWriter.WritePrimitiveValue (writer, val);\r
@@ -263,7 +286,7 @@ namespace System.Runtime.Serialization.Formatters.Binary
                        if (((BinaryTypeCode)reader.ReadByte()) != BinaryTypeCode.String) throw new SerializationException ("Invalid format");\r
                        string className = reader.ReadString();\r
 \r
-                       bool hasContextInfo = (flags & MethodFlags.IncludesLogicalCallContext) > 0;
+                       //bool hasContextInfo = (flags & MethodFlags.IncludesLogicalCallContext) > 0;
 
                        object[] arguments = null;
                        object methodSignature = null;