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
- HtmlProps.cs
- OutputCacheEntry.cs
- HttpProfileGroupBase.cs
- XmlHierarchyData.cs
- ScrollItemPattern.cs
- RelationshipManager.cs
- FlowDocumentPageViewerAutomationPeer.cs
- AutoGeneratedField.cs
- Thread.cs
- SchemaMerger.cs
- PartialTrustValidationBehavior.cs
- TreeNodeConverter.cs
- QilIterator.cs
- GeneralTransform2DTo3D.cs
- DetailsViewDeletedEventArgs.cs
- WebPartConnection.cs
- WebServiceAttribute.cs
- NavigationProgressEventArgs.cs
- OpacityConverter.cs
- ZipIOLocalFileBlock.cs
- Validator.cs
- MediaCommands.cs
- WebSysDisplayNameAttribute.cs
- ICspAsymmetricAlgorithm.cs
- MultiPropertyDescriptorGridEntry.cs
- SynchronizingStream.cs
- XmlDocumentType.cs
- CommandValueSerializer.cs
- FrameDimension.cs
- COM2IProvidePropertyBuilderHandler.cs
- WebFaultClientMessageInspector.cs
- ListViewCommandEventArgs.cs
- LayoutTable.cs
- DateTimeEditor.cs
- _ListenerRequestStream.cs
- MailHeaderInfo.cs
- InvokeProviderWrapper.cs
- DataRowExtensions.cs
- MetaType.cs
- ListViewTableCell.cs
- SyndicationDeserializer.cs
- ItemCheckEvent.cs
- TextTreeTextElementNode.cs
- TraceInternal.cs
- ZipIOLocalFileDataDescriptor.cs
- Module.cs
- BufferBuilder.cs
- CodeLabeledStatement.cs
- TextEndOfSegment.cs
- QuaternionAnimation.cs
- _NTAuthentication.cs
- DataSourceCacheDurationConverter.cs
- ResourceDictionaryCollection.cs
- ColorContext.cs
- SmiMetaDataProperty.cs
- ConstNode.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SrgsRulesCollection.cs
- ElementHostAutomationPeer.cs
- WebMessageFormatHelper.cs
- IndentTextWriter.cs
- PrimitiveType.cs
- SoapIncludeAttribute.cs
- ObjectFullSpanRewriter.cs
- Stack.cs
- HWStack.cs
- GenericPrincipal.cs
- InternalEnumValidatorAttribute.cs
- SafeLibraryHandle.cs
- ExpressionVisitorHelpers.cs
- AuthenticationModulesSection.cs
- XPathEmptyIterator.cs
- CacheEntry.cs
- DeploymentExceptionMapper.cs
- ViewValidator.cs
- ErrorStyle.cs
- XmlAutoDetectWriter.cs
- Compensate.cs
- DrawListViewColumnHeaderEventArgs.cs
- QueryConverter.cs
- PersonalizableTypeEntry.cs
- WorkflowViewElement.cs
- XmlRawWriterWrapper.cs
- SemaphoreFullException.cs
- BindStream.cs
- ServiceXNameTypeConverter.cs
- SendMessageContent.cs
- EnumerableCollectionView.cs
- altserialization.cs
- LogLogRecordHeader.cs
- ResXResourceReader.cs
- XmlDataDocument.cs
- TransportBindingElementImporter.cs
- SqlMetaData.cs
- SafeNativeMethods.cs
- XmlnsCache.cs
- TemplateControl.cs
- CacheSection.cs
- DBDataPermissionAttribute.cs
- BinaryObjectWriter.cs