Castle.ActiveRecord.SessionScopeWebModule.OnBeginRequest C# (CSharp) Méthode

OnBeginRequest() private méthode

Called when request is started, create a session for the request
private OnBeginRequest ( object sender, EventArgs e ) : void
sender object The sender.
e System.EventArgs The instance containing the event data.
Résultat void
        private void OnBeginRequest(object sender, EventArgs e)
        {
            if (!AR.IsInitialized) return;

            var app = sender as HttpApplication;
            if (app == null || !(AR.Holder.ThreadScopeInfo is IWebThreadScopeInfo))
                throw new ActiveRecordException(Misconfigerrmessage);

            app.Context.Items.Add(SessionKey, new SessionScope());
        }