private MemoryStream DoOutput(string functionName, object[] arguments, bool byRef, bool simple, HproseClientContext context) { MemoryStream outData = new MemoryStream(); #if !dotNETMF HproseWriter writer = new HproseWriter(outData, mode, simple); #else HproseWriter writer = new HproseWriter(outData, simple); #endif outData.WriteByte(HproseTags.TagCall); writer.WriteString(functionName); if ((arguments != null) && (arguments.Length > 0 || byRef)) { writer.Reset(); writer.WriteArray(arguments); if (byRef) { writer.WriteBoolean(true); } } outData.WriteByte(HproseTags.TagEnd); outData.Position = 0; for (int i = 0, n = filters.Count; i < n; ++i) { #if (dotNET10 || dotNET11 || dotNETCF10 || dotNETMF) IHproseFilter filter = (IHproseFilter)filters[i]; outData = filter.OutputFilter(outData, context); #else outData = filters[i].OutputFilter(outData, context); #endif outData.Position = 0; } return(outData); }
private void DoOutput(string functionName, object[] arguments, bool byRef, Stream ostream) { HproseWriter hproseWriter = new HproseWriter(ostream, mode); ostream.WriteByte(HproseTags.TagCall); hproseWriter.WriteString(functionName, false); if ((arguments != null) && (arguments.Length > 0 || byRef)) { hproseWriter.Reset(); hproseWriter.WriteArray(arguments, false); if (byRef) { hproseWriter.WriteBoolean(true); } } ostream.WriteByte(HproseTags.TagEnd); }