void OnLeave(object o, EventArgs eventArgs) { if (!ProfileManager.Enabled) { return; } if (!app.Context.ProfileInitialized) { return; } if (ProfileManager.AutomaticSaveEnabled) { profile = app.Context.Profile; if (profile == null) { return; } ProfileAutoSaveEventHandler eh = events [profileAutoSavingEvent] as ProfileAutoSaveEventHandler; if (eh != null) { ProfileAutoSaveEventArgs args = new ProfileAutoSaveEventArgs(app.Context); eh(this, args); if (!args.ContinueWithProfileAutoSave) { return; } } profile.Save(); } }
private void OnLeave(object source, EventArgs eventArgs) { HttpApplication application = (HttpApplication)source; HttpContext context = application.Context; if ((context._Profile != null) && (context._Profile != ProfileBase.SingletonInstance)) { if (this._AutoSaveEventHandler != null) { ProfileAutoSaveEventArgs e = new ProfileAutoSaveEventArgs(context); this._AutoSaveEventHandler(this, e); if (!e.ContinueWithProfileAutoSave) { return; } } context.Profile.Save(); } }
private void OnLeave(Object source, EventArgs eventArgs) { HttpApplication app = (HttpApplication)source; HttpContext context = app.Context; if (context._Profile == null || (object)context._Profile == (object)ProfileBase.SingletonInstance) { return; } if (_AutoSaveEventHandler != null) { ProfileAutoSaveEventArgs args = new ProfileAutoSaveEventArgs(context); _AutoSaveEventHandler(this, args); if (!args.ContinueWithProfileAutoSave) { return; } } context.Profile.Save(); }
private void OnLeave(Object source, EventArgs eventArgs) { HttpApplication app = (HttpApplication)source; HttpContext context = app.Context; if (context._Profile == null || (object)context._Profile == (object)ProfileBase.SingletonInstance) return; if (_AutoSaveEventHandler != null) { ProfileAutoSaveEventArgs args = new ProfileAutoSaveEventArgs(context); _AutoSaveEventHandler(this, args); if (!args.ContinueWithProfileAutoSave) return; } context.Profile.Save(); }
void OnLeave (object o, EventArgs eventArgs) { if (!ProfileManager.Enabled) return; if (!app.Context.ProfileInitialized) return; if (ProfileManager.AutomaticSaveEnabled) { profile = app.Context.Profile; if (profile == null) return; ProfileAutoSaveEventHandler eh = events [profileAutoSavingEvent] as ProfileAutoSaveEventHandler; if (eh != null) { ProfileAutoSaveEventArgs args = new ProfileAutoSaveEventArgs (app.Context); eh (this, args); if (!args.ContinueWithProfileAutoSave) return; } profile.Save (); } }