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
- PeerApplicationLaunchInfo.cs
- ExpressionValueEditor.cs
- IntellisenseTextBox.designer.cs
- GAC.cs
- HttpModuleCollection.cs
- EventPropertyMap.cs
- RegexTree.cs
- OleDbRowUpdatingEvent.cs
- CalendarDay.cs
- PerformanceCounterPermissionEntry.cs
- OdbcConnectionPoolProviderInfo.cs
- ColorInterpolationModeValidation.cs
- PermissionRequestEvidence.cs
- DoubleLinkListEnumerator.cs
- FacetDescription.cs
- DbExpressionVisitor_TResultType.cs
- HitTestWithPointDrawingContextWalker.cs
- WindowHideOrCloseTracker.cs
- StateItem.cs
- CrossAppDomainChannel.cs
- NativeMethods.cs
- CaseInsensitiveComparer.cs
- Form.cs
- RuleProcessor.cs
- Merger.cs
- IPPacketInformation.cs
- DataBinder.cs
- DataFieldEditor.cs
- CustomError.cs
- QilCloneVisitor.cs
- ServiceNotStartedException.cs
- UriTemplateCompoundPathSegment.cs
- HwndStylusInputProvider.cs
- PublisherMembershipCondition.cs
- WhitespaceSignificantCollectionAttribute.cs
- OracleString.cs
- XmlChoiceIdentifierAttribute.cs
- LinearGradientBrush.cs
- DelimitedListTraceListener.cs
- BorderGapMaskConverter.cs
- ArrangedElement.cs
- SpeechSynthesizer.cs
- ExclusiveNamedPipeTransportManager.cs
- CellPartitioner.cs
- SrgsGrammar.cs
- OverrideMode.cs
- DefaultMemberAttribute.cs
- IdentityReference.cs
- DataGridViewCellValueEventArgs.cs
- Brushes.cs
- RawUIStateInputReport.cs
- WindowsNonControl.cs
- SmtpNtlmAuthenticationModule.cs
- FontWeightConverter.cs
- StringSorter.cs
- EntityDataSourceViewSchema.cs
- FormViewPagerRow.cs
- XmlWriter.cs
- WebPartHelpVerb.cs
- HtmlShim.cs
- DbSource.cs
- SoapCodeExporter.cs
- WindowsGraphicsWrapper.cs
- SoundPlayer.cs
- SmtpNegotiateAuthenticationModule.cs
- DbConnectionStringCommon.cs
- InstanceLockTracking.cs
- TreeViewItemAutomationPeer.cs
- TimestampInformation.cs
- ValidationRule.cs
- DateTimeConverter2.cs
- CqlQuery.cs
- HuffmanTree.cs
- LicenseManager.cs
- SamlAttributeStatement.cs
- ConfigurationStrings.cs
- BuilderPropertyEntry.cs
- EntityContainerRelationshipSetEnd.cs
- DataGridViewRowEventArgs.cs
- Window.cs
- SolidColorBrush.cs
- RotationValidation.cs
- Matrix3DConverter.cs
- XhtmlBasicSelectionListAdapter.cs
- InheritanceUI.cs
- WebConfigurationHost.cs
- LogConverter.cs
- CompressedStack.cs
- BindingManagerDataErrorEventArgs.cs
- EnumMemberAttribute.cs
- ConfigXmlCDataSection.cs
- StatusBarPanel.cs
- GrammarBuilder.cs
- EditorPart.cs
- ApplyImportsAction.cs
- Vector3dCollection.cs
- ActivationService.cs
- OleDbStruct.cs
- DSASignatureDeformatter.cs
- ButtonBase.cs