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
- NamespaceEmitter.cs
- XamlGridLengthSerializer.cs
- CancellationToken.cs
- SamlAuthorityBinding.cs
- HandoffBehavior.cs
- ColumnClickEvent.cs
- Primitive.cs
- PathStreamGeometryContext.cs
- GridViewDeleteEventArgs.cs
- DockingAttribute.cs
- Thickness.cs
- ToolboxItemCollection.cs
- UserCancellationException.cs
- BinaryFormatter.cs
- NamedElement.cs
- HexParser.cs
- Renderer.cs
- ResponseStream.cs
- EntityDataReader.cs
- XmlSerializationWriter.cs
- cache.cs
- updateconfighost.cs
- StructuredTypeInfo.cs
- QuotedStringWriteStateInfo.cs
- IndexedEnumerable.cs
- AuthStoreRoleProvider.cs
- StreamHelper.cs
- parserscommon.cs
- ElementFactory.cs
- BinHexEncoding.cs
- VersionPair.cs
- TextReturnReader.cs
- StoragePropertyMapping.cs
- XmlNodeComparer.cs
- ContainerFilterService.cs
- Int32Converter.cs
- ColumnWidthChangingEvent.cs
- WebRequestModuleElementCollection.cs
- DataListItemCollection.cs
- RulePatternOps.cs
- XmlNamespaceMappingCollection.cs
- GridProviderWrapper.cs
- TextDecorationCollection.cs
- EventArgs.cs
- ColorIndependentAnimationStorage.cs
- NameValueCollection.cs
- ProfileProvider.cs
- HttpVersion.cs
- InputEventArgs.cs
- Graph.cs
- ColorConvertedBitmap.cs
- ViewPort3D.cs
- Pair.cs
- FormView.cs
- CodeExporter.cs
- RootDesignerSerializerAttribute.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- LongValidatorAttribute.cs
- FormViewInsertEventArgs.cs
- AppliedDeviceFiltersEditor.cs
- CodeDomExtensionMethods.cs
- PageThemeParser.cs
- PartialCachingControl.cs
- ReadOnlyAttribute.cs
- ConditionValidator.cs
- Trace.cs
- DataGridDetailsPresenter.cs
- EdgeProfileValidation.cs
- EFAssociationProvider.cs
- MatchAttribute.cs
- XomlDesignerLoader.cs
- RefreshEventArgs.cs
- _Events.cs
- ObjectDisposedException.cs
- AddInContractAttribute.cs
- WindowsGraphics2.cs
- AlphabeticalEnumConverter.cs
- DiscreteKeyFrames.cs
- ParameterBuilder.cs
- CreateParams.cs
- JsonDataContract.cs
- DataGridDesigner.cs
- RemotingSurrogateSelector.cs
- PeerTransportListenAddressValidator.cs
- FacetDescription.cs
- Exceptions.cs
- InlineObject.cs
- HostedHttpContext.cs
- WinInet.cs
- HTMLTagNameToTypeMapper.cs
- WSDualHttpBinding.cs
- Peer.cs
- CodeParameterDeclarationExpressionCollection.cs
- DataExchangeServiceBinder.cs
- VisualTarget.cs
- VisualBrush.cs
- FileDialogPermission.cs
- FormViewDeleteEventArgs.cs
- ConsumerConnectionPointCollection.cs
- LinkConverter.cs