public void Handle(RemovedEvent eventToHandle) { if (canHandle(eventToHandle)) { Edit(_eventBuilder); } }
public void Handle(RemovedEvent eventToHandle) { if (eventToHandle.RemovedObjects.Any(shouldHandleRemoved) && Equals(eventToHandle.Parent, BuildingBlock)) { Edit(_reactionBuildingBlock); } }
public void Handle(RemovedEvent eventToHandle) { foreach (var removedObject in eventToHandle.RemovedObjects) { ClearComparisonIfComparing(removedObject); } }
public void Handle(RemovedEvent eventToHandle) { foreach (var removedObject in eventToHandle.RemovedObjects) { Close(removedObject); } }
public void Handle(RemovedEvent eventToHandle) { if (!eventToHandle.RemovedObjects.Any(shouldHandleRemoved)) { return; } setInitalView(); }
private bool canHandle(RemovedEvent eventToHandle) { if (_eventBuilder == null) { return(false); } return(eventToHandle.RemovedObjects.Any(removedObject => removedObject.IsAnImplementationOf <IEventAssignmentBuilder>() || removedObject.IsAnImplementationOf <IParameter>())); }
protected override void Context() { base.Context(); _project = A.Fake <IMoBiProject>(); _context = A.Fake <IMoBiContext>(); A.CallTo(() => _context.CurrentProject).Returns(_project); A.CallTo(() => _context.PublishEvent(A <RemovedEvent> ._)) .Invokes(x => _event = x.GetArgument <RemovedEvent>(0)); }
public void Handle(RemovedEvent eventToHandle) { foreach (var removedObject in eventToHandle.RemovedObjects) { if (_view.Shows(removedObject)) { _view.Remove(removedObject); } } }
/// <summary> /// Handles the specified event to handle. /// </summary> /// <param name="eventToHandle"> The event to handle. </param> public void Handle(RemovedEvent eventToHandle) { if (_buildingBlock == null) { return; } if (eventToHandle.RemovedObjects.Any(ShouldShow)) { _view.Show(GetListToShow(_buildingBlock)); } }
public void Handle(RemovedEvent eventToHandle) { if (_reactionBuildingBlock == null) { return; } if (eventToHandle.RemovedObjects.Any(item => item.IsAnImplementationOf <IReactionBuilder>())) { Edit(_reactionBuildingBlock); } }
public void Handle(RemovedEvent eventToHandle) { if (_passiveTransports == null) { return; } if (eventToHandle.RemovedObjects.Any(removedObject => removedObject.IsAnImplementationOf <ITransportBuilder>())) { refresh(_passiveTransports); } }
/// <summary> /// Смотри <see cref="IDataset.Remove"/> /// </summary> public void Remove(int index) { var value = _DataSet[index]; _DataSet.RemoveAt(index); value.EventChanged -= DatasetItemOnEventChanged; RemovedEvent?.Invoke(this, index, value); ApplyDatasetElement(); }
public void Handle(RemovedEvent eventToHandle) { if (_applicationBuilder == null) { return; } if (eventToHandle.RemovedObjects.Any(removedObject => removedObject.IsAnImplementationOf <IApplicationMoleculeBuilder>())) { Edit(_applicationBuilder); } }
public void Handle(RemovedEvent eventToHandle) { var removedObjects = eventToHandle.RemovedObjects.ToList(); if (!removedObjects.Any(ShouldHandleRemovedEvent)) { return; } refresh(); }
public void Handle(RemovedEvent eventToHandle) { if (_spatialStructure == null) { return; } foreach (var objectBase in eventToHandle.RemovedObjects.OfType <IEntity>()) { _view.Remove(_objectBaseMapper.MapFrom(objectBase)); } }
public void Handle(RemovedEvent eventToHandle) { if (_disableEventsForHeavyWork) { return; } if (eventToHandle.RemovedObjects.Any(shouldHandleType)) { refresh(_moleculeBuildingBlock); } }
public void Handle(RemovedEvent eventToHandle) { if (_eventGroupBuildingBlock == null) { return; } if (!eventToHandle.RemovedObjects.Any(shouldShow)) { return; } Edit(_eventGroupBuildingBlock); }
public void Handle(RemovedEvent eventToHandle) { if (!eventToHandle.RemovedObjects.Any(isShowableType)) { return; } //If only a Application Molecule Builder is removed we do not need to update the edit presenter if (eventToHandle.RemovedObjects.Count() != 1 || !eventToHandle.RemovedObjects.First().IsAnImplementationOf <IApplicationMoleculeBuilder>()) { setupEditPresenterFor(_eventGroupBuildingBlock.FirstOrDefault()); } }
public void Handle(RemovedEvent eventToHandle) { if (_editObserverPresenter != null) { if (eventToHandle.RemovedObjects.Select(objects => objects.Id).Contains(((IObserverBuilder)_editObserverPresenter.Subject).Id)) { Edit(_subject); } } if (eventToHandle.RemovedObjects.Select(objects => objects.Id).Contains(_subject.Id)) { _view.CloseView(); } }
public void Handle(RemovedEvent eventToHandle) { if (_disableEventsForHeavyWork) { return; } if (MoleculeBuildingBlock == null) { return; } if (eventToHandle.RemovedObjects.Any(canHandle)) { Edit(MoleculeBuildingBlock); } }
public void Handle(RemovedEvent eventToHandle) { if (_disableEventsForHeavyWork) { return; } if (_cache == null) { return; } if (!Equals(eventToHandle.Parent, _buildingBlock)) { return; } Edit(_buildingBlock); }
public override Task ExecuteAsync(string receiver, WebHookHandlerContext context) { if (receiver.ToLower() == Properties.Settings.Default.WebhookRecieverClient.ToLower()) { JObject content = context.GetDataOrDefault <JObject>(); var serializedContent = JsonConvert.SerializeObject(content); var util = new JsonUtilities(); var action = util.GetFirstInstance <string>("action", serializedContent); var actionUser = content["sender"]["login"].Value <string>(); //Get the user performing the action var owner = content["repository"]["owner"]["login"].Value <string>(); var repositoryName = util.GetFirstInstance <string>("name", serializedContent); var taggedUser = ConfigurationManager.AppSettings["Assignees"]; IWebhookEvent webhookEvent = null; switch (action.ToLower()) { case "deleted": webhookEvent = new DeleteEvent(repositoryName, actionUser, action, taggedUser); break; case "created": webhookEvent = new CreatedEvent(repositoryName, actionUser, action, taggedUser); break; case "added": webhookEvent = new RemovedEvent(repositoryName, actionUser, action, taggedUser); webhookEvent.EditRepository(repositoryName, owner, actionUser); break; default: break; } if (webhookEvent != null) { return(webhookEvent.CreateRepositoryIssue()); } } return(Task.FromResult(true)); }
public void Handle(RemovedEvent eventToHandle) { notificationsReferencing(eventToHandle.RemovedObjects.ToList()).Each(removeNotification); updateNotificationCount(); }
public void Handle(RemovedEvent eventToHandle) { RemoveNodesFor(eventToHandle.RemovedObjects); }
private void Ss_Removed(object sender, RemovedEvent e) { this.ss.ShadowSenseDevice.Removed -= Ss_Removed; this.ss.ShadowSenseDevice.CloseDevice(); this.ss.ShadowSenseDevice = null; }