Esempio n. 1
0
        public FastCgiItem(ConfigurationElement element)
        {
            Element = element;
            Flag    = element == null || element.IsLocallyStored ? "Local" : "Inhertied";
            EnvironmentVariables = new EnvironmentVariablesCollection();
            AdvancedSettings     = new AdvancedSettings();
            if (element == null)
            {
                Path                = Arguments = MonitorChangesTo = string.Empty;
                MaxInstances        = 4U;
                InstanceMaxRequests = 200U;
                ActivityTimeout     = 30U;
                IdleTimeout         = 300U;
                QueueLength         = 1000U;
                RapidFailsPerMinute = 10U;
                RequestTimeout      = 90U;
                return;
            }

            Path      = (string)element["fullPath"];
            Arguments = (string)element["arguments"];

            MonitorChangesTo                = (string)element["monitorChangesTo"];
            ErrorMode                       = (ErrorMode)element["stderrMode"];
            MaxInstances                    = (uint)element["maxInstances"];
            IdleTimeout                     = (uint)element["idleTimeout"];
            ActivityTimeout                 = (uint)element["activityTimeout"];
            RequestTimeout                  = (uint)element["requestTimeout"];
            InstanceMaxRequests             = (uint)element["instanceMaxRequests"];
            SignalBeforeTerminateSeconds    = (uint)element["signalBeforeTerminateSeconds"];
            AdvancedSettings.Protocol       = (Protocol)element["protocol"];
            QueueLength                     = (uint)element["queueLength"];
            AdvancedSettings.FlushNamedPipe = (bool)element["flushNamedPipe"];
            RapidFailsPerMinute             = (uint)element["rapidFailsPerMinute"];

            foreach (ConfigurationElement child in element.GetCollection("environmentVariables"))
            {
                EnvironmentVariables.Add(
                    new EnvironmentVariables {
                    Name = (string)child["name"], Value = (string)child["value"]
                });
            }
        }
Esempio n. 2
0
        public FastCgiItem(ConfigurationElement element)
        {
            Element = element;
            Flag    = element == null || element.IsLocallyStored ? "Local" : "Inhertied";
            EnvironmentVariables = new EnvironmentVariablesCollection();
            AdvancedSettings     = new AdvancedSettings();
            if (element == null)
            {
                Path                = Arguments = MonitorChangesTo = string.Empty;
                MaxInstances        = 4U;
                InstanceMaxRequests = 200U;
                ActivityTimeout     = 30U;
                IdleTimeout         = 300U;
                QueueLength         = 1000U;
                RapidFailsPerMinute = 10U;
                RequestTimeout      = 90U;
                return;
            }

            Reset();
        }