public void processRequest(API.Request request) { String resquestType = request.GetType().Name; String processorName = resquestType.Substring(0, resquestType.Length - 2); API.Response response = null; string processorName = "Process" + processorName; if (ProcessHandlers.ContainsKey(processorName)) { System.Delegate myDelegate = ProcessHandlers[processorName]; response = (API.Response)myDelegate.DynamicInvoke(request); } else { logger.Warn("Failed to find a processor for " + processorName); response = new ErrorRs(request.id, "Failed to find a processor for " + processorName); } sendResponse(response, request); }
/// <summary> /// Initializes a new instance of the <see cref="T:Kuzzle.Exceptions.ApiError"/> class /// </summary> /// <param name="response">Kuzzle API Response.</param> public ApiErrorException(API.Response response) : base(response.Error?.Message, response.Status) { Stack = response.Error?.Stack; }