public EnginePair() { Engine1 = new RpcEngine(); Engine2 = new RpcEngine(); _channel1 = new EngineChannel(); Endpoint1 = Engine1.AddEndpoint(_channel1); _channel2 = new EngineChannel(); Endpoint2 = Engine2.AddEndpoint(_channel2); _channel1.OtherEndpoint = Endpoint2; _channel2.OtherEndpoint = Endpoint1; }
public EnginePair(DecisionTree decisionTree) { _decisionTree = decisionTree; Engine1 = new RpcEngine(); Engine2 = new RpcEngine(); _channel1 = new EngineChannel(decisionTree.MakeDecision); Endpoint1 = Engine1.AddEndpoint(_channel1); _channel2 = new EngineChannel(() => false); Endpoint2 = Engine2.AddEndpoint(_channel2); _channel1.OtherEndpoint = Endpoint2; _channel2.OtherEndpoint = Endpoint1; }