gRPC C#
gRPC C#
Namespaces
Grpc.Core
Channel Class
Channel Methods
ConnectAsync Method
ShutdownAsync Method
WaitForStateChangedAsync Method

Channel WaitForStateChangedAsync Method

Returned tasks completes once channel state has become different from given lastObservedState. If deadline is reached or and error occurs, returned task is cancelled.

Namespace: Grpc.Core
Assembly: Grpc.Core (in Grpc.Core.dll) Version: 0.7.0.0
Syntax
C#
VB
C++
F#
Copy

    public Task WaitForStateChangedAsync(
    	ChannelState lastObservedState,
    	Nullable<DateTime> deadline = null
    )

    Public Function WaitForStateChangedAsync (
    	lastObservedState As ChannelState,
    	Optional deadline As Nullable(Of DateTime) = Nothing
    ) As Task

    public:
    Task^ WaitForStateChangedAsync(
    	ChannelState lastObservedState,
    	Nullable<DateTime> deadline = nullptr
    )

    member WaitForStateChangedAsync :
            lastObservedState : ChannelState *
            ?deadline : Nullable<DateTime>
    (* Defaults:
            let _deadline = defaultArg deadline null
    *)
    -> Task

#### Parameters

lastObservedState
  Type: Grpc.Core
  ChannelState

  [Missing <param name="lastObservedState"/> documentation for "M:Grpc.Core.Channel.WaitForStateChangedAsync(Grpc.Core.ChannelState,System.Nullable{System.DateTime})"]

deadline (Optional)
  Type: System
  Nullable
  DateTime

  [Missing <param name="deadline"/> documentation for "M:Grpc.Core.Channel.WaitForStateChangedAsync(Grpc.Core.ChannelState,System.Nullable{System.DateTime})"]

#### Return Value

Type: Task
See Also

#### Reference

Channel Class
Grpc.Core Namespace