EnsureRegistered() статический приватный Метод

static private EnsureRegistered ( ) : void
Результат void
Пример #1
0
            protected override void OnExecute(HttpContext ctx)
            {
                Module.EnsureRegistered();

                // Wait for all currently executing ASP requests to complete so we're in a clean state
                // before messing around with transactions.  Being extra careful here
                // should also prevent bleed over from any prior sessions into this one.
                using (Session.Tracker.Exclusive(WebServerLockTimeoutMS, Response.Log))
                {
                    Session.AsyncLog.CopyInto(Response.AsyncLog);
                    Session.AsyncLog = new SerializableLog();

                    // If there is currently an open session, end it before starting a new one
                    if (Session.IsActive)
                    {
                        Response.Log.Write("Ending prior session ({0})", Session.ID);
                        EndSessionRequest.EndSession(Response.Log);
                    }

                    sessionId           = Session.ID = Guid.NewGuid();
                    Session.Transaction = Transaction;
                    Response.Log.Write("Session started ({0})", sessionId);
                    Session.AsyncLog = new SerializableLog();

                    Module.PersistSessionState();

                    // Watch for when the transaction ends unexpectedly so some cleanup can occur.
                    // This event handler will run on the thread that is causing the rollback which is likely a
                    // different thread than is registering the event handler.
                    Transaction.TransactionCompleted += Transaction_TransactionCompleted;
                }
            }