Table of Contents

Struct RequestTimeout

Namespace
MassTransit
Assembly
MassTransit.Abstractions.dll

A timeout, which can be a default (none) or a valid TimeSpan > 0, includes factory methods to make it "cute"

public struct RequestTimeout
Inherited Members

Properties

Default

public static RequestTimeout Default { get; }

Property Value

RequestTimeout

HasValue

public bool HasValue { get; }

Property Value

bool

None

public static RequestTimeout None { get; }

Property Value

RequestTimeout

Value

public TimeSpan Value { get; }

Property Value

TimeSpan

Exceptions

InvalidOperationException

Methods

After(int?, int?, int?, int?, int?)

Create a timeout using optional arguments to build it up

public static RequestTimeout After(int? d = null, int? h = null, int? m = null, int? s = null, int? ms = null)

Parameters

d int?

days

h int?

hours

m int?

minutes

s int?

seconds

ms int?

milliseconds

Returns

RequestTimeout

The timeout value

Exceptions

ArgumentException

Or(RequestTimeout)

If this timeout has a value, return it, otherwise, return the other timeout

public RequestTimeout Or(RequestTimeout other)

Parameters

other RequestTimeout

Returns

RequestTimeout

Operators

implicit operator RequestTimeout(int)

public static implicit operator RequestTimeout(int milliseconds)

Parameters

milliseconds int

Returns

RequestTimeout

implicit operator RequestTimeout(TimeSpan)

public static implicit operator RequestTimeout(TimeSpan timeout)

Parameters

timeout TimeSpan

Returns

RequestTimeout