public RunServer(string address) { this.machine = new AjSharpMachine(false); this.host = new Host(this.machine); this.service = new ServiceHost(this); BasicHttpBinding binding = new BasicHttpBinding(); this.service.AddServiceEndpoint(typeof(IRunServer), binding, address); this.formatter = new BinaryFormatter(); }
public void EvaluateHostedExpression() { Host host = new Host(new Machine()); Host host2 = new Host(new Machine(false)); host.Machine.Environment.SetValue("host", host2); host2.Machine.Environment.SetValue("foo", "bar"); HostedExpression expression = new HostedExpression(new VariableExpression("foo"), new VariableExpression("host")); object result = expression.Evaluate(host.Machine.Environment); Assert.AreSame(Machine.Current, host.Machine); Assert.AreEqual("bar", result); Assert.IsNull(host.Machine.Environment.GetValue("foo")); }
public void Setup() { this.host = new Host(new AjSharpMachine(false)); }
public void Setup() { this.host = new Host(); }