Example #1
0
        /// <summary>
        /// Handles schema compare open SCMP request
        /// </summary>
        /// <returns></returns>
        public async Task HandleSchemaCompareOpenScmpRequest(SchemaCompareOpenScmpParams parameters, RequestContext <SchemaCompareOpenScmpResult> requestContext)
        {
            try
            {
                CurrentSchemaCompareTask = Task.Run(async() =>
                {
                    SchemaCompareOpenScmpOperation operation = null;

                    try
                    {
                        operation = new SchemaCompareOpenScmpOperation(parameters);
                        operation.Execute(TaskExecutionMode.Execute);

                        await requestContext.SendResult(operation.Result);
                    }
                    catch (Exception e)
                    {
                        await requestContext.SendResult(new SchemaCompareOpenScmpResult()
                        {
                            Success      = false,
                            ErrorMessage = operation == null ? e.Message : operation.ErrorMessage,
                        });
                    }
                });
            }
            catch (Exception e)
            {
                await requestContext.SendError(e);
            }
        }
 public SchemaCompareOpenScmpOperation(SchemaCompareOpenScmpParams parameters)
 {
     Validate.IsNotNull("parameters", parameters);
     this.Parameters = parameters;
 }