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
- RunWorkerCompletedEventArgs.cs
- SurrogateEncoder.cs
- TakeQueryOptionExpression.cs
- CodeRegionDirective.cs
- WebPartManagerInternals.cs
- OrderedDictionaryStateHelper.cs
- UnaryNode.cs
- ButtonChrome.cs
- indexingfiltermarshaler.cs
- DtdParser.cs
- WindowsFormsHelpers.cs
- WriteableBitmap.cs
- SecurityElement.cs
- GridViewRowEventArgs.cs
- Stroke2.cs
- IdentityManager.cs
- AttachedAnnotationChangedEventArgs.cs
- AuthenticationService.cs
- PackagePartCollection.cs
- ContextMarshalException.cs
- typedescriptorpermission.cs
- Array.cs
- SessionEndedEventArgs.cs
- XmlElementAttribute.cs
- DbConnectionStringBuilder.cs
- ButtonChrome.cs
- XmlEncoding.cs
- DataExchangeServiceBinder.cs
- SqlBuilder.cs
- TextBoxAutomationPeer.cs
- MsmqChannelFactoryBase.cs
- SendMessageRecord.cs
- Drawing.cs
- HtmlTableRow.cs
- ADMembershipProvider.cs
- BaseAddressPrefixFilterElementCollection.cs
- CssClassPropertyAttribute.cs
- StringValidatorAttribute.cs
- StringWriter.cs
- CompositeTypefaceMetrics.cs
- DrawingVisualDrawingContext.cs
- _OverlappedAsyncResult.cs
- WindowsImpersonationContext.cs
- ConcurrencyBehavior.cs
- EmbeddedObject.cs
- SqlConnectionManager.cs
- MD5.cs
- AsyncStreamReader.cs
- ParameterRefs.cs
- DynamicRendererThreadManager.cs
- TextTreeNode.cs
- TextElement.cs
- ConstantExpression.cs
- DotExpr.cs
- Literal.cs
- CompareInfo.cs
- CallId.cs
- LineGeometry.cs
- XmlLinkedNode.cs
- IndentedTextWriter.cs
- BooleanExpr.cs
- Vector3DCollectionValueSerializer.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- WizardStepBase.cs
- SoapRpcServiceAttribute.cs
- Vector3DAnimationUsingKeyFrames.cs
- HttpResponseInternalWrapper.cs
- SafeLibraryHandle.cs
- ExtractorMetadata.cs
- ControlBuilderAttribute.cs
- StylusPointDescription.cs
- UInt64Storage.cs
- PartialTrustVisibleAssembly.cs
- TopClause.cs
- GenericIdentity.cs
- InternalConfigRoot.cs
- FileReader.cs
- TextRangeSerialization.cs
- SafeCryptoHandles.cs
- XmlHierarchicalDataSourceView.cs
- NameScope.cs
- TextOutput.cs
- List.cs
- DesignUtil.cs
- DetailsViewDeletedEventArgs.cs
- VirtualDirectoryMapping.cs
- XmlElementAttribute.cs
- JapaneseCalendar.cs
- NTAccount.cs
- ToolTip.cs
- PackageStore.cs
- DocumentsTrace.cs
- UIElement3D.cs
- SmiMetaData.cs
- SatelliteContractVersionAttribute.cs
- HttpProtocolImporter.cs
- LocatorGroup.cs
- IconConverter.cs
- DataGridViewRowConverter.cs
- CodeLinePragma.cs