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
- AssemblyBuilder.cs
- InlineObject.cs
- XmlSchemaSimpleType.cs
- ReturnValue.cs
- ViewStateChangedEventArgs.cs
- RotateTransform3D.cs
- MessageDescriptionCollection.cs
- NameObjectCollectionBase.cs
- ComponentResourceKey.cs
- EntityDataSourceWizardForm.cs
- Script.cs
- DataSourceSelectArguments.cs
- HitTestWithPointDrawingContextWalker.cs
- FrameworkEventSource.cs
- XslVisitor.cs
- XmlProcessingInstruction.cs
- XmlSchemaDatatype.cs
- JsonGlobals.cs
- UnsafeCollabNativeMethods.cs
- ToolStripInSituService.cs
- ExpandCollapsePattern.cs
- AsnEncodedData.cs
- ResXDataNode.cs
- PackageProperties.cs
- BadImageFormatException.cs
- LoadItemsEventArgs.cs
- SecurityHelper.cs
- DetailsViewUpdatedEventArgs.cs
- TrustSection.cs
- HotSpotCollection.cs
- TdsValueSetter.cs
- RNGCryptoServiceProvider.cs
- TabControl.cs
- Utils.cs
- ReachFixedDocumentSerializer.cs
- XPathNode.cs
- XmlCharacterData.cs
- ToolStripDropDownDesigner.cs
- Keywords.cs
- CssClassPropertyAttribute.cs
- TreeViewItemAutomationPeer.cs
- _ProxyRegBlob.cs
- Canvas.cs
- updatecommandorderer.cs
- hwndwrapper.cs
- CollectionViewGroupInternal.cs
- DataGridViewUtilities.cs
- XmlCharType.cs
- AccessibilityHelperForVista.cs
- ControlAdapter.cs
- PageThemeBuildProvider.cs
- FolderLevelBuildProviderCollection.cs
- PackagePart.cs
- MetadataArtifactLoaderCompositeResource.cs
- KeyFrames.cs
- LineGeometry.cs
- PaperSource.cs
- XPathAncestorIterator.cs
- ImageCodecInfoPrivate.cs
- wgx_sdk_version.cs
- Stylesheet.cs
- CellIdBoolean.cs
- METAHEADER.cs
- LayoutDump.cs
- StrongNameUtility.cs
- ProxyHelper.cs
- ToolBarButtonClickEvent.cs
- WebConfigManager.cs
- InvokePattern.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- ReadOnlyDictionary.cs
- GridViewColumnCollectionChangedEventArgs.cs
- BaseAddressPrefixFilterElement.cs
- FormatSettings.cs
- TrackingLocationCollection.cs
- Size3DConverter.cs
- SqlCommandBuilder.cs
- EmbeddedMailObjectsCollection.cs
- ContentDefinition.cs
- LocalizableAttribute.cs
- BuildProviderAppliesToAttribute.cs
- RegexBoyerMoore.cs
- SqlProfileProvider.cs
- TextRenderer.cs
- SafeViewOfFileHandle.cs
- ProjectedSlot.cs
- DataListItem.cs
- SubstitutionList.cs
- Empty.cs
- XmlDictionaryReaderQuotasElement.cs
- InitializationEventAttribute.cs
- HitTestFilterBehavior.cs
- Int64.cs
- Double.cs
- RemoteX509AsymmetricSecurityKey.cs
- ViewValidator.cs
- CapabilitiesAssignment.cs
- Helpers.cs
- CodeDomConfigurationHandler.cs
- TableRowGroup.cs