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
- WriterOutput.cs
- XmlUtil.cs
- HttpEncoder.cs
- BinHexEncoding.cs
- WindowHideOrCloseTracker.cs
- CodeDomComponentSerializationService.cs
- InvalidOleVariantTypeException.cs
- BuildProvider.cs
- CursorConverter.cs
- SQLUtility.cs
- ExternalCalls.cs
- ExpressionLexer.cs
- PackWebRequestFactory.cs
- DataGridViewSelectedRowCollection.cs
- BuilderElements.cs
- ByteRangeDownloader.cs
- Binding.cs
- HierarchicalDataSourceControl.cs
- StreamedWorkflowDefinitionContext.cs
- BinaryCommonClasses.cs
- ToolboxItemFilterAttribute.cs
- ScopelessEnumAttribute.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- SemaphoreFullException.cs
- DataView.cs
- MarkerProperties.cs
- XmlSubtreeReader.cs
- ProfilePropertyNameValidator.cs
- DefaultValidator.cs
- MaskPropertyEditor.cs
- ReflectionUtil.cs
- ToolStripItem.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- StylusPointDescription.cs
- CookieProtection.cs
- Win32SafeHandles.cs
- ScrollEventArgs.cs
- PropertyItemInternal.cs
- ResourceContainer.cs
- XmlSchemaAll.cs
- GACMembershipCondition.cs
- DataBoundLiteralControl.cs
- sqlinternaltransaction.cs
- SignedXml.cs
- SuppressMergeCheckAttribute.cs
- WindowsEditBoxRange.cs
- QilValidationVisitor.cs
- MessageSecurityProtocolFactory.cs
- EntityDataSourceChangedEventArgs.cs
- SvcMapFileSerializer.cs
- DataControlButton.cs
- FacetChecker.cs
- FilterQuery.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- WebRequest.cs
- DataGridViewColumnHeaderCell.cs
- HitTestFilterBehavior.cs
- FormViewDeleteEventArgs.cs
- ColumnCollection.cs
- MenuItemCollection.cs
- NonClientArea.cs
- CodeIdentifier.cs
- SqlLiftWhereClauses.cs
- TemplateControl.cs
- UpDownBase.cs
- HtmlGenericControl.cs
- ToolStripRenderer.cs
- TextSearch.cs
- ContextConfiguration.cs
- Camera.cs
- XNameConverter.cs
- SqlCachedBuffer.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- GradientStop.cs
- EditorZoneBase.cs
- UserNamePasswordServiceCredential.cs
- HttpModule.cs
- IconConverter.cs
- HitTestWithGeometryDrawingContextWalker.cs
- SqlDataSourceEnumerator.cs
- BufferedStream.cs
- MasterPageBuildProvider.cs
- Base64Encoding.cs
- SoapEnvelopeProcessingElement.cs
- COM2PropertyBuilderUITypeEditor.cs
- COM2ColorConverter.cs
- SqlCrossApplyToCrossJoin.cs
- CacheOutputQuery.cs
- StoreItemCollection.cs
- ConfigurationStrings.cs
- UIElement3D.cs
- HttpRequest.cs
- PathParser.cs
- VectorValueSerializer.cs
- ParallelTimeline.cs
- ServiceModelInstallComponent.cs
- XmlSchemaAnnotated.cs
- TreeBuilder.cs
- EntitySetBase.cs
- SolidColorBrush.cs