PageRenderTime 18ms CodeModel.GetById 10ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Powershell/PHPConfigurationItem.cs

#
C# | 89 lines | 69 code | 12 blank | 8 comment | 0 complexity | 75dbf404caba7682ca71a3f8f6337d89 MD5 | raw file
 1//-----------------------------------------------------------------------
 2// <copyright>
 3// Copyright (C) Ruslan Yakushev for the PHP Manager for IIS project.
 4//
 5// This file is subject to the terms and conditions of the Microsoft Public License (MS-PL).
 6// See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL for more details.
 7// </copyright>
 8//----------------------------------------------------------------------- 
 9
10using Web.Management.PHP.Config;
11
12namespace Web.Management.PHP.Powershell
13{
14    public enum HandlerRegistrationType { Local, Inherited };
15
16    public sealed class PHPConfigurationItem
17    {
18        private readonly PHPConfigInfo _configInfo;
19
20        public PHPConfigurationItem(PHPConfigInfo configInfo)
21        {
22            _configInfo = configInfo;
23        }
24
25        public string HandlerName
26        {
27            get
28            {
29                return _configInfo.HandlerName;
30            }
31        }
32
33        public string Version
34        {
35            get
36            {
37                return _configInfo.Version;
38            }
39        }
40
41        public string ScriptProcessor
42        {
43            get
44            {
45                return _configInfo.Executable;
46            }
47        }
48
49        public HandlerRegistrationType HandlerType
50        {
51            get
52            {
53                return _configInfo.HandlerIsLocal ? HandlerRegistrationType.Local : HandlerRegistrationType.Inherited;
54            }
55        }
56
57        public string ErrorLog
58        {
59            get
60            {
61                return _configInfo.ErrorLog;
62            }
63        }
64
65        public string PHPIniFilePath
66        {
67            get
68            {
69                return _configInfo.PHPIniFilePath;
70            }
71        }
72
73        public int InstalledExtensionsCount
74        {
75            get
76            {
77                return _configInfo.InstalledExtCount;
78            }
79        }
80
81        public int EnabledExtensionsCount
82        {
83            get
84            {
85                return _configInfo.EnabledExtCount;
86            }
87        }
88    }
89}