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
- CommandBinding.cs
- KoreanCalendar.cs
- RoleManagerSection.cs
- UnaryNode.cs
- PopupRootAutomationPeer.cs
- DataGridCell.cs
- Rotation3D.cs
- RepeatInfo.cs
- IgnorePropertiesAttribute.cs
- RegexWriter.cs
- SequentialOutput.cs
- BlurBitmapEffect.cs
- SourceFileBuildProvider.cs
- COM2Properties.cs
- Interlocked.cs
- EventHandlersStore.cs
- TraceSection.cs
- AddInControllerImpl.cs
- Compiler.cs
- Model3DGroup.cs
- ISAPIRuntime.cs
- EntityModelSchemaGenerator.cs
- ConnectionString.cs
- RIPEMD160.cs
- FormClosedEvent.cs
- CaseExpr.cs
- SubqueryRules.cs
- EventSource.cs
- MarshalDirectiveException.cs
- TdsParserSessionPool.cs
- DoubleIndependentAnimationStorage.cs
- ValidatingPropertiesEventArgs.cs
- FragmentQuery.cs
- XmlLangPropertyAttribute.cs
- SortDescription.cs
- IUnknownConstantAttribute.cs
- DataGridLinkButton.cs
- ImageListImageEditor.cs
- SoapIncludeAttribute.cs
- JpegBitmapDecoder.cs
- SqlVersion.cs
- UserPrincipalNameElement.cs
- TemplateKey.cs
- CompressionTransform.cs
- BinaryObjectInfo.cs
- ConstructorBuilder.cs
- CLSCompliantAttribute.cs
- SmiGettersStream.cs
- ListSourceHelper.cs
- TreeNodeConverter.cs
- ReliabilityContractAttribute.cs
- SecurityCredentialsManager.cs
- WebPartEditorApplyVerb.cs
- FontFamily.cs
- ReflectionPermission.cs
- AuthenticationModeHelper.cs
- ObjectPropertyMapping.cs
- DocumentPageView.cs
- DocumentPageView.cs
- AncillaryOps.cs
- ToolStripContentPanelRenderEventArgs.cs
- FreeFormDragDropManager.cs
- DataGridViewCellConverter.cs
- SoapClientMessage.cs
- HttpHandlerAction.cs
- SelectionRange.cs
- RenderData.cs
- ToolBarOverflowPanel.cs
- AssemblyInfo.cs
- OlePropertyStructs.cs
- ObjectDataSourceDesigner.cs
- SHA256.cs
- InvokeBinder.cs
- BitmapEncoder.cs
- PaginationProgressEventArgs.cs
- List.cs
- SecurityPolicySection.cs
- DependencyPropertyAttribute.cs
- WindowsSysHeader.cs
- BitmapFrameEncode.cs
- XmlNodeChangedEventArgs.cs
- PropertyEmitter.cs
- OutputCacheProfileCollection.cs
- QuaternionConverter.cs
- TextEditor.cs
- BuildManager.cs
- BinaryObjectWriter.cs
- SmtpClient.cs
- DbConnectionOptions.cs
- PrimitiveSchema.cs
- PerformanceCounterPermissionAttribute.cs
- AttributeProviderAttribute.cs
- WindowsStatusBar.cs
- SqlTriggerAttribute.cs
- ChannelManager.cs
- ActivityInterfaces.cs
- TrackingStringDictionary.cs
- LicenseProviderAttribute.cs
- EntityStoreSchemaFilterEntry.cs
- SqlDelegatedTransaction.cs