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
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- Logging.cs
- Quaternion.cs
- RequestTimeoutManager.cs
- UnknownWrapper.cs
- HostUtils.cs
- XmlObjectSerializerContext.cs
- CacheDependency.cs
- LocationUpdates.cs
- CounterSampleCalculator.cs
- securitycriticaldataformultiplegetandset.cs
- PolicyImporterElement.cs
- ColorInterpolationModeValidation.cs
- TypeCodeDomSerializer.cs
- CompilerErrorCollection.cs
- WinInetCache.cs
- XomlCompilerResults.cs
- RequestResizeEvent.cs
- EntityDataSourceMemberPath.cs
- MethodToken.cs
- ObjectQuery.cs
- SqlCommandBuilder.cs
- IndexedSelectQueryOperator.cs
- X509Extension.cs
- WebPartConnectionsCancelEventArgs.cs
- DbSetClause.cs
- MergePropertyDescriptor.cs
- Monitor.cs
- WinFormsComponentEditor.cs
- IndentedWriter.cs
- SchemaSetCompiler.cs
- RuntimeResourceSet.cs
- XmlNamespaceDeclarationsAttribute.cs
- pingexception.cs
- VarRefManager.cs
- CompiledQuery.cs
- Convert.cs
- EncryptedData.cs
- EdgeModeValidation.cs
- AssertFilter.cs
- MenuCommands.cs
- BuildManager.cs
- RefreshEventArgs.cs
- XamlClipboardData.cs
- PopupEventArgs.cs
- Types.cs
- ActivityXRefConverter.cs
- XmlValueConverter.cs
- CopyNamespacesAction.cs
- MemoryFailPoint.cs
- ProxyAttribute.cs
- KeyGesture.cs
- HtmlSelect.cs
- StackSpiller.cs
- SafeEventLogWriteHandle.cs
- SmiConnection.cs
- IOThreadScheduler.cs
- ClientRolePrincipal.cs
- Html32TextWriter.cs
- dtdvalidator.cs
- CSharpCodeProvider.cs
- InputScope.cs
- PerformanceCounterManager.cs
- FileDialog_Vista_Interop.cs
- XhtmlConformanceSection.cs
- OperatingSystem.cs
- LoadRetryHandler.cs
- XmlAttribute.cs
- sqlinternaltransaction.cs
- BasicAsyncResult.cs
- Pen.cs
- XmlILIndex.cs
- ContainerSelectorGlyph.cs
- CachedTypeface.cs
- RequestQueryProcessor.cs
- FamilyCollection.cs
- InitializationEventAttribute.cs
- SpecularMaterial.cs
- _IPv4Address.cs
- ImageCreator.cs
- DataSourceXmlSubItemAttribute.cs
- ReadOnlyDictionary.cs
- DBSqlParserColumn.cs
- StdRegProviderWrapper.cs
- LogAppendAsyncResult.cs
- LinqDataSourceDeleteEventArgs.cs
- RequestCacheEntry.cs
- MultiBinding.cs
- ScriptDescriptor.cs
- ThreadStaticAttribute.cs
- StylusPointPropertyInfoDefaults.cs
- EditableTreeList.cs
- ConfigurationSectionGroup.cs
- ClosableStream.cs
- ExpressionBuilder.cs
- CompoundFileIOPermission.cs
- SQLByteStorage.cs
- Subtree.cs
- SystemThemeKey.cs
- XmlEntity.cs