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
- WindowsListViewSubItem.cs
- GenericIdentity.cs
- ConnectivityStatus.cs
- ExtensionWindowHeader.cs
- TextLineBreak.cs
- formatstringdialog.cs
- PageHandlerFactory.cs
- LayoutEngine.cs
- CustomError.cs
- DebugTraceHelper.cs
- PropertyChangingEventArgs.cs
- DataRowCollection.cs
- StateWorkerRequest.cs
- IPAddressCollection.cs
- HttpCacheVaryByContentEncodings.cs
- ScriptingScriptResourceHandlerSection.cs
- Grid.cs
- PrimitiveXmlSerializers.cs
- Invariant.cs
- ListBoxDesigner.cs
- ClientSettingsStore.cs
- DBConnectionString.cs
- EventPropertyMap.cs
- LoginView.cs
- IList.cs
- ConfigXmlComment.cs
- uribuilder.cs
- TabletCollection.cs
- WpfKnownMember.cs
- DecimalSumAggregationOperator.cs
- ChoiceConverter.cs
- LocatorPart.cs
- XmlSerializerFactory.cs
- SQLDateTimeStorage.cs
- CallTemplateAction.cs
- ScriptingAuthenticationServiceSection.cs
- MyContact.cs
- invalidudtexception.cs
- IgnoreSectionHandler.cs
- SoapCodeExporter.cs
- ProbeDuplexCD1AsyncResult.cs
- BinHexDecoder.cs
- JavascriptXmlWriterWrapper.cs
- DataKeyCollection.cs
- PropVariant.cs
- OrderPreservingSpoolingTask.cs
- XmlEntity.cs
- HtmlTernaryTree.cs
- Component.cs
- ColumnWidthChangingEvent.cs
- GPPOINT.cs
- BrowserCapabilitiesFactoryBase.cs
- ArgumentNullException.cs
- GenericEnumerator.cs
- Events.cs
- MimeFormatter.cs
- ScrollItemPatternIdentifiers.cs
- SelectionItemPattern.cs
- XmlExtensionFunction.cs
- SqlNotificationRequest.cs
- XamlSerializerUtil.cs
- CodeGotoStatement.cs
- NotifyInputEventArgs.cs
- SpinLock.cs
- StaticExtensionConverter.cs
- StructuredType.cs
- GeneralTransform3DCollection.cs
- OleDbSchemaGuid.cs
- ExtensionQuery.cs
- EventListenerClientSide.cs
- AtomPub10ServiceDocumentFormatter.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- ScriptRegistrationManager.cs
- TaskSchedulerException.cs
- CodeConstructor.cs
- RawKeyboardInputReport.cs
- RelationshipFixer.cs
- AnimationClock.cs
- MailAddressCollection.cs
- MenuStrip.cs
- StsCommunicationException.cs
- DropDownList.cs
- SubpageParagraph.cs
- BitmapData.cs
- WebEvents.cs
- DbSourceCommand.cs
- GridItem.cs
- DataTableReader.cs
- BamlStream.cs
- ControlBuilder.cs
- SqlRowUpdatedEvent.cs
- SqlBulkCopy.cs
- UpDownEvent.cs
- ConstNode.cs
- ResourceWriter.cs
- EntityDataSourceSelectedEventArgs.cs
- HierarchicalDataSourceDesigner.cs
- DataViewManagerListItemTypeDescriptor.cs
- ImageAttributes.cs
- EncodingNLS.cs