Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / TimeSpanHelper.cs / 1 / TimeSpanHelper.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel { using System; using System.Diagnostics; static class TimeSpanHelper { static public TimeSpan FromMinutes(int minutes, string text) { TimeSpan value = TimeSpan.FromTicks(TimeSpan.TicksPerMinute * minutes); DiagnosticUtility.DebugAssert(value == TimeSpan.Parse(text), ""); return value; } static public TimeSpan FromSeconds(int seconds, string text) { TimeSpan value = TimeSpan.FromTicks(TimeSpan.TicksPerSecond * seconds); DiagnosticUtility.DebugAssert(value == TimeSpan.Parse(text), ""); return value; } static public TimeSpan FromMilliseconds(int ms, string text) { TimeSpan value = TimeSpan.FromTicks(TimeSpan.TicksPerMillisecond * ms); DiagnosticUtility.DebugAssert(value == TimeSpan.Parse(text), ""); return value; } static public TimeSpan FromDays(int days, string text) { TimeSpan value = TimeSpan.FromTicks(TimeSpan.TicksPerDay * days); DiagnosticUtility.DebugAssert(value == TimeSpan.Parse(text), ""); return value; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextEditorSpelling.cs
- DependencyObjectCodeDomSerializer.cs
- XmlTextAttribute.cs
- DynamicPropertyHolder.cs
- TlsnegoTokenAuthenticator.cs
- ForeignConstraint.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- FreezableCollection.cs
- EventsTab.cs
- AssertValidation.cs
- SmiContextFactory.cs
- DBCSCodePageEncoding.cs
- basecomparevalidator.cs
- MessagePartSpecification.cs
- EncryptedPackage.cs
- VectorConverter.cs
- InternalUserCancelledException.cs
- SmtpException.cs
- PerformanceCounterManager.cs
- EdmSchemaAttribute.cs
- BamlTreeNode.cs
- XmlCharCheckingReader.cs
- RepeatBehavior.cs
- ContainerParaClient.cs
- SQLDecimal.cs
- Constants.cs
- ConsumerConnectionPoint.cs
- MissingSatelliteAssemblyException.cs
- MbpInfo.cs
- RuleInfoComparer.cs
- PartialCachingAttribute.cs
- SQLSingleStorage.cs
- TextTreeUndo.cs
- DictionarySectionHandler.cs
- localization.cs
- Registry.cs
- LinkTarget.cs
- DbConnectionHelper.cs
- WindowClosedEventArgs.cs
- BinarySerializer.cs
- DeflateStream.cs
- tibetanshape.cs
- XamlStyleSerializer.cs
- PersonalizationStateQuery.cs
- ResourcePermissionBase.cs
- unitconverter.cs
- AuthenticationException.cs
- Grid.cs
- XsdValidatingReader.cs
- TrustManagerMoreInformation.cs
- Utils.cs
- ManipulationVelocities.cs
- RowsCopiedEventArgs.cs
- ListViewItemSelectionChangedEvent.cs
- XmlCompatibilityReader.cs
- DBNull.cs
- PerfCounterSection.cs
- XmlWriterSettings.cs
- WindowsGraphics2.cs
- ProfilePropertySettingsCollection.cs
- FontWeight.cs
- SpoolingTask.cs
- ProjectionNode.cs
- GlyphTypeface.cs
- PropertyChange.cs
- MetaTable.cs
- DynamicEndpoint.cs
- Size3DConverter.cs
- CompositeFontParser.cs
- TdsParserStateObject.cs
- DesignBinding.cs
- InkCanvasAutomationPeer.cs
- LocalizeDesigner.cs
- AttributeCollection.cs
- DataKey.cs
- ThreadExceptionEvent.cs
- BitVec.cs
- ToolStripDropDownButton.cs
- RuntimeComponentFilter.cs
- Attachment.cs
- Flattener.cs
- ImageListImageEditor.cs
- UnaryQueryOperator.cs
- RequiredFieldValidator.cs
- WebBrowserBase.cs
- TableCellCollection.cs
- ListViewItem.cs
- Soap11ServerProtocol.cs
- StrokeCollection.cs
- ProxyGenerationError.cs
- OptimizerPatterns.cs
- ButtonBaseAutomationPeer.cs
- XPathSelectionIterator.cs
- BlockCollection.cs
- IdnMapping.cs
- CredentialCache.cs
- LocalizableResourceBuilder.cs
- UnionCodeGroup.cs
- RawStylusInput.cs
- FormViewCommandEventArgs.cs