Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ServiceEndpointAssociationProvider.cs
- XmlAttributeAttribute.cs
- ProfilePropertyMetadata.cs
- Translator.cs
- OdbcRowUpdatingEvent.cs
- GenericWebPart.cs
- SecurityDocument.cs
- DropDownButton.cs
- NamespaceList.cs
- DerivedKeySecurityToken.cs
- SrgsNameValueTag.cs
- MessageBox.cs
- ReliableOutputSessionChannel.cs
- RectAnimationUsingKeyFrames.cs
- CorrelationExtension.cs
- OrderedHashRepartitionStream.cs
- WorkerRequest.cs
- PolyLineSegment.cs
- FormViewActionList.cs
- XamlContextStack.cs
- OleDbException.cs
- DataServiceRequestOfT.cs
- SelectionEditor.cs
- ElapsedEventArgs.cs
- ActionItem.cs
- DataGridToolTip.cs
- SQLSingleStorage.cs
- Form.cs
- GeneralTransform3D.cs
- GeneralTransformCollection.cs
- Stylus.cs
- DataSysAttribute.cs
- SqlComparer.cs
- SolidBrush.cs
- DataGridViewTopRowAccessibleObject.cs
- XmlIlGenerator.cs
- CodeIndexerExpression.cs
- UnSafeCharBuffer.cs
- RepeatBehavior.cs
- DataProviderNameConverter.cs
- ConvertEvent.cs
- SQLMembershipProvider.cs
- XamlWriter.cs
- _emptywebproxy.cs
- DrawingCollection.cs
- dbenumerator.cs
- OrderedParallelQuery.cs
- WebPartDisplayModeCollection.cs
- VirtualizingStackPanel.cs
- ErrorFormatter.cs
- ScrollableControlDesigner.cs
- ContentElementCollection.cs
- SetIterators.cs
- GenericAuthenticationEventArgs.cs
- SchemaType.cs
- ChangeBlockUndoRecord.cs
- XmlSchemaIdentityConstraint.cs
- CharacterMetricsDictionary.cs
- HasCopySemanticsAttribute.cs
- TagMapInfo.cs
- ChangePasswordAutoFormat.cs
- Dump.cs
- CodeTryCatchFinallyStatement.cs
- FileChangeNotifier.cs
- TextServicesProperty.cs
- PreDigestedSignedInfo.cs
- DesignerActionList.cs
- XmlSerializationGeneratedCode.cs
- FixedSchema.cs
- GlyphTypeface.cs
- xsdvalidator.cs
- KnownBoxes.cs
- DataServiceExpressionVisitor.cs
- QueryRewriter.cs
- SqlDataSourceQueryConverter.cs
- RuleSettings.cs
- DataRelation.cs
- TemplatedWizardStep.cs
- TextEditorTyping.cs
- BoolExpressionVisitors.cs
- KnownTypesProvider.cs
- DbMetaDataFactory.cs
- MissingFieldException.cs
- UnknownWrapper.cs
- UserControlParser.cs
- StrokeCollection2.cs
- LingerOption.cs
- SmiTypedGetterSetter.cs
- _UriSyntax.cs
- ResourceManager.cs
- ToolStripCollectionEditor.cs
- DataStorage.cs
- EntityContainerEmitter.cs
- UxThemeWrapper.cs
- BroadcastEventHelper.cs
- XDRSchema.cs
- Rule.cs
- TypeExtensionSerializer.cs
- PerformanceCounterPermissionAttribute.cs
- DataObjectAttribute.cs