Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Ticket #212 (new enhancement)

Opened 11 years ago

Last modified 11 years ago

Use EPiServers initialization system

Reported by: stian.grepstad@… Owned by: stian.grepstad@…
Priority: minor Component: SocialPing
Keywords: Cc:

Description

Instead of manually registering the published page event + send the StatusMessage in global.axax => Use EPiServers initialization system inside StatusPing.dll to do this process auto-magically.

Code:

[ModuleDependency(typeof(EPiServer.Web.InitializationModule))]
public class StatusPingModule : IInitializableModule
{
public void Initialize(InitializationEngine context)
{
DataFactory.Instance.PublishedPage += Instance_PublishedPage;
}

static void Instance_PublishedPage(object sender, PageEventArgs e)
{
StatusMessage statusMsg = new StatusMessage();
statusMsg.PostMessage(e.Page);
}


public void Preload(string[] parameters)
{
}

public void Uninitialize(InitializationEngine context)
{
DataFactory.Instance.PublishedPage -= Instance_PublishedPage;
}
} 

Change History

comment:1 Changed 11 years ago by alexander@…

  • Owner changed from alexander@… to stian.grepstad@…
  • Component changed from EPiImage to SocialPing

This was posted wrong place. It should have been posted under the SocialPing module.

Note: See HelpUser/Tickets for help on using tickets.