public InputBase(UserContext userContext) { if (userContext == null) throw new ArgumentNullException("userContext"); UserContext = userContext; }
private void ProcessInputRow(ProductInputRow inputRow, UserContext userContext, ref int failedCount) { //todo add debug log inputRow.Processed = true; try { Product resolvedProduct = _productResolver.Resolve(new ProductResolveInput(userContext) {ProductInputRow = inputRow}); inputRow.UploadedProductId = resolvedProduct.Id.ToString(); inputRow.UploadStatus = "Data processing completed"; inputRow.UploadMessage = string.Empty; } catch (Exception e) { _logger.Error("Unable to process input row. " + userContext, e); inputRow.UploadStatus = "Failed to process data"; inputRow.UploadMessage = "Unable to process input row."; failedCount++; } }
public FileUploadInput(UserContext userContext) : base(userContext) { }
public void TestFixtureSetUp() { _fileSharePath = ConfigurationManager.AppSettings["FileShare"]; _createAsUser = new Guid(ConfigurationManager.AppSettings["CreateAsUser"]); _userContext = new UserContext {Id = _createAsUser, UserName = "******"}; }
public ResultBase(UserContext userContext) { if (userContext == null) throw new ArgumentNullException("userContext"); ValidationResult = new ValidationResult(); UserContext = userContext; }