PageRenderTime 39ms CodeModel.GetById 23ms app.highlight 11ms RepoModel.GetById 1ms app.codeStats 1ms

/tags/beta-1.0.2/Client/Config/PHPConfigInfo.cs

#
C# | 132 lines | 107 code | 17 blank | 8 comment | 0 complexity | 7fc9c6661372a60dc93f8bdccc93b127 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 System;
 11
 12namespace Web.Management.PHP.Config
 13{
 14
 15    internal sealed class PHPConfigInfo : IRemoteObject
 16    {
 17        private object[] _data;
 18
 19        private const int IndexHandlerName = 0;
 20        private const int IndexScriptProcessor = 1;
 21        private const int IndexVersion = 2;
 22        private const int IndexPHPIniFilePath = 3;
 23        private const int IndexErrorLog = 4;
 24        private const int IndexEnabledExtCount = 5;
 25        private const int IndexInstalledExtCount = 6;
 26
 27        private const int Size = 7;
 28
 29        public PHPConfigInfo()
 30        {
 31            _data = new object[Size];
 32        }
 33
 34        public int EnabledExtCount
 35        {
 36            get
 37            {
 38                return (int)_data[IndexEnabledExtCount];
 39            }
 40            set
 41            {
 42                _data[IndexEnabledExtCount] = value;
 43            }
 44        }
 45
 46        public string ErrorLog
 47        {
 48            get
 49            {
 50                return (string)_data[IndexErrorLog];
 51            }
 52            set
 53            {
 54                _data[IndexErrorLog] = value;
 55            }
 56        }
 57
 58        public string HandlerName
 59        {
 60            get
 61            {
 62                return (string)_data[IndexHandlerName];
 63            }
 64            set
 65            {
 66                _data[IndexHandlerName] = value;
 67            }
 68        }
 69
 70        public int InstalledExtCount
 71        {
 72            get
 73            {
 74                return (int)_data[IndexInstalledExtCount];
 75            }
 76            set
 77            {
 78                _data[IndexInstalledExtCount] = value;
 79            }
 80        }
 81
 82        public string PHPIniFilePath
 83        {
 84            get
 85            {
 86                return (string)_data[IndexPHPIniFilePath];
 87            }
 88            set
 89            {
 90                _data[IndexPHPIniFilePath] = value;
 91            }
 92        }
 93
 94        public string ScriptProcessor
 95        {
 96            get
 97            {
 98                return (string)_data[IndexScriptProcessor];
 99            }
100            set
101            {
102                _data[IndexScriptProcessor] = value;
103            }
104        }
105
106        public string Version
107        {
108            get
109            {
110                return (string)_data[IndexVersion];
111            }
112            set
113            {
114                _data[IndexVersion] = value;
115            }
116        }
117
118        #region IRemoteObject Members
119
120        public object GetData()
121        {
122            return _data;
123        }
124
125        public void SetData(object o)
126        {
127            _data = (object[])o;
128        }
129
130        #endregion
131    }
132}