Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / Configuration / StdValidatorsAndConverters.cs / 1 / 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
- ValuePatternIdentifiers.cs
- Int32EqualityComparer.cs
- FieldReference.cs
- Ipv6Element.cs
- SchemaObjectWriter.cs
- ArrayEditor.cs
- CounterCreationData.cs
- Substitution.cs
- UInt32Storage.cs
- ConfigurationValues.cs
- CacheEntry.cs
- MarkupWriter.cs
- Knowncolors.cs
- WmlCalendarAdapter.cs
- Selection.cs
- ApplicationSecurityInfo.cs
- ToolStripRenderer.cs
- TemplateBindingExpression.cs
- MetadataArtifactLoaderCompositeResource.cs
- ToolStripDropTargetManager.cs
- XmlSerializerFactory.cs
- MouseEvent.cs
- WorkflowOperationInvoker.cs
- ResponseBodyWriter.cs
- AuthenticateEventArgs.cs
- securitymgrsite.cs
- DataSetFieldSchema.cs
- RuleInfoComparer.cs
- DesignerActionItem.cs
- HttpCapabilitiesEvaluator.cs
- SkewTransform.cs
- TextSelectionProcessor.cs
- SoapSchemaMember.cs
- HMACRIPEMD160.cs
- MessagePropertyAttribute.cs
- RealizationDrawingContextWalker.cs
- DesignerActionHeaderItem.cs
- SqlProfileProvider.cs
- ADMembershipProvider.cs
- ProfileManager.cs
- GeneralTransformGroup.cs
- XsltOutput.cs
- DesignerAutoFormat.cs
- FormatPage.cs
- MatchingStyle.cs
- MsmqBindingElementBase.cs
- NamedPermissionSet.cs
- WindowsContainer.cs
- PointLight.cs
- TextRunCache.cs
- Utils.cs
- DataGridViewBindingCompleteEventArgs.cs
- DocumentViewerBaseAutomationPeer.cs
- CodeAssignStatement.cs
- AgileSafeNativeMemoryHandle.cs
- Token.cs
- ThreadExceptionDialog.cs
- EFDataModelProvider.cs
- VersionedStreamOwner.cs
- Latin1Encoding.cs
- LassoHelper.cs
- NameTable.cs
- KeyNotFoundException.cs
- PackageStore.cs
- SecurityToken.cs
- infer.cs
- CodeCommentStatement.cs
- ControlPaint.cs
- DistinctQueryOperator.cs
- SoapIncludeAttribute.cs
- HtmlContainerControl.cs
- DbCommandTree.cs
- ProviderConnectionPoint.cs
- SecurityPolicySection.cs
- UInt64Converter.cs
- ColorConvertedBitmap.cs
- ServiceDebugElement.cs
- EventHandlerService.cs
- httpapplicationstate.cs
- XmlSchemaProviderAttribute.cs
- PolicyStatement.cs
- UdpUtility.cs
- WindowShowOrOpenTracker.cs
- GridViewDeletedEventArgs.cs
- WsatConfiguration.cs
- TrackingLocationCollection.cs
- Timeline.cs
- PanelContainerDesigner.cs
- IdentityValidationException.cs
- SqlCachedBuffer.cs
- DelegateBodyWriter.cs
- QueryCacheEntry.cs
- SimpleApplicationHost.cs
- DataGridViewImageColumn.cs
- StrokeNodeOperations2.cs
- BamlLocalizabilityResolver.cs
- WebZone.cs
- PropertyDescriptorCollection.cs
- PinnedBufferMemoryStream.cs
- SystemTcpConnection.cs