/// <summary> /// Sends an ember/glow tree to the remote host. /// </summary> /// <param name="root">The root of the tree to send.</param> public void Write(EmberLib.Glow.GlowContainer root) { lock (_sync) { var tcpClient = _tcpClient; if (tcpClient != null && tcpClient.Connected) { var output = CreateFramingOutput( (_, e) => { var stream = tcpClient.GetStream(); stream.Write(e.FramedPackage, 0, e.FramedPackageLength); }); using (output) { root.Encode(output); output.Finish(); } } } }
/// <summary> /// Walks a complete glow tree and calls the abstract methods /// OnCommand, OnNode, OnParameter, OnMatrix and OnStreamEntry /// in the process. /// </summary> /// <param name="glow">The root of the glow tree to walk.</param> public void Walk(GlowContainer glow) { if (glow == null) { throw new ArgumentNullException("glow"); } glow.Accept(this, null); }
public GlowRootReadyArgs(EmberLib.Glow.GlowContainer root) { Root = root; }
public GlowFromProviderReadyArgs(GlowContainer root) { Root = root; }