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
- Int32CollectionConverter.cs
- AuthenticationServiceManager.cs
- SystemNetHelpers.cs
- ListBox.cs
- ErrorFormatterPage.cs
- NativeMethodsOther.cs
- PersonalizationAdministration.cs
- RankException.cs
- NativeMethodsOther.cs
- ListSourceHelper.cs
- sqlser.cs
- ExpressionVisitor.cs
- ViewManager.cs
- Model3D.cs
- XmlSortKeyAccumulator.cs
- Exception.cs
- MainMenu.cs
- SignatureDescription.cs
- CommandHelper.cs
- Compiler.cs
- MultiSelector.cs
- XmlAttributeAttribute.cs
- WindowsFormsDesignerOptionService.cs
- SpotLight.cs
- ConfigurationManagerHelperFactory.cs
- CommonDialog.cs
- SortedList.cs
- ProcessManager.cs
- DataGridViewColumnDesigner.cs
- LineServicesCallbacks.cs
- Light.cs
- SafeThemeHandle.cs
- ListViewDeletedEventArgs.cs
- XmlNamespaceManager.cs
- DelegatedStream.cs
- ArrayConverter.cs
- EntityException.cs
- precedingquery.cs
- ColorMap.cs
- ItemCollection.cs
- UpDownBase.cs
- dsa.cs
- LabelAutomationPeer.cs
- FacetChecker.cs
- AssemblyHash.cs
- MsdtcWrapper.cs
- ExpandCollapsePattern.cs
- XmlUrlResolver.cs
- AddInActivator.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- ExecutedRoutedEventArgs.cs
- XmlDataSourceNodeDescriptor.cs
- SimpleExpression.cs
- ToolBar.cs
- XmlMessageFormatter.cs
- ThemeDictionaryExtension.cs
- ComNativeDescriptor.cs
- AssemblyBuilder.cs
- FunctionImportMapping.cs
- PageThemeBuildProvider.cs
- AuthorizationRuleCollection.cs
- DesignTimeTemplateParser.cs
- HttpDebugHandler.cs
- HasCopySemanticsAttribute.cs
- NumericUpDownAccelerationCollection.cs
- QilUnary.cs
- CustomValidator.cs
- Types.cs
- MediaScriptCommandRoutedEventArgs.cs
- XmlStrings.cs
- ResourceExpressionEditor.cs
- CodeMethodInvokeExpression.cs
- TemplateBindingExtensionConverter.cs
- QueryStringParameter.cs
- OracleLob.cs
- CodeBinaryOperatorExpression.cs
- CryptoConfig.cs
- OutputScopeManager.cs
- validationstate.cs
- CustomPopupPlacement.cs
- XmlSortKeyAccumulator.cs
- EntitySqlQueryCacheKey.cs
- SerializationEventsCache.cs
- ScriptingWebServicesSectionGroup.cs
- BindStream.cs
- WsdlContractConversionContext.cs
- DrawingDrawingContext.cs
- SQLMoneyStorage.cs
- OrderedEnumerableRowCollection.cs
- DataKey.cs
- HtmlTextViewAdapter.cs
- ColumnMapVisitor.cs
- BaseServiceProvider.cs
- ScriptControlDescriptor.cs
- XmlQueryStaticData.cs
- HyperLinkDesigner.cs
- StoragePropertyMapping.cs
- CodeRegionDirective.cs
- OrderedDictionaryStateHelper.cs
- GenericAuthenticationEventArgs.cs