示例#1
0
        public bool TryGetParameterByKey(string key, out GrimRequestParam param)
        {
            param = Params.ParamList.FirstOrDefault(p => p.Key == key);
            if (param is not null && param.Text is null)
            {
                param.Text = string.Empty;
            }

            return(param is not null);
        }
示例#2
0
        public bool TryGetParameterByIndex(int index, out GrimRequestParam param)
        {
            if (index < 0 || index >= Params.ParamList.Count)
            {
                param = null;
                return(false);
            }

            param = Params.ParamList[index];
            return(true);
        }