コード例 #1
0
ファイル: ProfileModule.cs プロジェクト: pmq20/mono_forked
        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();
            }
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        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();
        }
コード例 #5
0
ファイル: ProfileModule.cs プロジェクト: Profit0004/mono
		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 ();
			}
		}