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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DateTimeValueSerializerContext.cs
- XmlHelper.cs
- XmlSchemaCompilationSettings.cs
- TemplatedMailWebEventProvider.cs
- HttpResponseBase.cs
- ActivityExecutorOperation.cs
- ExtensionWindow.cs
- ToolStripItemCollection.cs
- QueryExpression.cs
- ApplicationFileParser.cs
- BuildProviderAppliesToAttribute.cs
- AvTrace.cs
- LayoutSettings.cs
- RegexFCD.cs
- InteropExecutor.cs
- LocatorBase.cs
- WindowsProgressbar.cs
- ClickablePoint.cs
- MDIWindowDialog.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- EmptyImpersonationContext.cs
- CheckBox.cs
- PaginationProgressEventArgs.cs
- PropertyKey.cs
- SafeFileMappingHandle.cs
- DragDeltaEventArgs.cs
- MessageSecurityVersionConverter.cs
- GlyphRun.cs
- ToolStripSplitStackLayout.cs
- SequenceDesigner.cs
- SchemaElementLookUpTable.cs
- WorkflowOperationBehavior.cs
- Formatter.cs
- TaskbarItemInfo.cs
- Helpers.cs
- XmlWrappingReader.cs
- sqlnorm.cs
- XPathChildIterator.cs
- XPathExpr.cs
- TableCellCollection.cs
- Viewport2DVisual3D.cs
- RoutedCommand.cs
- AssemblyCollection.cs
- TaskScheduler.cs
- SystemIPInterfaceStatistics.cs
- PolygonHotSpot.cs
- X509CertificateTrustedIssuerElement.cs
- IsolatedStorageException.cs
- WeakEventManager.cs
- SatelliteContractVersionAttribute.cs
- ErrorInfoXmlDocument.cs
- FastEncoder.cs
- ServiceBuildProvider.cs
- CompilerCollection.cs
- SecuritySessionClientSettings.cs
- ImplicitInputBrush.cs
- ScriptServiceAttribute.cs
- ColumnBinding.cs
- Itemizer.cs
- GridViewSelectEventArgs.cs
- InternalReceiveMessage.cs
- BasePattern.cs
- MatrixIndependentAnimationStorage.cs
- StructuredProperty.cs
- PlacementWorkspace.cs
- DropShadowBitmapEffect.cs
- SmiEventSink_DeferedProcessing.cs
- ConnectionManagementElement.cs
- _Connection.cs
- RouteParameter.cs
- GuidelineSet.cs
- UnSafeCharBuffer.cs
- PartManifestEntry.cs
- precedingquery.cs
- CaseCqlBlock.cs
- IntegerCollectionEditor.cs
- RealizationDrawingContextWalker.cs
- FocusWithinProperty.cs
- MdiWindowListStrip.cs
- SmtpSection.cs
- UnsafeNativeMethodsTablet.cs
- filewebresponse.cs
- XmlAnyElementAttributes.cs
- UserControlBuildProvider.cs
- FullTextState.cs
- ListBox.cs
- WebPartConnectionsConfigureVerb.cs
- LabelInfo.cs
- RawStylusInput.cs
- ApplicationBuildProvider.cs
- SystemFonts.cs
- UnsafeNativeMethods.cs
- DataColumnChangeEvent.cs
- ServiceThrottlingBehavior.cs
- IconConverter.cs
- TransformValueSerializer.cs
- ConnectionInterfaceCollection.cs
- SettingsAttributes.cs
- GlyphInfoList.cs
- SafeHandle.cs