public override ConvertServiceResponse ProcessServiceRequest(ConvertServiceRequest request) { var response = new ConvertServiceResponse(); if (request.Parameters.ContainsKey(CommonParameters.AuthorizationToken)) { // Get data for requested authorization token response.ResponseData = GetAuthorizationTokenData(request.Parameters[CommonParameters.AuthorizationToken], true); } else { // Attempt to create and return a new authorization token response.ResponseData = CreateAuthorizationToken(request.Parameters); } // Add error message to response if applicable if (!string.IsNullOrEmpty(_errorMessage)) response.AddError(_errorMessage); return response; }
public DataProviderResponse(ConvertServiceResponse response) { Data = response.ResponseData; Parameters = (Dictionary<string,string>)response.ResponseParameters; }