Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ValidatorCollection.cs
- ProjectionCamera.cs
- RepeatButton.cs
- ReflectionUtil.cs
- BasicViewGenerator.cs
- Guid.cs
- Line.cs
- OutputCacheEntry.cs
- SiteMapDataSourceView.cs
- AsyncPostBackTrigger.cs
- DataListComponentEditor.cs
- CalendarDataBindingHandler.cs
- QueuePathDialog.cs
- DispatcherObject.cs
- CustomCredentialPolicy.cs
- Int32RectValueSerializer.cs
- sortedlist.cs
- IDictionary.cs
- TimeSpan.cs
- TextEditorCopyPaste.cs
- CodeDirectionExpression.cs
- GetWinFXPath.cs
- BitmapEffectCollection.cs
- HashAlgorithm.cs
- KeysConverter.cs
- PathNode.cs
- MeshGeometry3D.cs
- TextElementCollectionHelper.cs
- PropertyPath.cs
- Internal.cs
- HtmlTextBoxAdapter.cs
- ItemCollection.cs
- ErrorProvider.cs
- ObjectStateManager.cs
- ListViewItem.cs
- LinqDataSourceDeleteEventArgs.cs
- OptionUsage.cs
- FixedElement.cs
- LogFlushAsyncResult.cs
- PageAsyncTask.cs
- ObjectKeyFrameCollection.cs
- MediaScriptCommandRoutedEventArgs.cs
- regiisutil.cs
- ImmutableCollection.cs
- OdbcConnectionPoolProviderInfo.cs
- Vector.cs
- SID.cs
- ParenthesizePropertyNameAttribute.cs
- HtmlInputReset.cs
- PropertyIDSet.cs
- Rectangle.cs
- QuaternionRotation3D.cs
- keycontainerpermission.cs
- FontDriver.cs
- XslCompiledTransform.cs
- ViewPort3D.cs
- WeakEventTable.cs
- VerificationException.cs
- DrawItemEvent.cs
- EncoderReplacementFallback.cs
- Renderer.cs
- AsymmetricSignatureDeformatter.cs
- TypeConverterHelper.cs
- HtmlMeta.cs
- UniqueEventHelper.cs
- GenericAuthenticationEventArgs.cs
- ListViewItemSelectionChangedEvent.cs
- IssuedTokenParametersEndpointAddressElement.cs
- newitemfactory.cs
- StorageEntityTypeMapping.cs
- XmlDocument.cs
- UnregisterInfo.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- DictionaryCustomTypeDescriptor.cs
- DependencyPropertyDescriptor.cs
- InputProviderSite.cs
- EntityDataSourceState.cs
- autovalidator.cs
- Fonts.cs
- SoapElementAttribute.cs
- DataViewSetting.cs
- ExpressionVisitor.cs
- DrawingContext.cs
- DataGridViewHitTestInfo.cs
- CapabilitiesAssignment.cs
- KeyboardNavigation.cs
- DefaultMemberAttribute.cs
- ObjectHelper.cs
- ChildDocumentBlock.cs
- CanonicalXml.cs
- DataGridViewCellEventArgs.cs
- Behavior.cs
- SpellerError.cs
- BrowserDefinitionCollection.cs
- ResourceReader.cs
- XmlPropertyBag.cs
- PersonalizationProviderHelper.cs
- XAMLParseException.cs
- ClientSideProviderDescription.cs
- NativeMethods.cs