Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
//
// 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SpecialNameAttribute.cs
- HotCommands.cs
- CustomWebEventKey.cs
- CodeNamespaceImportCollection.cs
- RequestContextBase.cs
- InvokeMethodActivityDesigner.cs
- GridViewHeaderRowPresenter.cs
- StrokeNode.cs
- FunctionDefinition.cs
- GetTokenRequest.cs
- ArrayExtension.cs
- TextBlock.cs
- RegexWriter.cs
- AlignmentYValidation.cs
- SystemGatewayIPAddressInformation.cs
- LogicalChannel.cs
- AdobeCFFWrapper.cs
- ReachFixedPageSerializer.cs
- UncommonField.cs
- SqlBuilder.cs
- TypeAccessException.cs
- TreeNodeMouseHoverEvent.cs
- TextServicesCompartmentEventSink.cs
- ContravarianceAdapter.cs
- TimelineCollection.cs
- CodeSnippetExpression.cs
- InputScopeAttribute.cs
- DecimalAnimation.cs
- TransportationConfigurationTypeInstallComponent.cs
- CrossSiteScriptingValidation.cs
- Cast.cs
- altserialization.cs
- HGlobalSafeHandle.cs
- Comparer.cs
- ProgressBarHighlightConverter.cs
- CallTemplateAction.cs
- LocalizedNameDescriptionPair.cs
- PinnedBufferMemoryStream.cs
- RequestStatusBarUpdateEventArgs.cs
- AuthenticationSection.cs
- PresentationSource.cs
- TemplatedAdorner.cs
- DefaultMemberAttribute.cs
- RbTree.cs
- NullableDoubleMinMaxAggregationOperator.cs
- PersonalizationStateInfoCollection.cs
- PointAnimationUsingKeyFrames.cs
- RC2CryptoServiceProvider.cs
- LogicalExpr.cs
- DurableRuntimeValidator.cs
- regiisutil.cs
- ValueSerializerAttribute.cs
- RecognizeCompletedEventArgs.cs
- FocusManager.cs
- MultipleViewPattern.cs
- QueueProcessor.cs
- HandoffBehavior.cs
- ListViewAutomationPeer.cs
- TypefaceMap.cs
- _LocalDataStoreMgr.cs
- DataGridViewColumnEventArgs.cs
- LayoutEditorPart.cs
- FileLevelControlBuilderAttribute.cs
- Site.cs
- DataGridViewLinkCell.cs
- OutputCacheSettings.cs
- ValidationPropertyAttribute.cs
- RotateTransform.cs
- IdentityReference.cs
- XhtmlTextWriter.cs
- FileRecordSequenceCompletedAsyncResult.cs
- DataKey.cs
- _Events.cs
- CharAnimationUsingKeyFrames.cs
- DataGridViewUtilities.cs
- SelectionItemProviderWrapper.cs
- DataServiceProviderMethods.cs
- AnchoredBlock.cs
- HealthMonitoringSectionHelper.cs
- Latin1Encoding.cs
- AutoResizedEvent.cs
- BitmapEffectInput.cs
- MenuScrollingVisibilityConverter.cs
- HttpCapabilitiesEvaluator.cs
- Command.cs
- PropertyCondition.cs
- CompatibleIComparer.cs
- EqualityComparer.cs
- VisualStateChangedEventArgs.cs
- ReadWriteObjectLock.cs
- XmlSecureResolver.cs
- TextRange.cs
- BamlBinaryReader.cs
- DesignBindingPropertyDescriptor.cs
- MemberJoinTreeNode.cs
- DesigntimeLicenseContextSerializer.cs
- FixedSOMTableCell.cs
- Rotation3DKeyFrameCollection.cs
- SpotLight.cs
- ResourceIDHelper.cs