Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- HandleCollector.cs
- ReferencedAssembly.cs
- CodeDOMProvider.cs
- Psha1DerivedKeyGenerator.cs
- ItemList.cs
- StreamedWorkflowDefinitionContext.cs
- WebResourceUtil.cs
- SortDescriptionCollection.cs
- ModelTreeEnumerator.cs
- UnsafeNetInfoNativeMethods.cs
- ImageBrush.cs
- MDIWindowDialog.cs
- CanonicalFontFamilyReference.cs
- AutoGeneratedField.cs
- Italic.cs
- PriorityItem.cs
- ResourcesBuildProvider.cs
- MemberListBinding.cs
- SmiEventSink.cs
- AsyncPostBackTrigger.cs
- XmlSchemaAnnotation.cs
- HttpListenerRequest.cs
- TransactionManagerProxy.cs
- FunctionImportElement.cs
- TemplateControlParser.cs
- TextCollapsingProperties.cs
- UnmanagedMemoryStreamWrapper.cs
- FamilyTypefaceCollection.cs
- SHA384Managed.cs
- PenLineCapValidation.cs
- HostedTransportConfigurationManager.cs
- ProcessModule.cs
- ToolConsole.cs
- AssemblyAttributesGoHere.cs
- DataGridViewRowsAddedEventArgs.cs
- DefaultTextStoreTextComposition.cs
- RegexRunnerFactory.cs
- GlyphRunDrawing.cs
- PropertyEmitterBase.cs
- MethodRental.cs
- WinInet.cs
- DESCryptoServiceProvider.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- ManagedFilter.cs
- CroppedBitmap.cs
- Propagator.ExtentPlaceholderCreator.cs
- UnsafeNativeMethods.cs
- MediaTimeline.cs
- FixedSOMSemanticBox.cs
- References.cs
- TextFormatterImp.cs
- ListBox.cs
- DataSourceView.cs
- InvalidOperationException.cs
- ReachDocumentReferenceCollectionSerializer.cs
- FixedSOMTableCell.cs
- SoapElementAttribute.cs
- ProxyWebPart.cs
- RandomNumberGenerator.cs
- ListInitExpression.cs
- InputBuffer.cs
- NativeMethods.cs
- odbcmetadatafactory.cs
- MergePropertyDescriptor.cs
- InvalidPropValue.cs
- GACMembershipCondition.cs
- RC2CryptoServiceProvider.cs
- DataTableClearEvent.cs
- ChannelDispatcher.cs
- ServiceDebugBehavior.cs
- CachingHintValidation.cs
- PostBackOptions.cs
- XmlEncoding.cs
- FormViewUpdatedEventArgs.cs
- GroupByExpressionRewriter.cs
- CodeNamespaceImport.cs
- RSACryptoServiceProvider.cs
- FixedElement.cs
- ScriptControlManager.cs
- IItemProperties.cs
- CounterCreationData.cs
- WebContext.cs
- SqlAliasesReferenced.cs
- View.cs
- __ComObject.cs
- Descriptor.cs
- EntityTypeBase.cs
- RoleBoolean.cs
- NaturalLanguageHyphenator.cs
- WrapPanel.cs
- OutputCacheProfile.cs
- WebServiceMethodData.cs
- IntegrationExceptionEventArgs.cs
- Convert.cs
- DataGridViewCellCancelEventArgs.cs
- DeferredElementTreeState.cs
- SqlNodeTypeOperators.cs
- HostingMessageProperty.cs
- Int32Animation.cs
- PanelDesigner.cs