public CrossDomainTextWriter(AppDomain domain, TextWriter writer) { this.remoteTracer = domain.CreateInstanceFrom(Assembly.GetExecutingAssembly().Location, typeof(CrossDomainTextWriter).FullName).Unwrap() as CrossDomainTextWriter; if (remoteTracer != null) { remoteTracer.StartListening(this, writer); } }
public void StartListening(CrossDomainTextWriter farTracer, TextWriter writer) { this.remoteTracer = farTracer; Console.SetOut(writer); }