Mercurial > pub > bltoolkit
comparison Source/Configuration/DataProviderElement.cs @ 0:f990fcb411a9
Копия текущей версии из github
author | cin |
---|---|
date | Thu, 27 Mar 2014 21:46:09 +0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f990fcb411a9 |
---|---|
1 using System; | |
2 using System.Configuration; | |
3 | |
4 using BLToolkit.Data.DataProvider; | |
5 | |
6 namespace BLToolkit.Configuration | |
7 { | |
8 internal class DataProviderElement : ElementBase | |
9 { | |
10 protected static readonly ConfigurationProperty _propTypeName = new ConfigurationProperty("type", typeof(string), string.Empty, ConfigurationPropertyOptions.IsRequired); | |
11 protected static readonly ConfigurationProperty _propName = new ConfigurationProperty("name", typeof(string), string.Empty, ConfigurationPropertyOptions.None); | |
12 protected static readonly ConfigurationProperty _propDefault = new ConfigurationProperty("default", typeof(bool), false, ConfigurationPropertyOptions.None); | |
13 | |
14 public DataProviderElement() | |
15 { | |
16 _properties.Add(_propTypeName); | |
17 _properties.Add(_propName); | |
18 _properties.Add(_propDefault); | |
19 } | |
20 | |
21 /// <summary> | |
22 /// Gets or sets an assembly qualified type name of this data provider. | |
23 /// </summary> | |
24 public string TypeName | |
25 { | |
26 get { return (string)base[_propTypeName]; } | |
27 } | |
28 | |
29 /// <summary> | |
30 /// Gets or sets a name of this data provider. | |
31 /// If not set, <see cref="DataProviderBase.Name"/> is used. | |
32 /// </summary> | |
33 public string Name | |
34 { | |
35 get { return (string)base[_propName]; } | |
36 } | |
37 | |
38 /// <summary> | |
39 /// Gets a value indicating whether the provider is default. | |
40 /// </summary> | |
41 public bool Default | |
42 { | |
43 get { return (bool)base[_propDefault]; } | |
44 } | |
45 } | |
46 } |