Exemplo n.º 1
0
        protected override void OnApplicationRequestsBlockedChanged(string appKey, bool requestsBlocked)
        {
            try
            {
                Debug.Print("ListenerAdapter[" + ProtocolName + "]::OnApplicationRequestsBlockedChanged(" + appKey + ", " + requestsBlocked + ")");
                App app = null;

                lock (appManager)
                {
                    if (!appManager.Apps.TryGetValue(appKey, out app))
                    {
                        return;
                    }
                }

                if (app.PendingAction != null)
                {
                    app.PendingAction.MergeFromRequestsBlockedAction(requestsBlocked);
                }
                else
                {
                    app.SetRequestBlocked(requestsBlocked);
                }
            }
            catch (Exception exception)
            {
                HandleUnknownError(exception);
            }
        }
Exemplo n.º 2
0
        void CompleteAppSettingsChanged(App app)
        {
            if (app.PendingAction.AppPoolId != null)
            {
                CompleteAppPoolChange(app, app.PendingAction.AppPoolId);
            }

            if (app.PendingAction.Path != null)
            {
                app.Path = app.PendingAction.Path;
            }

            if (app.PendingAction.Bindings != null)
            {
                RegisterNewBindings(app, app.PendingAction.Bindings);
            }

            if (app.PendingAction.RequestsBlocked.HasValue)
            {
                app.SetRequestBlocked(app.PendingAction.RequestsBlocked.Value);
            }
        }
        void CompleteAppSettingsChanged(App app)
        {
            if (app.PendingAction.AppPoolId != null)
            {
                CompleteAppPoolChange(app, app.PendingAction.AppPoolId);
            }

            if (app.PendingAction.Path != null)
            {
                app.Path = app.PendingAction.Path;
            }

            if (app.PendingAction.Bindings != null)
            {
                RegisterNewBindings(app, app.PendingAction.Bindings);
            }

            if (app.PendingAction.RequestsBlocked.HasValue)
            {
                app.SetRequestBlocked(app.PendingAction.RequestsBlocked.Value);
            }
        }