Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / StdValidatorsAndConverters.cs / 1305376 / StdValidatorsAndConverters.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Configuration; using System.ComponentModel; namespace System.Web.Configuration { // Common shared validators and type converter instances internal static class StdValidatorsAndConverters { static private TypeConverter s_infiniteTimeSpanConverter; static private TypeConverter s_timeSpanMinutesConverter; static private TypeConverter s_timeSpanMinutesOrInfiniteConverter; static private TypeConverter s_timeSpanSecondsConverter; static private TypeConverter s_timeSpanSecondsOrInfiniteConverter; static private TypeConverter s_whiteSpaceTrimStringConverter; static private TypeConverter s_versionConverter; static private ConfigurationValidatorBase s_positiveTimeSpanValidator; static private ConfigurationValidatorBase s_nonEmptyStringValidator; static private ConfigurationValidatorBase s_nonZeroPositiveIntegerValidator; static private ConfigurationValidatorBase s_positiveIntegerValidator; static internal TypeConverter InfiniteTimeSpanConverter { get { if (s_infiniteTimeSpanConverter == null) { s_infiniteTimeSpanConverter = new InfiniteTimeSpanConverter(); } return s_infiniteTimeSpanConverter; } } static internal TypeConverter TimeSpanMinutesConverter { get { if (s_timeSpanMinutesConverter == null) { s_timeSpanMinutesConverter = new TimeSpanMinutesConverter(); } return s_timeSpanMinutesConverter; } } static internal TypeConverter TimeSpanMinutesOrInfiniteConverter { get { if (s_timeSpanMinutesOrInfiniteConverter == null) { s_timeSpanMinutesOrInfiniteConverter = new TimeSpanMinutesOrInfiniteConverter(); } return s_timeSpanMinutesOrInfiniteConverter; } } static internal TypeConverter TimeSpanSecondsConverter { get { if (s_timeSpanSecondsConverter == null) { s_timeSpanSecondsConverter = new TimeSpanSecondsConverter(); } return s_timeSpanSecondsConverter; } } static internal TypeConverter TimeSpanSecondsOrInfiniteConverter { get { if (s_timeSpanSecondsOrInfiniteConverter == null) { s_timeSpanSecondsOrInfiniteConverter = new TimeSpanSecondsOrInfiniteConverter(); } return s_timeSpanSecondsOrInfiniteConverter; } } static internal TypeConverter WhiteSpaceTrimStringConverter { get { if (s_whiteSpaceTrimStringConverter == null) { s_whiteSpaceTrimStringConverter = new WhiteSpaceTrimStringConverter(); } return s_whiteSpaceTrimStringConverter; } } static internal TypeConverter VersionConverter { get { if (s_versionConverter == null) { s_versionConverter = new VersionConverter(); } return s_versionConverter; } } static internal ConfigurationValidatorBase PositiveTimeSpanValidator { get { if (s_positiveTimeSpanValidator == null) { s_positiveTimeSpanValidator = new PositiveTimeSpanValidator(); } return s_positiveTimeSpanValidator; } } static internal ConfigurationValidatorBase NonEmptyStringValidator { get { if (s_nonEmptyStringValidator == null) { s_nonEmptyStringValidator = new StringValidator(1); } return s_nonEmptyStringValidator; } } static internal ConfigurationValidatorBase NonZeroPositiveIntegerValidator { get { if (s_nonZeroPositiveIntegerValidator == null) { s_nonZeroPositiveIntegerValidator = new IntegerValidator(1, int.MaxValue); } return s_nonZeroPositiveIntegerValidator; } } static internal ConfigurationValidatorBase PositiveIntegerValidator { get { if (s_positiveIntegerValidator == null) { s_positiveIntegerValidator = new IntegerValidator(0, int.MaxValue); } return s_positiveIntegerValidator; } } } } // 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
- HashHelpers.cs
- IPCCacheManager.cs
- WebPartTracker.cs
- EnterpriseServicesHelper.cs
- CharacterString.cs
- SerializationStore.cs
- TrackingValidationObjectDictionary.cs
- SelectionGlyph.cs
- DeploymentSection.cs
- SelectionChangedEventArgs.cs
- TraceUtility.cs
- BaseDataList.cs
- ByteViewer.cs
- WorkItem.cs
- MessageQueuePermission.cs
- WebInvokeAttribute.cs
- XmlSchemaAll.cs
- DataServicePagingProviderWrapper.cs
- DynamicResourceExtensionConverter.cs
- AuthorizationRuleCollection.cs
- SecurityElementBase.cs
- DataGridClipboardCellContent.cs
- EntityCommandExecutionException.cs
- ZoneButton.cs
- RefreshPropertiesAttribute.cs
- CodeMethodReturnStatement.cs
- ItemsControlAutomationPeer.cs
- ElementHostPropertyMap.cs
- QuerySafeNavigator.cs
- InstancePersistenceEvent.cs
- OracleDataAdapter.cs
- InfoCardHelper.cs
- InvalidWMPVersionException.cs
- documentsequencetextpointer.cs
- AsymmetricAlgorithm.cs
- ImportRequest.cs
- BasicHttpMessageCredentialType.cs
- PageCatalogPart.cs
- CharStorage.cs
- PeerCollaboration.cs
- XmlWriterTraceListener.cs
- DPCustomTypeDescriptor.cs
- ContentDefinition.cs
- PolicyImporterElementCollection.cs
- DataSourceConverter.cs
- QueryCoreOp.cs
- ReachSerializerAsync.cs
- AssertSection.cs
- CriticalHandle.cs
- TypedDatasetGenerator.cs
- Send.cs
- TextContainerHelper.cs
- ToolboxComponentsCreatingEventArgs.cs
- FontStretch.cs
- TypeLibraryHelper.cs
- ContainerFilterService.cs
- SpellerHighlightLayer.cs
- WorkItem.cs
- TimeoutValidationAttribute.cs
- DataControlField.cs
- ClusterRegistryConfigurationProvider.cs
- Point4D.cs
- QueueTransferProtocol.cs
- CodeThrowExceptionStatement.cs
- SafeNativeMethods.cs
- StringUtil.cs
- TimelineGroup.cs
- XamlValidatingReader.cs
- JsonSerializer.cs
- IERequestCache.cs
- FixedHyperLink.cs
- DeviceContext2.cs
- EventListenerClientSide.cs
- URLIdentityPermission.cs
- SafeNativeMethods.cs
- XPathNodeIterator.cs
- ObjectStorage.cs
- StringCollection.cs
- MailMessageEventArgs.cs
- TreeBuilderXamlTranslator.cs
- LocationUpdates.cs
- MimeTypeAttribute.cs
- ObservableDictionary.cs
- SerializationException.cs
- NonBatchDirectoryCompiler.cs
- DataServices.cs
- OleDbErrorCollection.cs
- CompilationUnit.cs
- BrushConverter.cs
- HideDisabledControlAdapter.cs
- UndirectedGraph.cs
- BaseUriWithWildcard.cs
- RequestQueryProcessor.cs
- MenuItem.cs
- AspNetSynchronizationContext.cs
- NameScopePropertyAttribute.cs
- XmlNamespaceManager.cs
- SimpleWebHandlerParser.cs
- ResourceReader.cs
- CryptoApi.cs