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
- GlyphRunDrawing.cs
- AppSettingsReader.cs
- httpstaticobjectscollection.cs
- RemoteCryptoSignHashRequest.cs
- ConfigXmlSignificantWhitespace.cs
- Freezable.cs
- ContextMenu.cs
- MergePropertyDescriptor.cs
- DomNameTable.cs
- WindowsIdentity.cs
- UnhandledExceptionEventArgs.cs
- WindowsContainer.cs
- UpdateCommandGenerator.cs
- TemplateContainer.cs
- EncoderParameters.cs
- FilterableAttribute.cs
- BooleanExpr.cs
- IteratorFilter.cs
- EventHandlerService.cs
- TaskHelper.cs
- SqlInfoMessageEvent.cs
- SelectiveScrollingGrid.cs
- CompleteWizardStep.cs
- X509RawDataKeyIdentifierClause.cs
- ViewLoader.cs
- RectConverter.cs
- DataGridViewControlCollection.cs
- VisualBrush.cs
- AudioStateChangedEventArgs.cs
- TemplateLookupAction.cs
- NegatedCellConstant.cs
- RelationshipSet.cs
- SoapMessage.cs
- _Rfc2616CacheValidators.cs
- ADMembershipProvider.cs
- DataTableMappingCollection.cs
- Base64Encoder.cs
- Misc.cs
- OdbcConnectionString.cs
- SspiSecurityTokenProvider.cs
- SafeRightsManagementQueryHandle.cs
- BlobPersonalizationState.cs
- FrameworkElement.cs
- TextCollapsingProperties.cs
- FixedPage.cs
- DebugHandleTracker.cs
- EditorPartChrome.cs
- ValuePattern.cs
- TokenizerHelper.cs
- ProviderUtil.cs
- XmlSchemaSimpleContent.cs
- StateRuntime.cs
- ICspAsymmetricAlgorithm.cs
- EmptyControlCollection.cs
- ColorAnimationUsingKeyFrames.cs
- RTLAwareMessageBox.cs
- TargetException.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- ValueTable.cs
- BufferedGraphicsManager.cs
- AudienceUriMode.cs
- StructuredTypeInfo.cs
- SizeKeyFrameCollection.cs
- ParserStack.cs
- ToolBarButton.cs
- NativeWindow.cs
- SoapAttributes.cs
- EmbeddedMailObjectsCollection.cs
- mediaeventshelper.cs
- PerformanceCounterPermissionAttribute.cs
- DeliveryStrategy.cs
- ToolStripLabel.cs
- StringValueSerializer.cs
- FixedBufferAttribute.cs
- InkCanvasSelection.cs
- TransformerInfoCollection.cs
- ResourceExpression.cs
- Rotation3DKeyFrameCollection.cs
- MimeTypeAttribute.cs
- ApplicationContext.cs
- ExtendedPropertyCollection.cs
- ModelUIElement3D.cs
- BaseTemplatedMobileComponentEditor.cs
- AssemblyUtil.cs
- SrgsNameValueTag.cs
- PeerCollaboration.cs
- DictionaryTraceRecord.cs
- PointUtil.cs
- StrongNameKeyPair.cs
- FileFormatException.cs
- RegisteredHiddenField.cs
- SafeBitVector32.cs
- StringDictionaryEditor.cs
- CaseInsensitiveComparer.cs
- XmlSchemaAttributeGroup.cs
- BridgeDataRecord.cs
- XmlQualifiedNameTest.cs
- CacheModeConverter.cs
- ControlCachePolicy.cs
- IHttpResponseInternal.cs