Ejemplo n.º 1
0
 public InputBase(UserContext userContext)
 {
     if (userContext == null) throw new ArgumentNullException("userContext");
     UserContext = userContext;
 }
Ejemplo n.º 2
0
 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++;
     }
 }
Ejemplo n.º 3
0
 public FileUploadInput(UserContext userContext) : base(userContext)
 {
 }
Ejemplo n.º 4
0
 public void TestFixtureSetUp()
 {
     _fileSharePath = ConfigurationManager.AppSettings["FileShare"];
     _createAsUser = new Guid(ConfigurationManager.AppSettings["CreateAsUser"]);
     _userContext = new UserContext {Id = _createAsUser, UserName = "******"};
 }
Ejemplo n.º 5
0
 public ResultBase(UserContext userContext)
 {
     if (userContext == null) throw new ArgumentNullException("userContext");
     ValidationResult = new ValidationResult();
     UserContext = userContext;
 }