Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / Serialization / Configuration / DateTimeSerializationSection.cs / 1 / DateTimeSerializationSection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Serialization.Configuration { using System; using System.Configuration; using System.ComponentModel; using System.Globalization; using System.Reflection; public sealed class DateTimeSerializationSection : ConfigurationSection { public enum DateTimeSerializationMode { Default = 0, Roundtrip = 1, Local = 2, } public DateTimeSerializationSection() { this.properties.Add(this.mode); } protected override ConfigurationPropertyCollection Properties { get { return this.properties; } } [ConfigurationProperty(ConfigurationStrings.Mode, DefaultValue=DateTimeSerializationMode.Roundtrip)] public DateTimeSerializationMode Mode { get { return (DateTimeSerializationMode) this[this.mode]; } set { this[this.mode] = value; } } ConfigurationPropertyCollection properties = new ConfigurationPropertyCollection(); // Supply a type converter, even though it's a plain type converter, to get around ConfigurationProperty's internal // Enum conversion routine. The internal one is case-sensitive, we want this to be case-insensitive. readonly ConfigurationProperty mode = new ConfigurationProperty(ConfigurationStrings.Mode, typeof(DateTimeSerializationMode), DateTimeSerializationMode.Roundtrip, new EnumConverter(typeof(DateTimeSerializationMode)), null, ConfigurationPropertyOptions.None); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RegexWriter.cs
- NCryptSafeHandles.cs
- ShapingWorkspace.cs
- updatecommandorderer.cs
- HttpCachePolicy.cs
- ECDiffieHellmanPublicKey.cs
- FormViewUpdatedEventArgs.cs
- OdbcEnvironment.cs
- Set.cs
- RuleElement.cs
- LogWriteRestartAreaState.cs
- FrameworkElementFactoryMarkupObject.cs
- DataTableMapping.cs
- DriveNotFoundException.cs
- ThreadExceptionDialog.cs
- SignatureDescription.cs
- ObjectParameter.cs
- ThreadExceptionEvent.cs
- IRCollection.cs
- DataServiceQueryException.cs
- NetworkInformationPermission.cs
- FileLoadException.cs
- VectorKeyFrameCollection.cs
- X509SubjectKeyIdentifierClause.cs
- FtpWebResponse.cs
- WebServiceClientProxyGenerator.cs
- XmlArrayAttribute.cs
- InputBinding.cs
- HtmlEmptyTagControlBuilder.cs
- GcHandle.cs
- DirectionalLight.cs
- Screen.cs
- CryptoApi.cs
- PropertyValueChangedEvent.cs
- BaseDataList.cs
- TextServicesCompartment.cs
- CodeSnippetExpression.cs
- MonitorWrapper.cs
- COM2ExtendedBrowsingHandler.cs
- DockPanel.cs
- XPathDescendantIterator.cs
- TypeResolver.cs
- Point.cs
- KnownBoxes.cs
- EventMap.cs
- TextBreakpoint.cs
- Screen.cs
- SerializationEventsCache.cs
- RegexRunner.cs
- XmlAggregates.cs
- Calendar.cs
- UpdatePanelControlTrigger.cs
- PublishLicense.cs
- AppDomainUnloadedException.cs
- CopyOfAction.cs
- BookmarkList.cs
- XmlDocumentType.cs
- DependencySource.cs
- AnnouncementInnerClient11.cs
- AdornerPresentationContext.cs
- EditorPart.cs
- ByteAnimationBase.cs
- Baml2006ReaderFrame.cs
- Debugger.cs
- HeaderCollection.cs
- FixedDocumentPaginator.cs
- TypeConverter.cs
- Certificate.cs
- GridViewRowPresenterBase.cs
- DynamicHyperLink.cs
- DetailsViewPagerRow.cs
- RegexMatch.cs
- CompositeControl.cs
- WriteableBitmap.cs
- ProviderConnectionPointCollection.cs
- TogglePatternIdentifiers.cs
- BasicKeyConstraint.cs
- BindingListCollectionView.cs
- TimelineClockCollection.cs
- TextRange.cs
- Pair.cs
- _ProxyChain.cs
- CDSCollectionETWBCLProvider.cs
- LinkLabel.cs
- VScrollProperties.cs
- assertwrapper.cs
- EventMappingSettings.cs
- SecurityUtils.cs
- Color.cs
- AmbientLight.cs
- RijndaelManagedTransform.cs
- LogicalMethodInfo.cs
- WebPartDeleteVerb.cs
- XmlNamedNodeMap.cs
- Camera.cs
- EventsTab.cs
- QueryContinueDragEvent.cs
- AppDomainProtocolHandler.cs
- QueryCacheEntry.cs
- PropertyTab.cs