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
- XmlDeclaration.cs
- TextBlock.cs
- DataBindingValueUIHandler.cs
- SimpleLine.cs
- Debug.cs
- DropDownButton.cs
- DataList.cs
- ResXFileRef.cs
- DateTimeFormat.cs
- SaveFileDialogDesigner.cs
- ColumnWidthChangingEvent.cs
- RenamedEventArgs.cs
- Blend.cs
- Msec.cs
- RadioButton.cs
- GacUtil.cs
- DataGridViewComboBoxColumn.cs
- Helpers.cs
- SectionInput.cs
- DockingAttribute.cs
- IPGlobalProperties.cs
- GifBitmapEncoder.cs
- CodeDelegateInvokeExpression.cs
- HebrewNumber.cs
- WebFormsRootDesigner.cs
- StoreItemCollection.cs
- SqlUserDefinedTypeAttribute.cs
- ViewCellSlot.cs
- AttributeUsageAttribute.cs
- AdapterUtil.cs
- ContentTextAutomationPeer.cs
- HitTestParameters.cs
- DSACryptoServiceProvider.cs
- RequestBringIntoViewEventArgs.cs
- ToolStripEditorManager.cs
- FilterableAttribute.cs
- BitmapEffectrendercontext.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- Solver.cs
- XpsInterleavingPolicy.cs
- EventToken.cs
- UnknownWrapper.cs
- TableCell.cs
- UInt32Storage.cs
- ListViewTableCell.cs
- MulticastOption.cs
- PrintEvent.cs
- DataBinding.cs
- RoutedEvent.cs
- SqlDataReaderSmi.cs
- ExternalCalls.cs
- SymbolTable.cs
- CheckedListBox.cs
- ApplicationFileParser.cs
- FunctionImportMapping.cs
- Compress.cs
- Pen.cs
- PngBitmapEncoder.cs
- PowerStatus.cs
- VirtualizingPanel.cs
- SimpleExpression.cs
- RangeBaseAutomationPeer.cs
- BindingCollection.cs
- XmlNamedNodeMap.cs
- diagnosticsswitches.cs
- TokenBasedSet.cs
- Geometry.cs
- ExpandCollapsePattern.cs
- LinkedResource.cs
- HttpWebRequestElement.cs
- ManipulationDevice.cs
- COM2Enum.cs
- Literal.cs
- WebPartVerbsEventArgs.cs
- DataServiceCollectionOfT.cs
- WasAdminWrapper.cs
- SqlDeflator.cs
- VScrollProperties.cs
- DateTimeValueSerializerContext.cs
- WebPartExportVerb.cs
- RegistrationServices.cs
- RewritingPass.cs
- CompiledAction.cs
- Certificate.cs
- HandlerFactoryWrapper.cs
- Brush.cs
- RijndaelManagedTransform.cs
- WhitespaceRule.cs
- ResourceSet.cs
- ListViewTableRow.cs
- GC.cs
- ConfigXmlText.cs
- Condition.cs
- XmlSchemaException.cs
- XmlSchemaAttributeGroupRef.cs
- ApplicationBuildProvider.cs
- Transform.cs
- SafeLocalMemHandle.cs
- TextModifier.cs
- PropertyValueChangedEvent.cs