static IEnumerable contprint(WvLog log, WvStream s, string prefix) { int i = 0; while (s.ok) { i++; string str = s.read(128).FromUTF8(); log.print("{0}#{1}: {2}\n", prefix, i, str); yield return 0; } }
public MyPage(WvStream s) { add(html(insert_content_here)); twist(); add(head(title("hello title"))); add(body(insert_content_here)); twist(); add(div(_id("foo\" ''"), ul(li(_class("bonk boo"), "hello", _class("chicken")), li("boo"), li("<snoot>")), _class("blue") )); add(ol(new HtmlFunc(foo))); add(ol(lister("one", "two", "three", ol(lister("four", "five"))))); s.print(ToString()); s.print("\n"); }
public WvLogStream(WvStream outstr) { this.outstr = outstr; }
public WvBufStream(WvStream inner) : base(new WvOutBufStream(inner)) { }
public WvOutBufStream(WvStream inner) : base(inner) { }
public WvInBufStream(WvStream inner) : base(inner) { }
public void setinner(WvStream inner) { if (inner != this.inner) { if (hasinner) { this.inner.onreadable -= do_readable; this.inner.onwritable -= do_writable; this.inner.onclose -= do_close; } this.inner = inner; if (hasinner) { if (can_onreadable) this.inner.onreadable += do_readable; if (can_onwritable) this.inner.onwritable += do_writable; this.inner.onclose += do_close; } } }
public WvStreamClone(WvStream inner) { setinner(inner); }