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
- ClientSponsor.cs
- NativeMethods.cs
- HashHelper.cs
- XmlAttribute.cs
- TempFiles.cs
- GenerateHelper.cs
- SqlException.cs
- PhotoPrintingIntent.cs
- WebBrowserHelper.cs
- AvTraceFormat.cs
- ReferencedType.cs
- ToolStripDropDownClosingEventArgs.cs
- EntityDataSourceContainerNameItem.cs
- AssemblySettingAttributes.cs
- MarginCollapsingState.cs
- XmlSchemaExternal.cs
- XamlReader.cs
- Propagator.JoinPropagator.cs
- ValidationPropertyAttribute.cs
- InplaceBitmapMetadataWriter.cs
- RuleSet.cs
- PolyQuadraticBezierSegment.cs
- NotifyIcon.cs
- ProjectionPlanCompiler.cs
- TdsParser.cs
- SqlDataSourceParameterParser.cs
- _emptywebproxy.cs
- ErrorWebPart.cs
- MsmqTransportReceiveParameters.cs
- ProviderBase.cs
- WebUtil.cs
- ListViewItemSelectionChangedEvent.cs
- UnauthorizedAccessException.cs
- QuaternionAnimationBase.cs
- RotateTransform.cs
- GridErrorDlg.cs
- LocalizedNameDescriptionPair.cs
- WebPartsPersonalizationAuthorization.cs
- ConnectionInterfaceCollection.cs
- PageAsyncTaskManager.cs
- DataSetMappper.cs
- GroupStyle.cs
- ReaderContextStackData.cs
- ZipIOExtraField.cs
- TextSimpleMarkerProperties.cs
- GAC.cs
- ColumnHeaderConverter.cs
- DockAndAnchorLayout.cs
- GridViewRowCollection.cs
- RequestTimeoutManager.cs
- ObjectDataSource.cs
- SqlAliaser.cs
- MaskDescriptors.cs
- SmiRecordBuffer.cs
- CategoryAttribute.cs
- ProviderIncompatibleException.cs
- VScrollProperties.cs
- FormatException.cs
- CustomBindingCollectionElement.cs
- MouseDevice.cs
- ChannelTerminatedException.cs
- RequestCachePolicy.cs
- BamlTreeNode.cs
- FontDifferentiator.cs
- TextParagraphProperties.cs
- NetworkInterface.cs
- WebPartRestoreVerb.cs
- BlurEffect.cs
- PresentationTraceSources.cs
- ParameterBuilder.cs
- MaskPropertyEditor.cs
- ClientScriptManager.cs
- DataMisalignedException.cs
- SpeechRecognitionEngine.cs
- XmlHierarchicalEnumerable.cs
- SrgsSemanticInterpretationTag.cs
- QilName.cs
- XmlEventCache.cs
- EntityDataSourceContainerNameItem.cs
- connectionpool.cs
- UrlAuthFailedErrorFormatter.cs
- MenuAdapter.cs
- Pool.cs
- Schema.cs
- IndexerHelper.cs
- SiteMapHierarchicalDataSourceView.cs
- Accessible.cs
- Roles.cs
- AutomationProperty.cs
- RawMouseInputReport.cs
- MetricEntry.cs
- WindowsRegion.cs
- SettingsPropertyWrongTypeException.cs
- RelationshipEndMember.cs
- QilCloneVisitor.cs
- PropertyTab.cs
- URLMembershipCondition.cs
- ListBoxItemAutomationPeer.cs
- NumericUpDownAccelerationCollection.cs
- PackageRelationshipCollection.cs