Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / PositiveTimeSpanValidator.cs / 1305376 / PositiveTimeSpanValidator.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Configuration; using System.ComponentModel; namespace System.Configuration { public class PositiveTimeSpanValidator : ConfigurationValidatorBase { public override bool CanValidate(Type type) { return (type == typeof(TimeSpan)); } public override void Validate(object value) { if (value == null) { throw new ArgumentNullException("value"); } if (((TimeSpan)value) <= TimeSpan.Zero) { throw new ArgumentException(SR.GetString(SR.Validator_timespan_value_must_be_positive)); } } } } // 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
- DataTablePropertyDescriptor.cs
- Int32AnimationBase.cs
- _ProxyRegBlob.cs
- CultureSpecificCharacterBufferRange.cs
- XomlCompiler.cs
- oledbmetadatacollectionnames.cs
- PageAsyncTaskManager.cs
- recordstatescratchpad.cs
- HashRepartitionStream.cs
- HtmlValidationSummaryAdapter.cs
- ClientEventManager.cs
- CodeBinaryOperatorExpression.cs
- ISessionStateStore.cs
- RequestCachePolicy.cs
- DelegateSerializationHolder.cs
- Hash.cs
- XmlSchemaSimpleType.cs
- SpellerInterop.cs
- Reference.cs
- PropertyConverter.cs
- ApplicationFileParser.cs
- Visual3D.cs
- SplitterEvent.cs
- Rotation3DKeyFrameCollection.cs
- AuthenticationServiceManager.cs
- TargetPerspective.cs
- IRCollection.cs
- Control.cs
- CurrencyWrapper.cs
- OdbcParameterCollection.cs
- _UncName.cs
- ColorAnimationUsingKeyFrames.cs
- TextTabProperties.cs
- TransactedReceiveData.cs
- CodeLabeledStatement.cs
- ConsumerConnectionPointCollection.cs
- SchemaNamespaceManager.cs
- SmiEventStream.cs
- HtmlFormAdapter.cs
- InternalCache.cs
- Rule.cs
- WebPartMenuStyle.cs
- CatalogPartChrome.cs
- PersonalizationStateInfo.cs
- CallbackValidatorAttribute.cs
- OracleException.cs
- __ConsoleStream.cs
- GridViewCellAutomationPeer.cs
- _CacheStreams.cs
- DataBoundControl.cs
- ToolStripStatusLabel.cs
- DesignerAutoFormatStyle.cs
- StringExpressionSet.cs
- ConstraintManager.cs
- ProfileGroupSettings.cs
- StrokeNode.cs
- InputProviderSite.cs
- CustomMenuItemCollection.cs
- IDispatchConstantAttribute.cs
- TemplateModeChangedEventArgs.cs
- Enum.cs
- ItemsControlAutomationPeer.cs
- SystemNetworkInterface.cs
- DataGridViewColumnEventArgs.cs
- EntityDataSourceSelectedEventArgs.cs
- MouseEvent.cs
- CompatibleIComparer.cs
- XmlSchemaSimpleTypeList.cs
- EventLogWatcher.cs
- DesignerAttribute.cs
- _DigestClient.cs
- AttachedAnnotationChangedEventArgs.cs
- ThreadStateException.cs
- ConfigurationManagerInternal.cs
- SymDocumentType.cs
- TextPointer.cs
- DescriptionCreator.cs
- DeferredSelectedIndexReference.cs
- BreakRecordTable.cs
- XPathDocumentNavigator.cs
- DBCSCodePageEncoding.cs
- EventManager.cs
- TextTrailingCharacterEllipsis.cs
- NetCodeGroup.cs
- RuleSet.cs
- PixelFormats.cs
- VisualStyleElement.cs
- DataDesignUtil.cs
- TypeInformation.cs
- DecimalAnimation.cs
- CreateRefExpr.cs
- ManagementDateTime.cs
- WindowShowOrOpenTracker.cs
- Configuration.cs
- IsolatedStorageFilePermission.cs
- BrowserDefinitionCollection.cs
- LineBreakRecord.cs
- LogEntryUtils.cs
- StrongNamePublicKeyBlob.cs
- Unit.cs