public IDictionary<string, object> ApplyEvent(IDictionary<string, object> root, ModelEvent modelEvent) { var model = FetchModel(root, modelEvent.route); if (modelEvent.payload == null) { return null; } if (modelEvent.payload.values != null) { model.Merge(modelEvent.payload.values); } if (modelEvent.payload.delete != null) { model.DeleteByKeys(modelEvent.payload.delete); } return model; }
public AddEventCommand(ModelEvent modelEvent) { this.modelEvent = modelEvent; }
public IDictionary <string, object> ApplyEvent(IDictionary <string, object> root, ModelEvent modelEvent) { var model = FetchModel(root, modelEvent.route); if (modelEvent.payload == null) { return(null); } if (modelEvent.payload.values != null) { model.Merge(modelEvent.payload.values); } if (modelEvent.payload.delete != null) { model.DeleteByKeys(modelEvent.payload.delete); } return(model); }