public void RaiseEvent(ImporterResponse response)
        {
            var handler = Imported;

            if (handler != null)
            {
                var args = new ImportedEventArgs(response);

                handler(this, args);
            }
        }
        /// <summary>
        /// Imports a redirect file into the Skybrud redirect table
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        public virtual ImporterResponse Import(IRedirectsFile file)
        {
            var response = new ImporterResponse();

            file.Load();

            response.ImportedItems = file.ValidatedItems;
            response.File          = file;

            var inserter = new SqlServerBulkCopy();

            inserter.BulkImport(file.ValidatedItems);

            RaiseEvent(response);

            return(response);
        }
 public ImportedEventArgs(ImporterResponse response)
 {
     Response = response;
 }