Created
August 3, 2016 20:35
-
-
Save rhysgodfrey/fdad1fd3dd778efe77960e2644e3d267 to your computer and use it in GitHub Desktop.
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Telligent.Evolution.Extensibility.Api.Version1; | |
using Telligent.Evolution.Extensibility.Version1; | |
namespace ClassLibrary2 | |
{ | |
public class ThemeSwitchTestPlugin : IPlugin | |
{ | |
public string Description | |
{ | |
get | |
{ | |
return "Test Theme Events"; | |
} | |
} | |
public string Name | |
{ | |
get | |
{ | |
return "Test Theme Plugin"; | |
} | |
} | |
public void Initialize() | |
{ | |
PublicApi.Site.Events.SelectTheme += OnSelectTheme; | |
PublicApi.Groups.Events.SelectTheme += OnSelectGroupTheme; | |
PublicApi.Blogs.Events.SelectTheme += OnSelectBlogTheme; | |
} | |
private void OnSelectBlogTheme(BlogSelectThemeEventArgs e) | |
{ | |
PublicApi.Eventlogs.Write("Blog Theme Selected!", new EventLogEntryWriteOptions | |
{ | |
Category = "Theme Event Test", | |
EventId = 113, | |
EventType = "Information" | |
}); | |
} | |
private void OnSelectGroupTheme(GroupSelectThemeEventArgs e) | |
{ | |
PublicApi.Eventlogs.Write("Group Theme Selected!", new EventLogEntryWriteOptions | |
{ | |
Category = "Theme Event Test", | |
EventId = 112, | |
EventType = "Information" | |
}); | |
} | |
private void OnSelectTheme(SiteSelectThemeEventArgs e) | |
{ | |
PublicApi.Eventlogs.Write("Site Theme Selected!", new EventLogEntryWriteOptions | |
{ | |
Category = "Theme Event Test", | |
EventId = 111, | |
EventType = "Information" | |
}); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment