Code:
/ DotNET / DotNET / 8.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
- CompressionTransform.cs
- EventLog.cs
- basemetadatamappingvisitor.cs
- ActivityTypeDesigner.xaml.cs
- ResXResourceWriter.cs
- ParserStreamGeometryContext.cs
- AssemblyCache.cs
- XsltArgumentList.cs
- Point4DConverter.cs
- Context.cs
- DeviceContext2.cs
- NotificationContext.cs
- WindowsFormsHelpers.cs
- ObjectStateManagerMetadata.cs
- EmptyWorkItem.cs
- UIElement3D.cs
- WorkflowQueuingService.cs
- Properties.cs
- HitTestFilterBehavior.cs
- SemaphoreSecurity.cs
- WebBrowserDocumentCompletedEventHandler.cs
- TextSimpleMarkerProperties.cs
- EmptyStringExpandableObjectConverter.cs
- Rect.cs
- DataColumnCollection.cs
- EventLogEntry.cs
- PageRanges.cs
- IIS7UserPrincipal.cs
- EditorZone.cs
- XXXOnTypeBuilderInstantiation.cs
- SafeBitVector32.cs
- FrameworkContentElement.cs
- BooleanKeyFrameCollection.cs
- CompiledIdentityConstraint.cs
- WeakEventTable.cs
- CachedCompositeFamily.cs
- XmlStringTable.cs
- CqlLexerHelpers.cs
- CompiledRegexRunnerFactory.cs
- OraclePermissionAttribute.cs
- ListBindingHelper.cs
- ProgressBarAutomationPeer.cs
- MachineKeyConverter.cs
- WebConfigurationManager.cs
- SettingsPropertyIsReadOnlyException.cs
- MailSettingsSection.cs
- MeshGeometry3D.cs
- DataAdapter.cs
- MetadataHelper.cs
- AlternateView.cs
- SchemaComplexType.cs
- dataprotectionpermissionattribute.cs
- FrameDimension.cs
- ExtentCqlBlock.cs
- FtpWebRequest.cs
- HelpInfo.cs
- SessionEndingCancelEventArgs.cs
- NotCondition.cs
- EntityReference.cs
- ColumnBinding.cs
- XmlArrayItemAttributes.cs
- clipboard.cs
- IISMapPath.cs
- StorageEntityContainerMapping.cs
- DispatcherOperation.cs
- EmissiveMaterial.cs
- ScriptComponentDescriptor.cs
- PartialCachingControl.cs
- Scanner.cs
- PassportAuthenticationEventArgs.cs
- HttpRequestCacheValidator.cs
- Types.cs
- NameTable.cs
- EventTrigger.cs
- WebPartConnectionsConnectVerb.cs
- ProfileService.cs
- ObjectViewListener.cs
- XmlSchemaSimpleContent.cs
- CalendarAutomationPeer.cs
- SqlDataSourceDesigner.cs
- GlyphRun.cs
- StylusButton.cs
- CapabilitiesRule.cs
- CodeNamespaceCollection.cs
- FilePrompt.cs
- XmlSchemaAttributeGroup.cs
- ToolStripSeparatorRenderEventArgs.cs
- Size3D.cs
- InternalEnumValidatorAttribute.cs
- WsatProxy.cs
- TreeNodeCollectionEditor.cs
- SmtpFailedRecipientsException.cs
- FastEncoderWindow.cs
- LogFlushAsyncResult.cs
- IteratorDescriptor.cs
- ProfileSection.cs
- ProgressBar.cs
- Rect3DConverter.cs
- HtmlTableRow.cs
- MimeTypeAttribute.cs