コード例 #1
0
        private RequestArgs Reset()
        {
            isBusy   = false;
            issended = false;
            Method   = context.Request.HttpMethod.ToUpper();
            var h = context.Request.Headers.ToString();

            Params.Clear();
            JContext.Reset();
            JContext.ResetParameterSerialiers();
            _bodyASJson = null;
            var rawurl = context.Request.RawUrl.Split('?');
            var raw    = rawurl[0].Split('/');

            if (rawurl.Length > 1)
            {
                UpdateParams(rawurl[1]);
            }
            if (raw[1] == "_" || raw[1] == "Login")
            {
                Path = new string[raw.Length - 2];
                Array.Copy(raw, 2, Path, 0, Path.Length);
                IsFile = false;
                if (Path.Length > 0)
                {
                    Service = Server.GetService(Path[0]);
                }
            }
            else
            {
                IsFile  = true;
                Path    = null;
                Service = null;
            }
            _bodyASJson = null;
            _bytes      = null;
            return(this);
        }