Last active
August 29, 2015 14:15
-
-
Save davidknipe/8d03964c6578febe2608 to your computer and use it in GitHub Desktop.
Example PriceEvent listener for the PriceEvents for EPiServer Commerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[InitializableModule] | |
[ModuleDependency( typeof(EPiServer.Web. InitializationModule))] | |
public class PriceEventListenerInit : IInitializableModule | |
{ | |
public void Initialize( InitializationEngine context) | |
{ | |
var priceEvents = ServiceLocator.Current.GetInstance<IPriceEvents>(); | |
priceEvents.PriceChanged += contentEvents_PriceChanged; | |
} | |
void contentEvents_PriceChanged( object sender, PriceEvents.Events.PriceEventArgs e) | |
{ | |
//TODO: Your implementation here | |
} | |
public void Uninitialize( InitializationEngine context) | |
{ | |
var priceEvents = ServiceLocator.Current.GetInstance<IPriceEvents>(); | |
priceEvents.PriceChanged -= contentEvents_PriceChanged; | |
} | |
public void Preload(string[] parameters) { } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment