Skip to content

Instantly share code, notes, and snippets.

@NiclasOlofsson
Created March 8, 2015 00:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NiclasOlofsson/aa58b88afc9e1a9c568d to your computer and use it in GitHub Desktop.
Save NiclasOlofsson/aa58b88afc9e1a9c568d to your computer and use it in GitHub Desktop.
[Plugin]
public class StartupPlugin : Plugin, IStartup
{
private static readonly ILog Log = LogManager.GetLogger(typeof (StartupPlugin));
/// <summary>
/// Startup class for MiNET. Example sets the user and role managers and stores
/// for the application.
/// </summary>
/// <param name="server"></param>
public void Configure(MiNetServer server)
{
server.UserManager = new UserManager<User>(new DefaultUserStore());
server.RoleManager = new RoleManager<Role>(new DefaultRoleStore());
Log.Info("Executed startup successfully. Replaced identity managment.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment