Returns a value that indicates whether a request is received before a specified interval of time elapses.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
- Type: System.TimeSpan
The TimeSpan that specifies how long the receive of a request operation has to complete before timing out and returning false.
Return ValueType: System.Boolean
true if a request message is received before the specified interval of time elapses; otherwise false.
Use when it is acceptable for the current thread to be blocked while it waits for a request message to arrive in the queue. The thread is blocked up to the specified timeout. If you need the application processing to continue without waiting, use the asynchronous BeginTryReceiveRequest(TimeSpan, AsyncCallback, Object) method.Notes to Implementers:
The operation returns false if the specified timeout is exceeded.
The following code illustrates how to implement this method:
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.