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
- StatusBarPanel.cs
- PartialList.cs
- StringConcat.cs
- TreeView.cs
- HandlerBase.cs
- BitmapCache.cs
- MouseButtonEventArgs.cs
- StylusButton.cs
- IsolatedStorageFile.cs
- ActivityStatusChangeEventArgs.cs
- DesignerOptionService.cs
- CustomCategoryAttribute.cs
- Lasso.cs
- LightweightCodeGenerator.cs
- AnonymousIdentificationSection.cs
- ControlParameter.cs
- AssemblyInfo.cs
- EncoderParameter.cs
- DurationConverter.cs
- Win32MouseDevice.cs
- AnimationTimeline.cs
- BrowserCapabilitiesCodeGenerator.cs
- ExponentialEase.cs
- ObjectSecurity.cs
- MasterPageBuildProvider.cs
- DocumentReferenceCollection.cs
- InlineCategoriesDocument.cs
- PreloadedPackages.cs
- LabelAutomationPeer.cs
- WebBaseEventKeyComparer.cs
- DataRelation.cs
- SafeArrayRankMismatchException.cs
- WebPartEventArgs.cs
- TextEffect.cs
- UpdateTranslator.cs
- SByteConverter.cs
- PolicyLevel.cs
- RowToParametersTransformer.cs
- TriState.cs
- ClrPerspective.cs
- CaseStatementSlot.cs
- MultiSelectRootGridEntry.cs
- StyleModeStack.cs
- XsltConvert.cs
- sqlmetadatafactory.cs
- WebPartEditorOkVerb.cs
- GlyphElement.cs
- SizeConverter.cs
- XmlILStorageConverter.cs
- QueryAccessibilityHelpEvent.cs
- CultureSpecificCharacterBufferRange.cs
- ToolStripDropDownClosingEventArgs.cs
- InternalUserCancelledException.cs
- RequestNavigateEventArgs.cs
- RSAPKCS1SignatureFormatter.cs
- ConfigXmlElement.cs
- IncomingWebRequestContext.cs
- ByteStream.cs
- ProcessInputEventArgs.cs
- VectorCollection.cs
- Point3DAnimation.cs
- ToolStripSettings.cs
- SourceFileInfo.cs
- CodeSnippetCompileUnit.cs
- CqlGenerator.cs
- PlatformNotSupportedException.cs
- BufferAllocator.cs
- IMembershipProvider.cs
- EntryIndex.cs
- FixedSOMPage.cs
- WebResponse.cs
- Vertex.cs
- InteropBitmapSource.cs
- EditorBrowsableAttribute.cs
- SharedRuntimeState.cs
- SelectorAutomationPeer.cs
- TableChangeProcessor.cs
- HtmlInputReset.cs
- ZipIOExtraField.cs
- AmbientLight.cs
- DBConnectionString.cs
- RTTrackingProfile.cs
- WebRequestModuleElementCollection.cs
- CriticalExceptions.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- AdapterDictionary.cs
- CompilerWrapper.cs
- SafeRightsManagementHandle.cs
- EventItfInfo.cs
- RouteData.cs
- GridPattern.cs
- UIElement.cs
- __ConsoleStream.cs
- ValidationHelpers.cs
- HttpChannelBindingToken.cs
- Unit.cs
- SQLDateTime.cs
- SymmetricKeyWrap.cs
- XComponentModel.cs
- CatchDesigner.xaml.cs