private void InitializeEndpoints(IEnumerable <IEndpoint> connectedPoints) { _endpoints.RegisterReceiveHandler(SignalReceivedHandler); foreach (var endpoint in _endpoints) { _inputStatus.Add(endpoint, 0); } _endpoints.Connect(connectedPoints); }
public Wire(IEndpoint point1 = null, IEndpoint point2 = null) { if (point1 != null && point2 != null && Object.ReferenceEquals(point1, point2)) { throw new ArgumentException(DUPLICATE_ENDPOINTS_EXCETION); } _endpoints = new NeutralEndpointCollection <NeutralEndpoint>(2); _endpoints.RegisterReceiveHandler(SignalReceivedHandler); Connect(point1, point2); }