Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- NavigationProperty.cs
- EqualityComparer.cs
- ComboBox.cs
- FlowLayout.cs
- HitTestResult.cs
- CodeTypeDelegate.cs
- PolicyVersion.cs
- PreviewKeyDownEventArgs.cs
- JavaScriptString.cs
- SchemaImporter.cs
- EntityDataSourceUtil.cs
- MimeObjectFactory.cs
- KnownTypeAttribute.cs
- UnregisterInfo.cs
- DefaultExpression.cs
- PointLightBase.cs
- XmlUrlResolver.cs
- CloudCollection.cs
- StylusPointCollection.cs
- EnvironmentPermission.cs
- ProfileService.cs
- ToolboxComponentsCreatedEventArgs.cs
- ProvidersHelper.cs
- DesignerPerfEventProvider.cs
- HtmlContainerControl.cs
- ScriptReferenceEventArgs.cs
- ValidationSummaryDesigner.cs
- XmlBufferReader.cs
- AssemblyNameUtility.cs
- DataGridViewColumnCollection.cs
- InputLanguageSource.cs
- VisualBrush.cs
- ColorAnimationUsingKeyFrames.cs
- AffineTransform3D.cs
- DeploymentSectionCache.cs
- ObjectDisposedException.cs
- BindingNavigatorDesigner.cs
- TimeSpan.cs
- UInt16.cs
- ClientScriptManager.cs
- Pointer.cs
- BrowserCapabilitiesCompiler.cs
- OleDbSchemaGuid.cs
- InstalledVoice.cs
- UrlMappingsSection.cs
- WebPartCatalogCloseVerb.cs
- BinHexEncoder.cs
- ZipIOLocalFileBlock.cs
- HtmlSelect.cs
- XmlnsCompatibleWithAttribute.cs
- CharAnimationUsingKeyFrames.cs
- NavigationPropertySingletonExpression.cs
- Button.cs
- XPathNodePointer.cs
- PartitionResolver.cs
- NamespaceCollection.cs
- BinaryMessageFormatter.cs
- HMACSHA1.cs
- DbTransaction.cs
- TypeInitializationException.cs
- TimelineClockCollection.cs
- autovalidator.cs
- LineGeometry.cs
- CodeDomDecompiler.cs
- HttpApplication.cs
- ToolboxCategory.cs
- XmlStreamNodeWriter.cs
- exports.cs
- UnionExpr.cs
- PrefixQName.cs
- HMACSHA384.cs
- AssemblyBuilder.cs
- SqlNamer.cs
- Visitor.cs
- AppModelKnownContentFactory.cs
- App.cs
- SpeechAudioFormatInfo.cs
- DataBinding.cs
- ActivityContext.cs
- AdCreatedEventArgs.cs
- ISAPIWorkerRequest.cs
- WCFModelStrings.Designer.cs
- SafeMILHandle.cs
- IUnknownConstantAttribute.cs
- TimeZoneInfo.cs
- DetailsView.cs
- HttpResponseBase.cs
- SerTrace.cs
- EntityDataSourceColumn.cs
- Math.cs
- SchemaMerger.cs
- EndpointIdentity.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- AnnotationComponentManager.cs
- DocobjHost.cs
- AppSettingsExpressionEditor.cs
- RequestNavigateEventArgs.cs
- UrlUtility.cs
- ComponentManagerBroker.cs
- _ListenerRequestStream.cs