Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Sys / System / Configuration / SettingsProperty.cs / 1 / SettingsProperty.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Configuration { using System.Collections; using System.Collections.Specialized; using System.Runtime.Serialization; using System.Configuration.Provider; using System.Globalization; using System.IO; using System.Runtime.Serialization.Formatters.Binary; using System.Xml.Serialization; using System.ComponentModel; //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// public class SettingsProperty { public virtual string Name { get { return _Name; } set { _Name = value; } } public virtual bool IsReadOnly { get { return _IsReadOnly; } set { _IsReadOnly = value; } } public virtual object DefaultValue { get { return _DefaultValue; } set { _DefaultValue = value; } } public virtual Type PropertyType { get { return _PropertyType; } set { _PropertyType = value; } } public virtual SettingsSerializeAs SerializeAs { get { return _SerializeAs; } set { _SerializeAs = value; } } public virtual SettingsProvider Provider { get { return _Provider; } set { _Provider = value; } } public virtual SettingsAttributeDictionary Attributes { get { return _Attributes; } } public bool ThrowOnErrorDeserializing { get { return _ThrowOnErrorDeserializing; } set { _ThrowOnErrorDeserializing = value; } } public bool ThrowOnErrorSerializing { get { return _ThrowOnErrorSerializing; } set { _ThrowOnErrorSerializing = value; } } //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// public SettingsProperty(string name) { _Name = name; _Attributes = new SettingsAttributeDictionary(); } public SettingsProperty(string name, Type propertyType, SettingsProvider provider, bool isReadOnly, object defaultValue, SettingsSerializeAs serializeAs, SettingsAttributeDictionary attributes, bool throwOnErrorDeserializing, bool throwOnErrorSerializing) { _Name = name; _PropertyType = propertyType; _Provider = provider; _IsReadOnly = isReadOnly; _DefaultValue = defaultValue; _SerializeAs = serializeAs; _Attributes = attributes; _ThrowOnErrorDeserializing = throwOnErrorDeserializing; _ThrowOnErrorSerializing = throwOnErrorSerializing; } //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// public SettingsProperty(SettingsProperty propertyToCopy) { _Name = propertyToCopy.Name; _IsReadOnly = propertyToCopy.IsReadOnly; _DefaultValue = propertyToCopy.DefaultValue; _SerializeAs = propertyToCopy.SerializeAs; _Provider = propertyToCopy.Provider; _PropertyType = propertyToCopy.PropertyType; _ThrowOnErrorDeserializing = propertyToCopy.ThrowOnErrorDeserializing; _ThrowOnErrorSerializing = propertyToCopy.ThrowOnErrorSerializing; _Attributes = new SettingsAttributeDictionary(propertyToCopy.Attributes); } private string _Name; private bool _IsReadOnly; private object _DefaultValue; private SettingsSerializeAs _SerializeAs; private SettingsProvider _Provider; private SettingsAttributeDictionary _Attributes; private Type _PropertyType; private bool _ThrowOnErrorDeserializing; private bool _ThrowOnErrorSerializing; } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Function.cs
- EventMetadata.cs
- StructuredTypeEmitter.cs
- StringValidator.cs
- AngleUtil.cs
- GlyphInfoList.cs
- FlowDocumentView.cs
- mda.cs
- AspNetCacheProfileAttribute.cs
- ToolTip.cs
- CqlIdentifiers.cs
- FontInfo.cs
- SqlUserDefinedTypeAttribute.cs
- XMLSyntaxException.cs
- Selector.cs
- PageRanges.cs
- EventMemberCodeDomSerializer.cs
- Button.cs
- SystemMulticastIPAddressInformation.cs
- DataGridViewControlCollection.cs
- CustomWebEventKey.cs
- ContextMenu.cs
- AddInBase.cs
- SystemSounds.cs
- QueryContinueDragEvent.cs
- PropertyDescriptorCollection.cs
- DbProviderFactory.cs
- WSDualHttpSecurityMode.cs
- DataGridViewTopRowAccessibleObject.cs
- DatatypeImplementation.cs
- NominalTypeEliminator.cs
- MethodBody.cs
- ScriptReferenceEventArgs.cs
- ServiceSettingsResponseInfo.cs
- EventsTab.cs
- RowToParametersTransformer.cs
- FileVersion.cs
- CacheEntry.cs
- Cursor.cs
- SystemIcmpV4Statistics.cs
- PropertyDescriptorGridEntry.cs
- MeshGeometry3D.cs
- Merger.cs
- MetadataArtifactLoaderCompositeFile.cs
- AuthorizationSection.cs
- QilReference.cs
- PageMediaType.cs
- ContextMenuStripGroup.cs
- Soap12FormatExtensions.cs
- AssemblyInfo.cs
- TargetPerspective.cs
- ApplicationProxyInternal.cs
- ObjectDataSourceMethodEventArgs.cs
- PropertyMetadata.cs
- CollectionEditVerbManager.cs
- UserInitiatedNavigationPermission.cs
- HttpRequest.cs
- Comparer.cs
- GlobalizationSection.cs
- ViewValidator.cs
- SimpleBitVector32.cs
- StateItem.cs
- SystemNetworkInterface.cs
- DecoderBestFitFallback.cs
- NegationPusher.cs
- CategoryEditor.cs
- MatrixTransform3D.cs
- WindowsToolbar.cs
- JoinSymbol.cs
- KeyInterop.cs
- NamespaceDecl.cs
- InstanceDataCollection.cs
- CollectionChangeEventArgs.cs
- ImageMapEventArgs.cs
- DeclarationUpdate.cs
- TransformerInfoCollection.cs
- Rotation3D.cs
- ListView.cs
- CompilerResults.cs
- TimersDescriptionAttribute.cs
- MergablePropertyAttribute.cs
- PagesSection.cs
- AnnotationHighlightLayer.cs
- OleDbConnection.cs
- OlePropertyStructs.cs
- WebConfigurationHost.cs
- SerializerDescriptor.cs
- StandardTransformFactory.cs
- Label.cs
- ObjectDataSource.cs
- EnumDataContract.cs
- SecurityElementBase.cs
- SqlDataSourceFilteringEventArgs.cs
- FileUtil.cs
- DefinitionBase.cs
- PreviewPrintController.cs
- MimePart.cs
- PageParser.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- cookiecontainer.cs