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
- CommandLibraryHelper.cs
- RtfToXamlLexer.cs
- IProvider.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- AttributedMetaModel.cs
- ToolStripTextBox.cs
- DetailsViewRow.cs
- LicenseManager.cs
- TextViewSelectionProcessor.cs
- DrawingImage.cs
- ColumnProvider.cs
- MinMaxParagraphWidth.cs
- DataSetMappper.cs
- EventSinkHelperWriter.cs
- Variant.cs
- SessionStateSection.cs
- Font.cs
- RuleProcessor.cs
- ImageCodecInfoPrivate.cs
- PointLight.cs
- RewritingPass.cs
- GZipStream.cs
- TextServicesProperty.cs
- TextRangeEditLists.cs
- SwitchLevelAttribute.cs
- MasterPage.cs
- UnsafeNativeMethods.cs
- SafeNativeMethods.cs
- Base64Decoder.cs
- AdRotatorDesigner.cs
- WebPartEventArgs.cs
- CaseCqlBlock.cs
- XsltCompileContext.cs
- IPEndPoint.cs
- CachedTypeface.cs
- EditingCoordinator.cs
- AnnotationHelper.cs
- ForeignConstraint.cs
- SafeProcessHandle.cs
- ListenerConstants.cs
- UriWriter.cs
- MDIControlStrip.cs
- FactoryGenerator.cs
- ExtensionDataReader.cs
- TableCell.cs
- Int64Converter.cs
- TextHidden.cs
- TextBox.cs
- DataProtection.cs
- SystemWebExtensionsSectionGroup.cs
- DecoderFallback.cs
- SmtpFailedRecipientsException.cs
- QilReplaceVisitor.cs
- FocusChangedEventArgs.cs
- EntityCollection.cs
- ConfigurationStrings.cs
- ZoneLinkButton.cs
- ApplicationDirectory.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- Span.cs
- Formatter.cs
- TextEditorTables.cs
- RijndaelManaged.cs
- CustomLineCap.cs
- _ProxyRegBlob.cs
- EventDriven.cs
- OptimizedTemplateContentHelper.cs
- NodeLabelEditEvent.cs
- ContextMarshalException.cs
- StorageMappingItemLoader.cs
- CompressedStack.cs
- MenuScrollingVisibilityConverter.cs
- EventMappingSettingsCollection.cs
- AssemblyHash.cs
- MessageProtectionOrder.cs
- FixedTextPointer.cs
- COM2PropertyBuilderUITypeEditor.cs
- TextBoxLine.cs
- ClassValidator.cs
- CreateUserWizard.cs
- BasePattern.cs
- _NegoState.cs
- TreeIterator.cs
- ActivityXamlServices.cs
- MsmqElementBase.cs
- StateBag.cs
- PngBitmapEncoder.cs
- HttpInputStream.cs
- HierarchicalDataBoundControl.cs
- EnumBuilder.cs
- FloaterParaClient.cs
- ViewCellRelation.cs
- ProfileService.cs
- DomNameTable.cs
- ExceptionWrapper.cs
- DynamicPropertyHolder.cs
- SiteMapNodeItemEventArgs.cs
- BasePropertyDescriptor.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- OdbcParameter.cs