mscorlib(4.0.0.0) API with additions
SettingsProperty.cs
1 namespace System.Configuration
2 {
4  public class SettingsProperty
5  {
6  private string _Name;
7 
8  private bool _IsReadOnly;
9 
10  private object _DefaultValue;
11 
12  private SettingsSerializeAs _SerializeAs;
13 
14  private SettingsProvider _Provider;
15 
16  private SettingsAttributeDictionary _Attributes;
17 
18  private Type _PropertyType;
19 
20  private bool _ThrowOnErrorDeserializing;
21 
22  private bool _ThrowOnErrorSerializing;
23 
26  public virtual string Name
27  {
28  get
29  {
30  return _Name;
31  }
32  set
33  {
34  _Name = value;
35  }
36  }
37 
41  public virtual bool IsReadOnly
42  {
43  get
44  {
45  return _IsReadOnly;
46  }
47  set
48  {
49  _IsReadOnly = value;
50  }
51  }
52 
55  public virtual object DefaultValue
56  {
57  get
58  {
59  return _DefaultValue;
60  }
61  set
62  {
63  _DefaultValue = value;
64  }
65  }
66 
69  public virtual Type PropertyType
70  {
71  get
72  {
73  return _PropertyType;
74  }
75  set
76  {
77  _PropertyType = value;
78  }
79  }
80 
83  public virtual SettingsSerializeAs SerializeAs
84  {
85  get
86  {
87  return _SerializeAs;
88  }
89  set
90  {
91  _SerializeAs = value;
92  }
93  }
94 
97  public virtual SettingsProvider Provider
98  {
99  get
100  {
101  return _Provider;
102  }
103  set
104  {
105  _Provider = value;
106  }
107  }
108 
111  public virtual SettingsAttributeDictionary Attributes => _Attributes;
112 
116  public bool ThrowOnErrorDeserializing
117  {
118  get
119  {
120  return _ThrowOnErrorDeserializing;
121  }
122  set
123  {
124  _ThrowOnErrorDeserializing = value;
125  }
126  }
127 
131  public bool ThrowOnErrorSerializing
132  {
133  get
134  {
135  return _ThrowOnErrorSerializing;
136  }
137  set
138  {
139  _ThrowOnErrorSerializing = value;
140  }
141  }
142 
145  public SettingsProperty(string name)
146  {
147  _Name = name;
148  _Attributes = new SettingsAttributeDictionary();
149  }
150 
161  public SettingsProperty(string name, Type propertyType, SettingsProvider provider, bool isReadOnly, object defaultValue, SettingsSerializeAs serializeAs, SettingsAttributeDictionary attributes, bool throwOnErrorDeserializing, bool throwOnErrorSerializing)
162  {
163  _Name = name;
164  _PropertyType = propertyType;
165  _Provider = provider;
166  _IsReadOnly = isReadOnly;
167  _DefaultValue = defaultValue;
168  _SerializeAs = serializeAs;
169  _Attributes = attributes;
170  _ThrowOnErrorDeserializing = throwOnErrorDeserializing;
171  _ThrowOnErrorSerializing = throwOnErrorSerializing;
172  }
173 
176  public SettingsProperty(SettingsProperty propertyToCopy)
177  {
178  _Name = propertyToCopy.Name;
179  _IsReadOnly = propertyToCopy.IsReadOnly;
180  _DefaultValue = propertyToCopy.DefaultValue;
181  _SerializeAs = propertyToCopy.SerializeAs;
182  _Provider = propertyToCopy.Provider;
183  _PropertyType = propertyToCopy.PropertyType;
184  _ThrowOnErrorDeserializing = propertyToCopy.ThrowOnErrorDeserializing;
185  _ThrowOnErrorSerializing = propertyToCopy.ThrowOnErrorSerializing;
186  _Attributes = new SettingsAttributeDictionary(propertyToCopy.Attributes);
187  }
188  }
189 }
bool ThrowOnErrorSerializing
Gets or sets a value specifying whether an error will be thrown when the property is unsuccessfully s...
SettingsProperty(string name, Type propertyType, SettingsProvider provider, bool isReadOnly, object defaultValue, SettingsSerializeAs serializeAs, SettingsAttributeDictionary attributes, bool throwOnErrorDeserializing, bool throwOnErrorSerializing)
Creates a new instance of the T:System.Configuration.SettingsProperty class based on the supplied par...
virtual object DefaultValue
Gets or sets the default value of the T:System.Configuration.SettingsProperty object.
Used internally as the class that represents metadata about an individual configuration property.
SettingsProperty(string name)
Initializes a new instance of the T:System.Configuration.SettingsProperty class. based on the supplie...
bool ThrowOnErrorDeserializing
Gets or sets a value specifying whether an error will be thrown when the property is unsuccessfully d...
virtual SettingsProvider Provider
Gets or sets the provider for the T:System.Configuration.SettingsProperty.
Represents a collection of key/value pairs used to describe a configuration object as well as a T:Sys...
virtual bool IsReadOnly
Gets or sets a value specifying whether a T:System.Configuration.SettingsProperty object is read-only...
SettingsProperty(SettingsProperty propertyToCopy)
Initializes a new instance of the T:System.Configuration.SettingsProperty class, based on the supplie...
Represents type declarations: class types, interface types, array types, value types,...
Definition: Type.cs:18
virtual Type PropertyType
Gets or sets the type for the T:System.Configuration.SettingsProperty.
virtual SettingsAttributeDictionary Attributes
Gets a T:System.Configuration.SettingsAttributeDictionary object containing the attributes of the T:S...
Acts as a base class for deriving custom settings providers in the application settings architecture.
virtual SettingsSerializeAs SerializeAs
Gets or sets a T:System.Configuration.SettingsSerializeAs object for the T:System....
SettingsSerializeAs
Determines the serialization scheme used to store application settings.
virtual string Name
Gets or sets the name of the T:System.Configuration.SettingsProperty.