C# Class Corlib.NullableTimeSpanExtensions

Nullable{TimeSpan} extension methods
显示文件 Open project: GeorgeTsiokos/corlib

Public Methods

Method Description
AsThreadingTimeout ( this timeout ) : int

Converts a nullable timespan to System.Threading.Timeout.Infinite when null or the total amount of milliseconds when it has a value. If it exceeds Int32.MaxValue it uses Int32.MaxValue

Method Details

AsThreadingTimeout() public static method

Converts a nullable timespan to System.Threading.Timeout.Infinite when null or the total amount of milliseconds when it has a value. If it exceeds Int32.MaxValue it uses Int32.MaxValue
public static AsThreadingTimeout ( this timeout ) : int
timeout this the value to convert
return int