示例#1
0
        public string c(JSCommand command)
        {
            var r = new CommandResult();
            Dictionary <string, object> metaData = null;
            var inCourseRequest = InCourseRequest.New();
            var re = OperationContext.Current;

            try
            {
                return(WCFWrapper.Instance.wcfHelper.ExecuteQueryService <ICommandExtranetService>(ServiciosEnum.CommandExtranet, i => i.c(command)));
            }
            catch (M4TraderApplicationException ex)
            {
                r.MetaData = metaData;
                r.Data     = new object[2] {
                    inCourseRequest.Id, ex.Message
                };
                r.Status    = "EX0000";
                r.RequestId = inCourseRequest.Id.ToString();
                return(JsonConvert.SerializeObject(r));
            }
            catch (Exception ex)
            {
                r.MetaData = metaData;
                r.Data     = new object[2] {
                    inCourseRequest.Id, ex.Message
                };
                r.Status    = "EX0000";
                r.RequestId = inCourseRequest.Id.ToString();
                return(JsonConvert.SerializeObject(r));
            }
        }
示例#2
0
 public void OnCommand(JSCommand command)
 {
     _OnCommand(command);
 }