Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / System.Runtime.DurableInstancing / System / Runtime / TimeSpanOrInfiniteValidator.cs / 1305376 / TimeSpanOrInfiniteValidator.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Runtime { using System; using System.Configuration; class TimeSpanOrInfiniteValidator : TimeSpanValidator { public TimeSpanOrInfiniteValidator(TimeSpan minValue, TimeSpan maxValue) : base(minValue, maxValue) { } public override void Validate(object value) { if (value.GetType() == typeof(TimeSpan) && (TimeSpan)value == TimeSpan.MaxValue) { return; // we're good } base.Validate(value); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Runtime { using System; using System.Configuration; class TimeSpanOrInfiniteValidator : TimeSpanValidator { public TimeSpanOrInfiniteValidator(TimeSpan minValue, TimeSpan maxValue) : base(minValue, maxValue) { } public override void Validate(object value) { if (value.GetType() == typeof(TimeSpan) && (TimeSpan)value == TimeSpan.MaxValue) { return; // we're good } base.Validate(value); } } } // 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
- RuleDefinitions.cs
- TraceSection.cs
- MessageBox.cs
- Scheduler.cs
- FixedPageStructure.cs
- MenuItemCollection.cs
- AuthenticationManager.cs
- IdentityModelStringsVersion1.cs
- MD5Cng.cs
- securitycriticaldataClass.cs
- DateTimeEditor.cs
- DataGridRow.cs
- ValidationManager.cs
- StylusDownEventArgs.cs
- FeatureSupport.cs
- MetaType.cs
- PageParserFilter.cs
- SoapExtensionImporter.cs
- XmlSchemaValidator.cs
- HierarchicalDataSourceDesigner.cs
- SiteMapSection.cs
- Run.cs
- Component.cs
- XmlCharCheckingReader.cs
- HttpWebRequest.cs
- ValidatingReaderNodeData.cs
- XmlPropertyBag.cs
- XmlSchemaExporter.cs
- EntitySqlQueryCacheKey.cs
- IOThreadTimer.cs
- FileIOPermission.cs
- ColorBlend.cs
- recordstate.cs
- WebPartPersonalization.cs
- TextProperties.cs
- Effect.cs
- ConfigurationManagerInternalFactory.cs
- MemoryMappedView.cs
- Pen.cs
- PowerModeChangedEventArgs.cs
- PrintController.cs
- PrintDialog.cs
- ViewKeyConstraint.cs
- EventLogPermission.cs
- ParamArrayAttribute.cs
- VisualBasic.cs
- OrderByQueryOptionExpression.cs
- MustUnderstandSoapException.cs
- DrawListViewColumnHeaderEventArgs.cs
- TransformConverter.cs
- RegexInterpreter.cs
- InputScopeManager.cs
- TextPointerBase.cs
- WrappedIUnknown.cs
- MenuItemStyle.cs
- TemplateApplicationHelper.cs
- SqlInternalConnectionSmi.cs
- SocketManager.cs
- recordstatefactory.cs
- CodeAccessPermission.cs
- ResourceExpressionBuilder.cs
- UnsafeNativeMethods.cs
- DefaultBindingPropertyAttribute.cs
- ArrayHelper.cs
- WindowsSysHeader.cs
- ZipIOExtraFieldElement.cs
- KeyConstraint.cs
- DbConnectionOptions.cs
- CommonDialog.cs
- IISMapPath.cs
- SettingsPropertyIsReadOnlyException.cs
- TranslateTransform3D.cs
- QuaternionKeyFrameCollection.cs
- AppDomainUnloadedException.cs
- GridViewCommandEventArgs.cs
- DropSource.cs
- CodeGeneratorOptions.cs
- StringFunctions.cs
- XPathDescendantIterator.cs
- DateTimeParse.cs
- CollectionContainer.cs
- UIElementParagraph.cs
- CryptoApi.cs
- DocumentApplicationJournalEntry.cs
- HttpHeaderCollection.cs
- Converter.cs
- VirtualPathUtility.cs
- TextView.cs
- entityreference_tresulttype.cs
- InstanceData.cs
- OrderedDictionary.cs
- SafeFileHandle.cs
- XmlArrayItemAttribute.cs
- ProtectedProviderSettings.cs
- ClosableStream.cs
- DataGridViewTextBoxCell.cs
- RadialGradientBrush.cs
- ExtenderHelpers.cs
- TimeoutValidationAttribute.cs
- DataObjectSettingDataEventArgs.cs