Code:
/ FX-1434 / FX-1434 / 1.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
- DataSourceProvider.cs
- XmlDocumentFieldSchema.cs
- IPEndPoint.cs
- FixedSOMLineRanges.cs
- DivideByZeroException.cs
- XPathMultyIterator.cs
- TabItem.cs
- CompiledXpathExpr.cs
- Imaging.cs
- DrawTreeNodeEventArgs.cs
- BatchServiceHost.cs
- HuffCodec.cs
- EventLogPermissionAttribute.cs
- DescendantQuery.cs
- PeerObject.cs
- FormsAuthenticationCredentials.cs
- BamlTreeNode.cs
- XslException.cs
- ServicePoint.cs
- XsltQilFactory.cs
- HtmlContainerControl.cs
- ToolStripRenderer.cs
- AuthenticateEventArgs.cs
- SchemaInfo.cs
- CodeLinePragma.cs
- EasingKeyFrames.cs
- CheckBoxFlatAdapter.cs
- PasswordDeriveBytes.cs
- WorkflowTraceTransfer.cs
- GradientBrush.cs
- SourceElementsCollection.cs
- MessageQueueConverter.cs
- Soap.cs
- PreviewPrintController.cs
- ComEventsMethod.cs
- StringUtil.cs
- PlatformCulture.cs
- BuildResultCache.cs
- IRCollection.cs
- WindowsStreamSecurityBindingElement.cs
- RadioButtonRenderer.cs
- RequestCachingSection.cs
- DataColumnCollection.cs
- HostingEnvironment.cs
- SapiGrammar.cs
- Debug.cs
- ClickablePoint.cs
- XmlBindingWorker.cs
- URLAttribute.cs
- SoapFault.cs
- ImageCodecInfo.cs
- SystemTcpStatistics.cs
- XmlDocument.cs
- FileNotFoundException.cs
- DebugInfoExpression.cs
- DateTimeFormatInfoScanner.cs
- CompleteWizardStep.cs
- SimpleHandlerBuildProvider.cs
- HMACSHA384.cs
- StateBag.cs
- COM2ExtendedTypeConverter.cs
- GroupItemAutomationPeer.cs
- Enum.cs
- FormViewCommandEventArgs.cs
- TextEncodedRawTextWriter.cs
- EncoderParameter.cs
- HtmlControlPersistable.cs
- OdbcTransaction.cs
- WebBrowserPermission.cs
- PageContentCollection.cs
- Positioning.cs
- XmlSerializerVersionAttribute.cs
- DataFieldConverter.cs
- EntityProxyTypeInfo.cs
- ProvidePropertyAttribute.cs
- TextDocumentView.cs
- TimeoutException.cs
- GridViewSelectEventArgs.cs
- NameTable.cs
- SoapClientMessage.cs
- AnnotationService.cs
- ManualResetEvent.cs
- TriggerActionCollection.cs
- ContextToken.cs
- _BufferOffsetSize.cs
- CommandEventArgs.cs
- Processor.cs
- ErrorWebPart.cs
- HyperLink.cs
- Decoder.cs
- MobileSysDescriptionAttribute.cs
- ExcCanonicalXml.cs
- RoleGroupCollection.cs
- BitConverter.cs
- OciHandle.cs
- FixedStringLookup.cs
- MsmqAppDomainProtocolHandler.cs
- ExceptionCollection.cs
- XmlTextReader.cs
- MethodMessage.cs