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
- FilterElement.cs
- FlowDocumentFormatter.cs
- CharacterBufferReference.cs
- SqlFlattener.cs
- ConfigurationLocationCollection.cs
- SqlTriggerContext.cs
- UnauthorizedAccessException.cs
- NavigationEventArgs.cs
- MatrixConverter.cs
- TemplatingOptionsDialog.cs
- TraceContext.cs
- CompiledRegexRunnerFactory.cs
- CssTextWriter.cs
- ApplicationInfo.cs
- RepeaterItem.cs
- ResumeStoryboard.cs
- SoapEnumAttribute.cs
- TemplateBindingExtensionConverter.cs
- StringValueConverter.cs
- StyleTypedPropertyAttribute.cs
- WebBaseEventKeyComparer.cs
- _SslSessionsCache.cs
- ColorTransform.cs
- BuilderPropertyEntry.cs
- RouteItem.cs
- HttpWebResponse.cs
- ExpressionCopier.cs
- SystemIPGlobalProperties.cs
- InputLangChangeEvent.cs
- propertyentry.cs
- X509SubjectKeyIdentifierClause.cs
- NodeFunctions.cs
- SimplePropertyEntry.cs
- AnnouncementInnerClientCD1.cs
- Trace.cs
- Boolean.cs
- XPathNavigatorReader.cs
- WebPartCloseVerb.cs
- ConvertersCollection.cs
- GACMembershipCondition.cs
- BStrWrapper.cs
- dbdatarecord.cs
- GenericEnumConverter.cs
- StreamAsIStream.cs
- RegistryKey.cs
- CounterCreationDataCollection.cs
- ListItemConverter.cs
- TraceRecord.cs
- MultilineStringEditor.cs
- SystemColors.cs
- FlowDocumentReader.cs
- ConfigXmlElement.cs
- _BufferOffsetSize.cs
- ListViewDeleteEventArgs.cs
- Selection.cs
- NativeMethods.cs
- TableLayoutCellPaintEventArgs.cs
- HostedNamedPipeTransportManager.cs
- ResponseStream.cs
- Serializer.cs
- SafeThemeHandle.cs
- RectIndependentAnimationStorage.cs
- ParseElementCollection.cs
- COM2Properties.cs
- XmlDocumentSerializer.cs
- TypeUtils.cs
- Number.cs
- ObfuscateAssemblyAttribute.cs
- DictionaryBase.cs
- TimestampInformation.cs
- SafeCryptoHandles.cs
- ImageAttributes.cs
- StrongNameUtility.cs
- TextLine.cs
- StringOutput.cs
- TextRenderer.cs
- AsyncResult.cs
- RuleSettings.cs
- VisualProxy.cs
- ProxyGenerator.cs
- Win32PrintDialog.cs
- PrimitiveCodeDomSerializer.cs
- XPathNodeIterator.cs
- XmlNodeList.cs
- Selector.cs
- BlockCollection.cs
- DtdParser.cs
- EncoderBestFitFallback.cs
- XPathDocumentNavigator.cs
- InternalBase.cs
- AudioSignalProblemOccurredEventArgs.cs
- ThrowHelper.cs
- ObjectComplexPropertyMapping.cs
- AtomMaterializerLog.cs
- EventLogLink.cs
- OdbcEnvironment.cs
- NavigationPropertyEmitter.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- OperationSelectorBehavior.cs
- PageSetupDialog.cs