| |||||||||||||||||
| Source File | Conditionals | Statements | Methods | TOTAL | |||||||||||||
| Config\ConfigurationSectionInfo.cs | - | 100,0 % | 100,0 % | 100,0 % |
|
||||||||||||
| 1 | #region Copyright | |
| 2 | /* | |
| 3 | ShowX. Maps business objects into presentation layer. | |
| 4 | Copyright (C) 2005 Jesus Diaz. | |
| 5 | ||
| 6 | This library is free software; you can redistribute it and/or | |
| 7 | modify it under the terms of the GNU Lesser General Public | |
| 8 | License as published by the Free Software Foundation; either | |
| 9 | version 2.1 of the License, or (at your option) any later version. | |
| 10 | ||
| 11 | This library is distributed in the hope that it will be useful, | |
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 | Lesser General Public License for more details. | |
| 15 | ||
| 16 | You should have received a copy of the GNU Lesser General Public | |
| 17 | License along with this library; if not, write to the Free Software | |
| 18 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | |
| 19 | ||
| 20 | For project details see: http://showx.sourceforge.net | |
| 21 | */ | |
| 22 | #endregion | |
| 23 | ||
| 24 | using System.Collections; | |
| 25 | ||
| 26 | namespace ShowX.Config | |
| 27 | { | |
| 28 | /// <summary> | |
| 29 | /// Define possible mapping models to bind object properties with presentation | |
| 30 | /// layer. | |
| 31 | /// </summary> | |
| 32 | public enum MappingModel { | |
| 33 | /// <summary> | |
| 34 | /// Attribute mapping model. | |
| 35 | /// </summary> | |
| 36 | Attribute, | |
| 37 | /// <summary> | |
| 38 | /// Xmk mapping model. | |
| 39 | /// </summary> | |
| 40 | Xml | |
| 41 | } | |
| 42 | ||
| 43 | /// <summary> | |
| 44 | /// This class store configuration information, read from config files. | |
| 45 | /// </summary> | |
| 46 | public class ConfigurationSectionInfo | |
| 47 | { | |
| 48 | /// <summary> | |
| 49 | /// Mapping model especified in configuration. | |
| 50 | /// </summary> | |
| 51 | protected MappingModel mappingModel; | |
| 52 | ||
| 53 | /// <summary> | |
| 54 | /// Hard-coded Xml mapping files paths for ShowX types, as especified | |
| 55 | /// in configuration. | |
| 56 | /// </summary> | |
| 57 | protected Hashtable xmlMappingFiles; | |
| 58 | ||
| 59 | /// <summary> | |
| 60 | /// Constructor. | |
| 61 | /// </summary> | |
| 62 | 22 | public ConfigurationSectionInfo() |
| 63 | { | |
| 64 | 22 | this.mappingModel = MappingModel.Attribute; |
| 65 | 22 | this.xmlMappingFiles = new Hashtable(); |
| 66 | } | |
| 67 | ||
| 68 | /// <summary> | |
| 69 | /// Reflex the mapping model specified y configuration. | |
| 70 | /// </summary> | |
| 71 | public MappingModel MappingModel | |
| 72 | { | |
| 73 | 27 | get { return this.mappingModel; } |
| 74 | 21 | set { this.mappingModel = value; } |
| 75 | } | |
| 76 | ||
| 77 | /// <summary> | |
| 78 | /// Reflex hard-coded Xml mapping files paths for ShowX types, as especified | |
| 79 | /// in configuration. | |
| 80 | /// </summary> | |
| 81 | public Hashtable XmlMappingFiles | |
| 82 | { | |
| 83 | 25 | get |
| 84 | { | |
| 85 | 25 | return this.xmlMappingFiles; |
| 86 | } | |
| 87 | } | |
| 88 | } | |
| 89 | } | |
| 90 |
|
||||||||