Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / StdValidatorsAndConverters.cs / 2 / 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 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 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; } } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CollectionViewGroup.cs
- GestureRecognizer.cs
- DesignTable.cs
- BoundsDrawingContextWalker.cs
- HandlerFactoryCache.cs
- ArcSegment.cs
- KeyedHashAlgorithm.cs
- SourceLineInfo.cs
- MasterPageParser.cs
- AutomationPropertyInfo.cs
- RawUIStateInputReport.cs
- IERequestCache.cs
- StreamAsIStream.cs
- SourceSwitch.cs
- recordstatescratchpad.cs
- ValueConversionAttribute.cs
- UriExt.cs
- DataGridViewRowHeaderCell.cs
- MonitoringDescriptionAttribute.cs
- WSSecurityPolicy.cs
- XmlSchemaSimpleContentExtension.cs
- BaseDataList.cs
- XmlLoader.cs
- XamlReader.cs
- InternalBufferManager.cs
- MemoryRecordBuffer.cs
- DateTimeUtil.cs
- HealthMonitoringSection.cs
- VirtualPathExtension.cs
- StylusPointDescription.cs
- HttpConfigurationContext.cs
- coordinator.cs
- SQLBytesStorage.cs
- StorageEntityTypeMapping.cs
- GeneralTransform3DGroup.cs
- GridItemProviderWrapper.cs
- WebHttpSecurity.cs
- ExceptionRoutedEventArgs.cs
- PassportAuthenticationModule.cs
- ControlBuilder.cs
- WsrmFault.cs
- ComponentResourceKeyConverter.cs
- InstanceDescriptor.cs
- ManagedWndProcTracker.cs
- SizeFConverter.cs
- FileRecordSequenceCompletedAsyncResult.cs
- CommentEmitter.cs
- FormatConvertedBitmap.cs
- HttpProfileBase.cs
- IOThreadScheduler.cs
- WebPartsPersonalizationAuthorization.cs
- SharedUtils.cs
- EdmToObjectNamespaceMap.cs
- RightsManagementInformation.cs
- OpenFileDialog.cs
- UpdatePanelTrigger.cs
- FileDataSourceCache.cs
- ExpressionSelection.cs
- CacheOutputQuery.cs
- FixedSOMPageElement.cs
- ConstructorNeedsTagAttribute.cs
- AttributeCollection.cs
- ItemCheckEvent.cs
- EntityUtil.cs
- KeyValuePair.cs
- baseshape.cs
- DetailsViewRow.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- webproxy.cs
- BamlWriter.cs
- CalendarButton.cs
- TcpServerChannel.cs
- XmlMembersMapping.cs
- ApplicationException.cs
- IPeerNeighbor.cs
- CodeExpressionStatement.cs
- NavigationWindowAutomationPeer.cs
- CardSpaceException.cs
- ScrollBarRenderer.cs
- WSMessageEncoding.cs
- CodeAttributeArgument.cs
- Point3D.cs
- StyleXamlTreeBuilder.cs
- SharedPersonalizationStateInfo.cs
- Margins.cs
- ResourceDisplayNameAttribute.cs
- MethodImplAttribute.cs
- TextTreeTextNode.cs
- IdentityVerifier.cs
- Win32Interop.cs
- DiscoveryServerProtocol.cs
- ConfigurationException.cs
- ParameterInfo.cs
- COM2ComponentEditor.cs
- BitFlagsGenerator.cs
- DataSourceView.cs
- SurrogateEncoder.cs
- ProfileBuildProvider.cs
- ChangePassword.cs
- TextServicesCompartment.cs