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
- VideoDrawing.cs
- FormattedTextSymbols.cs
- PeerCollaborationPermission.cs
- HtmlElementErrorEventArgs.cs
- CatalogPartDesigner.cs
- SignHashRequest.cs
- RelatedPropertyManager.cs
- HtmlImage.cs
- XPathBinder.cs
- WebPartConnectionsConfigureVerb.cs
- Serializer.cs
- HttpProxyTransportBindingElement.cs
- DomainLiteralReader.cs
- ObjectDataProvider.cs
- ContractTypeNameElement.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- DelegatingTypeDescriptionProvider.cs
- ConstantCheck.cs
- XmlSchemaAttributeGroup.cs
- BuildProvider.cs
- FontUnit.cs
- backend.cs
- WebSysDescriptionAttribute.cs
- ObfuscateAssemblyAttribute.cs
- FragmentQueryProcessor.cs
- DataSourceBooleanViewSchemaConverter.cs
- EmptyCollection.cs
- IODescriptionAttribute.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- DatatypeImplementation.cs
- AppSecurityManager.cs
- OSFeature.cs
- TextDecorationLocationValidation.cs
- MatrixAnimationUsingPath.cs
- XmlLoader.cs
- XamlSerializationHelper.cs
- XmlBoundElement.cs
- BitmapScalingModeValidation.cs
- RegexBoyerMoore.cs
- IPAddress.cs
- ComplexTypeEmitter.cs
- SchemaImporterExtensionsSection.cs
- MappingItemCollection.cs
- ToolStripItem.cs
- StatusStrip.cs
- TransactionTraceIdentifier.cs
- baseshape.cs
- DataObject.cs
- ListViewDataItem.cs
- ServiceNotStartedException.cs
- WindowsIdentity.cs
- EventPrivateKey.cs
- ToolboxControl.cs
- Crypto.cs
- SetStateDesigner.cs
- ResourceContainer.cs
- ParagraphVisual.cs
- ReachFixedPageSerializerAsync.cs
- ResXResourceWriter.cs
- TypeSystem.cs
- TextRange.cs
- TextEditorContextMenu.cs
- GridViewCancelEditEventArgs.cs
- SizeLimitedCache.cs
- As.cs
- OverflowException.cs
- QueryableDataSourceHelper.cs
- NumberFormatInfo.cs
- XmlRawWriterWrapper.cs
- DataControlField.cs
- SolidColorBrush.cs
- CryptoConfig.cs
- _BasicClient.cs
- Monitor.cs
- SessionStateSection.cs
- Types.cs
- StylusPointProperty.cs
- RegistryConfigurationProvider.cs
- ListChunk.cs
- EncodingDataItem.cs
- TypedTableBase.cs
- AudioSignalProblemOccurredEventArgs.cs
- StylusButtonCollection.cs
- InlinedAggregationOperatorEnumerator.cs
- ConnectionInterfaceCollection.cs
- TextDecorationUnitValidation.cs
- SymbolMethod.cs
- Expander.cs
- MonthCalendar.cs
- WSSecurityJan2004.cs
- DataServiceQueryOfT.cs
- AssignDesigner.xaml.cs
- SourceSwitch.cs
- TextEffectCollection.cs
- XmlRawWriter.cs
- MessageAction.cs
- TagPrefixInfo.cs
- ProcessManager.cs
- FixedDocument.cs
- DockPanel.cs