Code:
/ DotNET / DotNET / 8.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
- COM2IVsPerPropertyBrowsingHandler.cs
- OLEDB_Util.cs
- ActiveXSite.cs
- CombinedGeometry.cs
- indexingfiltermarshaler.cs
- GeometryConverter.cs
- CodeCompiler.cs
- ScriptManagerProxy.cs
- OutputCacheProviderCollection.cs
- XamlWrappingReader.cs
- LinkedResourceCollection.cs
- HTMLTextWriter.cs
- PriorityItem.cs
- ChameleonKey.cs
- WebPartConnectionsConnectVerb.cs
- SafeNativeMethods.cs
- OleDbCommandBuilder.cs
- FieldAccessException.cs
- FastEncoder.cs
- AtomEntry.cs
- GuidelineSet.cs
- MustUnderstandSoapException.cs
- DispatcherFrame.cs
- WebPartConnectVerb.cs
- TransformGroup.cs
- Overlapped.cs
- HostedNamedPipeTransportManager.cs
- SHA1.cs
- Converter.cs
- RegexTree.cs
- StringValidatorAttribute.cs
- srgsitem.cs
- QuaternionRotation3D.cs
- UnsafeNetInfoNativeMethods.cs
- AutoGeneratedField.cs
- _CacheStreams.cs
- ApplicationActivator.cs
- SqlWriter.cs
- ColumnClickEvent.cs
- SQlBooleanStorage.cs
- StringFreezingAttribute.cs
- ValueProviderWrapper.cs
- InputQueueChannel.cs
- RegexStringValidatorAttribute.cs
- PrivilegeNotHeldException.cs
- SqlParameterCollection.cs
- CommonGetThemePartSize.cs
- ExpressionLexer.cs
- SqlGatherProducedAliases.cs
- ReceiveContext.cs
- COM2ExtendedTypeConverter.cs
- Quad.cs
- ADMembershipProvider.cs
- SoapBinding.cs
- Itemizer.cs
- ObjectQuery_EntitySqlExtensions.cs
- ApplicationSecurityInfo.cs
- _PooledStream.cs
- ByteStream.cs
- GenericAuthenticationEventArgs.cs
- TagMapCollection.cs
- ProcessHostMapPath.cs
- SourceInterpreter.cs
- PersistenceTask.cs
- DateTimeEditor.cs
- TdsParserStateObject.cs
- Stylesheet.cs
- LinearGradientBrush.cs
- EmptyEnumerator.cs
- DesignTimeType.cs
- SAPIEngineTypes.cs
- SystemWebSectionGroup.cs
- InstanceDataCollectionCollection.cs
- DeferredReference.cs
- XamlUtilities.cs
- XmlExceptionHelper.cs
- FramingDecoders.cs
- OleDbReferenceCollection.cs
- MatrixTransform3D.cs
- ProfilePropertyMetadata.cs
- BinaryObjectReader.cs
- KeyFrames.cs
- BufferedResponseStream.cs
- AdornerLayer.cs
- XPathException.cs
- SourceInterpreter.cs
- TableDetailsRow.cs
- SourceChangedEventArgs.cs
- QualificationDataAttribute.cs
- ClickablePoint.cs
- FilteredAttributeCollection.cs
- DynamicDataExtensions.cs
- XmlNodeComparer.cs
- IndexedString.cs
- TextDpi.cs
- ObjectDataSourceWizardForm.cs
- FontFamilyValueSerializer.cs
- MultiPropertyDescriptorGridEntry.cs
- InvalidateEvent.cs
- XmlSchemaValidationException.cs