Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / Configuration / StdValidatorsAndConverters.cs / 4 / 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WindowsAuthenticationModule.cs
- Enum.cs
- DataGridViewCellValueEventArgs.cs
- RtfToXamlLexer.cs
- EnvironmentPermission.cs
- WindowsAuthenticationModule.cs
- DbProviderSpecificTypePropertyAttribute.cs
- WindowsFormsSectionHandler.cs
- DeploymentExceptionMapper.cs
- XhtmlBasicLinkAdapter.cs
- WorkflowOperationContext.cs
- ValidationErrorInfo.cs
- Grammar.cs
- UserControl.cs
- GridViewRowPresenter.cs
- Clause.cs
- LinqDataSourceContextEventArgs.cs
- XamlParser.cs
- UnsafeNativeMethods.cs
- XPathConvert.cs
- MultiSelector.cs
- DataExpression.cs
- StatusBarDesigner.cs
- LocalizabilityAttribute.cs
- UTF32Encoding.cs
- FontConverter.cs
- _IPv6Address.cs
- Walker.cs
- ClassicBorderDecorator.cs
- Collection.cs
- FieldToken.cs
- TemplatedAdorner.cs
- ProjectionPlan.cs
- DeflateEmulationStream.cs
- ApplicationSecurityManager.cs
- MsmqActivation.cs
- Method.cs
- XamlReader.cs
- EditingContext.cs
- DataSourceControlBuilder.cs
- InstanceDataCollectionCollection.cs
- SolidColorBrush.cs
- RegistrySecurity.cs
- ResourceReferenceExpressionConverter.cs
- SystemColors.cs
- TouchesCapturedWithinProperty.cs
- WebBrowserPermission.cs
- RunClient.cs
- MediaContext.cs
- VisualStyleTypesAndProperties.cs
- ExtenderProvidedPropertyAttribute.cs
- ChtmlCommandAdapter.cs
- DataBindingExpressionBuilder.cs
- ListViewPagedDataSource.cs
- StringFunctions.cs
- ConstNode.cs
- SchemaMerger.cs
- SqlCommand.cs
- PTConverter.cs
- PageCodeDomTreeGenerator.cs
- PathGeometry.cs
- ResolveCompletedEventArgs.cs
- PipelineModuleStepContainer.cs
- SurrogateEncoder.cs
- Menu.cs
- GroupItemAutomationPeer.cs
- HttpProtocolReflector.cs
- XslCompiledTransform.cs
- DataServiceQueryOfT.cs
- SqlVisitor.cs
- ButtonField.cs
- ListView.cs
- ObjectMaterializedEventArgs.cs
- ToolConsole.cs
- LinqDataSourceInsertEventArgs.cs
- ContextStaticAttribute.cs
- WebServiceEnumData.cs
- ReservationCollection.cs
- EventlogProvider.cs
- RightsManagementInformation.cs
- TrackBarDesigner.cs
- FileUtil.cs
- Error.cs
- StyleBamlTreeBuilder.cs
- DrawingVisualDrawingContext.cs
- DateTimeConverter.cs
- SchemaDeclBase.cs
- Sequence.cs
- CryptoHelper.cs
- CapabilitiesRule.cs
- PageWrapper.cs
- ProfilePropertyNameValidator.cs
- Wizard.cs
- JavaScriptObjectDeserializer.cs
- ClientSettingsSection.cs
- ServiceDiscoveryBehavior.cs
- RayHitTestParameters.cs
- HttpServerVarsCollection.cs
- MDIWindowDialog.cs
- DerivedKeySecurityToken.cs