public static IBatchable Create(Input command, Environment.Environment env) { var itm = new CmdRequestHttp(); string enc = null, cfg = null; if (command.TrySet(ref cfg, 3, "config") || command.TrySet(ref cfg, 3, "cfg")) { (new configurator(itm, cfg)).Configure(); } if (!command.TrySet(ref itm.Page, name: "page")) { throw new ArgumentException("Webpage not specified"); } command.TrySet(ref itm.Method, name: "method"); command.TrySet(ref itm.Accept, name: "accept"); command.TrySet(ref itm.ContentT, name: "contenttype"); command.TrySet(ref itm.UserAgent, name: "useragent"); decimal tme = 0; if (command.TrySet(ref tme, name: "timeout")) { itm.Timeout = (int)(tme * 1000); } // TODO: Parse encoding command.TrySet(ref enc, name: "encoding"); return(itm); }
public configurator(CmdRequestHttp item, string filepath) : base(filepath) { ITM = item.NotNull(); }
public ProcessorText(CmdRequestHttp item) : base(item) { }
public AResponseProcessor(CmdRequestHttp item) { ITM = item.NotNull(); }