/// <summary> /// Initializes a new instance of the ParallelServiceProxy class /// </summary> /// <param name="client">the proxy client that is used for the interprocess communication</param> /// <param name="remoteObjectName">the name of the remote object providing the required functionality</param> /// <param name="serviceName">the servicename that needs to be restarted on errors</param> protected ParallelServiceProxy(IBidirectionalClient client, string remoteObjectName, string serviceName) : this() { this.client = client; this.remoteObjectName = remoteObjectName; this.serviceName = serviceName; }
/// <summary> /// Initializes a new instance of the ParallelClient class /// </summary> /// <param name="client">the base client that supports connecting the remote service</param> /// <param name="remoteObjectName">the object that is able to process this client's tasks</param> /// <param name="localSystemIdentifier">the identification of the local system</param> protected ParallelClient(IBidirectionalClient client, string remoteObjectName, string localSystemIdentifier) { stopEvent = new ManualResetEvent(false); stoppedEvent = new ManualResetEvent(false); this.checkConnectionTimer = new Timer(TestServer, string.Format("::{0}::", GetHashCode()), Timeout.Infinite, Timeout.Infinite); this.remoteObjectName = remoteObjectName; this.localSystemIdentifier = localSystemIdentifier; this.client = client; client.OperationalChanged += HandleClientOperationalChanged; packageFinishedHandler = new PackageFinishedEventHandler(PackageProcessed); if (!CheckConnection()) { } checkConnectionTimer.Change(CheckTimeout, CheckTimeout); }
/// <summary> /// Initializes a new instance of the ProcessBridgeClient class /// </summary> /// <param name="consumer">the proxy-consumer that provides access to the monitored service</param> /// <param name="serviceName">the name of the bridge service object</param> public ProcessBridgeClient(IBidirectionalClient consumer, string serviceName) { bridge = consumer.CreateProxy <ILogBridge>(serviceName); bridge.LogMessage += LogMessage; }
/// <summary> /// Initializes a new instance of the BidirectionalObjectProxy class /// </summary> /// <param name="serviceClient">the client object that wrapps the connection</param> /// <param name="objectName">the name of the wrapped object</param> /// <param name="expectedServiceType">the exptected object</param> public BidirectionalObjectProxy(IBidirectionalClient serviceClient, string objectName, Type expectedServiceType) : base(serviceClient, objectName, expectedServiceType) { consumer = serviceClient; this.objectName = objectName; }