static FlexInvoke DecodeFlexInvoke(ByteBuffer stream) { int version = stream.ReadByte(); RtmpReader reader = new RtmpReader(stream); string action = reader.ReadData() as string; int invokeId = System.Convert.ToInt32(reader.ReadData()); object cmdData = reader.ReadData(); object[] parameters = Call.EmptyArguments; if (stream.HasRemaining) { #if !(NET_1_1) List<object> paramList = new List<object>(); #else ArrayList paramList = new ArrayList(); #endif while (stream.HasRemaining) { object obj = reader.ReadData(); paramList.Add(obj); } parameters = paramList.ToArray(); } /* int dotIndex = action == null ? -1 : action.LastIndexOf("."); string serviceName = (action == -1) ? null : action.Substring(0, dotIndex); string serviceMethod = (dotIndex == -1) ? action : action.Substring(dotIndex + 1, action.Length - dotIndex - 1); */ PendingCall call = new PendingCall(null, action, parameters); FlexInvoke invoke = new FlexInvoke(invokeId, cmdData); invoke.ServiceCall = call; return invoke; }