private void SingleConduitConnected(SingleConduitInfo singleConduitInfo, SingleConduitConnected @event) { // Get the multi conduit var singleConduit = conduitNetworkQueryService.GetSingleConduitInfo(@event.SingleConduitId); // Get the walk of interest of the multi conduit var multiConduitWalkOfInterest = routeNetworkQueryService.GetWalkOfInterestInfo(singleConduit.WalkOfInterestId); // Get the node var nodeWhereToConnect = routeNetworkQueryService.GetRouteNodeInfo(@event.PointOfInterestId); if (@event.ConnectedEndKind == ConduitEndKindEnum.Incomming) { var segmentToConnect = singleConduitInfo.Segments.Find(s => s.ToRouteNodeId == @event.PointOfInterestId); segmentToConnect.ToNodeId = @event.ConnectedJunctionId; } else { var segmentToConnect = singleConduitInfo.Segments.Find(s => s.FromRouteNodeId == @event.PointOfInterestId); segmentToConnect.FromNodeId = @event.ConnectedJunctionId; } singleConduitInfo.Name = singleConduitInfo.Name; conduitNetworkQueryService.UpdateSingleConduitInfo(singleConduitInfo); }
private void OnSingleConduitConnected(ConduitClosureInfo conduitClosure, SingleConduitConnected @event) { // Get single conduit var singleConduit = conduitNetworkQueryService.GetSingleConduitInfo(@event.SingleConduitId); ConnectTerminals(conduitClosure, singleConduit, @event.PointOfInterestId, @event.ConnectedJunctionId, @event.ConnectedEndKind); conduitClosureRepository.UpdateConduitClosureInfo(conduitClosure); }
// Apply inner conduit connected event private void Apply(SingleConduitConnected @event) { }