protected override void Execute(DownloadImageToMediaLibraryArgs args)
 {
     using (WebClient client = new WebClient())
     {
         client.DownloadFile(args.ImageUrl, args.ImageFilePath);
     }
 }
        public void Process(DownloadImageToMediaLibraryArgs args)
        {
            Assert.ArgumentNotNull(args, "args");
            if (!CanProcess(args))
            {
                AbortPipeline(args);
                return;
            }

            Execute(args);
        }
 protected override bool CanProcess(DownloadImageToMediaLibraryArgs args)
 {
     return(!string.IsNullOrWhiteSpace(args.ImageUrl) &&
            !string.IsNullOrWhiteSpace(args.ImageFilePath));
 }
 protected abstract void Execute(DownloadImageToMediaLibraryArgs args);
 protected virtual void AbortPipeline(DownloadImageToMediaLibraryArgs args)
 {
     args.AbortPipeline();
 }
 protected abstract bool CanProcess(DownloadImageToMediaLibraryArgs args);