Example #1
0
            internal object DeserialiseResponseArgs(out object[] outArgs,
                                                    CdrInputStream sourceStream)
            {
                // demarshal first the return value;
                object retValue = null;

                if (m_returnValue.IsNonVoidReturn())
                {
                    retValue = m_returnValue.Deserialize(sourceStream);
                }

                // ... then the outargs
                outArgs = new object[m_arguments.Length];
                bool outArgFound = false;

                for (int actualParamNr = 0; actualParamNr < m_arguments.Length; actualParamNr++)
                {
                    ArgumentMapping paramInfo = m_arguments[actualParamNr];
                    if (paramInfo.IsOutArg() || paramInfo.IsRefArg())
                    {
                        outArgs[actualParamNr] = paramInfo.Deserialize(sourceStream);
                        outArgFound            = true;
                    } // else: for an in param null must be added to out-args
                }

                // prepare the result
                // need to return empty array, if no out-arg is present, because otherwise async calls fail
                if (!outArgFound)
                {
                    outArgs = new object[0];
                }
                return(retValue);
            }
Example #2
0
 internal object[] DeserialiseRequestArgs(CdrInputStream sourceStream,
                                          out IDictionary contextElements,
                                          Serializer contextElementSer)
 {
     object[] result = new object[m_arguments.Length];
     for (int actualParamNr = 0; actualParamNr < m_arguments.Length; actualParamNr++)
     {
         ArgumentMapping paramInfo = m_arguments[actualParamNr];
         if (paramInfo.IsInArg() || paramInfo.IsRefArg())
         {
             result[actualParamNr] = paramInfo.Deserialize(sourceStream);
         } // else: null for an out parameter
     }
     contextElements = DeserializeContextElements(sourceStream, contextElementSer);
     return(result);
 }