internal static void EnsureContext( ILogger logger, IRuntimeCacheProvider runtimeCacheProvider ) { Current = new UserContentContext(logger, runtimeCacheProvider); }
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { // initizlie the user content context. UserContentContext.EnsureContext( applicationContext.ProfilingLogger.Logger, applicationContext.ApplicationCache.RuntimeCache ); // We add the default context. // but you can add your own with your own tables // in your own projects. // however it is your responsiblity for the tables to be UserContentContext.Current.LoadInstance <UserContentItem, UserContentDTO>( UserContent.DefaultInstance, "Aubergine_UserContent", applicationContext.DatabaseContext, applicationContext.ApplicationCache.RuntimeCache); }
public static void RaiseContextCreated(UserContentContext context) { Created.RaiseEvent(new SaveEventArgs <UserContentContext>(context), new UserContent()); }