Code:
/ FX-1434 / FX-1434 / 1.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
- FileVersionInfo.cs
- ProfilePropertyNameValidator.cs
- BypassElement.cs
- KeyboardNavigation.cs
- TextTreeRootNode.cs
- _DisconnectOverlappedAsyncResult.cs
- DataGridViewMethods.cs
- FunctionOverloadResolver.cs
- DataComponentNameHandler.cs
- FileChangesMonitor.cs
- NewArray.cs
- TextRunProperties.cs
- XPathParser.cs
- HelpEvent.cs
- PeerInvitationResponse.cs
- DesignerContextDescriptor.cs
- ExpandableObjectConverter.cs
- DeclarationUpdate.cs
- GridProviderWrapper.cs
- BitmapEffectState.cs
- _LocalDataStore.cs
- TimeoutHelper.cs
- SimpleWebHandlerParser.cs
- BindUriHelper.cs
- SchemaCollectionCompiler.cs
- Point3DAnimationBase.cs
- TreeWalkHelper.cs
- DecoderFallbackWithFailureFlag.cs
- XmlAtomicValue.cs
- ServiceDeploymentInfo.cs
- ConfigXmlCDataSection.cs
- OleDbConnection.cs
- HostedNamedPipeTransportManager.cs
- NativeRightsManagementAPIsStructures.cs
- X509CertificateChain.cs
- WindowsSysHeader.cs
- GroupBox.cs
- FileRecordSequence.cs
- CodeMethodMap.cs
- AppPool.cs
- ColumnCollection.cs
- TextBoxAutomationPeer.cs
- UpdateProgress.cs
- TransformProviderWrapper.cs
- HtmlTableRowCollection.cs
- CopyAction.cs
- BuilderInfo.cs
- BuildManager.cs
- FunctionUpdateCommand.cs
- HtmlInputControl.cs
- RowCache.cs
- DesignerLabelAdapter.cs
- DataGridViewRowStateChangedEventArgs.cs
- MDIControlStrip.cs
- SoapFault.cs
- updateconfighost.cs
- HierarchicalDataTemplate.cs
- ListViewAutomationPeer.cs
- SliderAutomationPeer.cs
- X509ClientCertificateCredentialsElement.cs
- PrtTicket_Base.cs
- FontCollection.cs
- Point.cs
- DatePickerAutomationPeer.cs
- MexBindingBindingCollectionElement.cs
- PTUtility.cs
- FontSizeConverter.cs
- RadioButton.cs
- BaseCAMarshaler.cs
- AgileSafeNativeMemoryHandle.cs
- WebPartDisplayMode.cs
- SiteMembershipCondition.cs
- FieldBuilder.cs
- HiddenFieldPageStatePersister.cs
- BlobPersonalizationState.cs
- EntityContainer.cs
- VirtualDirectoryMappingCollection.cs
- UrlPropertyAttribute.cs
- EUCJPEncoding.cs
- RegexWorker.cs
- RichTextBox.cs
- BaseValidatorDesigner.cs
- HashAlgorithm.cs
- DocumentViewerBase.cs
- DataSourceCache.cs
- DynamicRouteExpression.cs
- sqlinternaltransaction.cs
- BrowsableAttribute.cs
- CodeLinePragma.cs
- StyleXamlTreeBuilder.cs
- XmlNodeChangedEventManager.cs
- coordinatorfactory.cs
- SortDescription.cs
- ObfuscationAttribute.cs
- GeneralTransform.cs
- XmlTextWriter.cs
- WorkflowInstanceExtensionManager.cs
- ConfigXmlAttribute.cs
- HttpWriter.cs
- RawTextInputReport.cs