/// </summary> /// <param name="packageReader"></param> /// <param name="package"></param> /// <returns></returns> protected virtual bool TryBuildPackage(PackageReader packageReader, out RequestPackage package) { package = null; Guid proxySid; packageReader.TryGetParam("ssid", out proxySid); int actionid; if (!packageReader.TryGetParam("actionid", out actionid)) { return(false); } int msgid; if (!packageReader.TryGetParam("msgid", out msgid)) { return(false); } int userId; packageReader.TryGetParam("uid", out userId); string sessionId; string proxyId; int ptcl; packageReader.TryGetParam("sid", out sessionId); packageReader.TryGetParam("proxyId", out proxyId); packageReader.TryGetParam("ptcl", out ptcl); package = new RequestPackage(msgid, sessionId, actionid, userId, ptcl.ToEnum <ProtocolVersion>()) { ProxySid = proxySid, ProxyId = proxyId, IsProxyRequest = packageReader.ContainsKey("isproxy"), RouteName = packageReader.RouteName, IsUrlParam = true, Params = packageReader.Params, Message = packageReader.InputStream, OriginalParam = packageReader.RawParam }; return(true); }