Skip to content

Instantly share code, notes, and snippets.

@hishaamn
Created March 13, 2018 13:56
Show Gist options
  • Save hishaamn/23d3a71ce4fafc85fa440e9d9469b5f1 to your computer and use it in GitHub Desktop.
Save hishaamn/23d3a71ce4fafc85fa440e9d9469b5f1 to your computer and use it in GitHub Desktop.
Agent to import offers
public class OfferImport
{
public string CouponPath { get; set; }
public string[] Databases { get; set; }
public string SiteName { get; set; }
public void Process(Item[] items, CommandItem command, ScheduleItem schedule)
{
var offersCommandItem = new OffersImportCommandItem(command.InnerItem);
this.SiteName = offersCommandItem.Sitename;
this.Databases = offersCommandItem.Database.Split(new[] { ',', '|' }, StringSplitOptions.RemoveEmptyEntries);
this.CouponPath = offersCommandItem.CouponPath;
// Your logic for the processing goes here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment