public void OnOrderItemProcessed(OrderItemProcessedEventArgs e) { if (_MinerRepository == null) { _MinerRepository = new MinerRepository(); } //Update Sku miner //if (e.OrderLineItemData.Sku == 101) //{ // Console.WriteLine("Sku 101 was purchased on {0} and the data was mined.", DateTime.Now.ToString()); //} }
public void Initialize(CommerceEvents events, NameValueCollection config) { events.OrderItemProcessed += args => { // just for the case if i want to have access to the host's db // args.StoreRepository... // in the case that i want access to my own db - other then from host's if (this._minerRepository == null) { this._minerRepository = new MinerRepository(); } if (args.OrderLineItemData.Sku == 102) { Console.WriteLine("\t### Product with Sku 101 was purchased on {0} ###", DateTime.Now.ToLongDateString()); } }; }
public SkuMinerModule(IMinerRepository minerRepository) { _MinerRepository = minerRepository; }
/// <summary> /// just for unit testing /// </summary> /// <param name="minerRepository"></param> public SkuMinerModule(IMinerRepository minerRepository) { this._minerRepository = minerRepository; }
public MinerAppService(IMinerRepository iMinerRepository) { this.iMinerRepository = iMinerRepository; }