示例#1
0
        public virtual SyncProductsResponse SyncProducts(SyncProductsRequest request)
        {
            var response = new SyncProductsResponse();

            try {
                // Raise Initialization Event
                var initialization = SyncProductsInitialization;
                if (initialization != null)
                {
                    initialization(request, response);
                }
                // Raise Execute Event
                var execute = SyncProductsExecute;
                if (execute != null)
                {
                    response = execute(request);
                }
                // Raise Complete Event
                var complete = SyncProductsComplete;
                if (complete != null)
                {
                    complete(request, response);
                }
            }
            catch (Exception exception) {
                // Raise Error Event
                var error = SyncProductsError;
                if (error != null)
                {
                    error(request, response, exception);
                }
            }
            return(response);
        }
示例#2
0
        public override SyncProductsResponse OnSyncProductsExecute(SyncProductsRequest request)
        {
            var syncItemsFactory = new SyncItemsFactory();
            var response         = new SyncProductsResponse();

            try
            {
                response.SyncProducts = syncItemsFactory.SyncProducts(request.BatchRecords, request.Skip);
            }
            catch (Exception ex)
            {
                response.Exception = ex;
                response.Message   = ex.Message;
            }

            return(response);
        }
示例#3
0
 public abstract SyncProductsResponse OnSyncProductsExecute(SyncProductsRequest request);