public void SetArg(int i, TKTProcArg newArg) { string name = ListArgs[i].ArgName; ListArgs[i] = newArg; DictArgs.Remove(name); DictArgs.Add(newArg.ArgName, newArg); }
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; }
public override string ToString() { return(string.Join(", ", Args.Take(Count).Select(a => a.ToString())) + (SequenceArgs.Any() ? ", *" + SequenceArgs.ToString() : "") + (DictArgs.Any() ? ", **" + DictArgs.ToString() : "")); }
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; }