示例#1
0
        public void SetArg(int i, TKTProcArg newArg)
        {
            string name = ListArgs[i].ArgName;

            ListArgs[i] = newArg;
            DictArgs.Remove(name);
            DictArgs.Add(newArg.ArgName, newArg);
        }
示例#2
0
 public Request(string url, Func <Response, IEnumerable <object> > callback, HttpMethod method = null, DictHeaders headers = null, HttpContent content = null, DictArgs args = null)
 {
     Url      = url;
     Callback = callback;
     Method   = method ?? HttpMethod.Get;
     Headers  = headers;
     Content  = content;
     Args     = args;
 }
示例#3
0
 public override string ToString()
 {
     return(string.Join(", ", Args.Take(Count).Select(a => a.ToString())) +
            (SequenceArgs.Any() ? ", *" + SequenceArgs.ToString() : "") +
            (DictArgs.Any() ? ", **" + DictArgs.ToString() : ""));
 }
示例#4
0
 public Response(HttpResponseMessage httpResponse, string content, Meta meta = null, DictArgs args = null)
 {
     Url       = httpResponse.RequestMessage.RequestUri.AbsoluteUri;
     _selector = new HtmlDocument();
     _selector.LoadHtml(content);
     Content = content;
     Request = httpResponse.RequestMessage;
     Args    = args ?? new DictArgs();
     Meta    = meta;
 }