共用方式為


ObserverManager<TIdentity,TObserver>.Notify 方法

定義

多載

Notify(Action<TObserver>, Func<TObserver,Boolean>)

通知符合提供 predicate 的所有觀察者。

Notify(Func<TObserver,Task>, Func<TObserver,Boolean>)

通知所有觀察者。

Notify(Action<TObserver>, Func<TObserver,Boolean>)

通知符合提供 predicate 的所有觀察者。

public void Notify (Action<TObserver> notification, Func<TObserver,bool> predicate = default);
member this.Notify : Action<'Observer> * Func<'Observer, bool> -> unit
Public Sub Notify (notification As Action(Of TObserver), Optional predicate As Func(Of TObserver, Boolean) = Nothing)

參數

notification
Action<TObserver>

要在每個觀察者上呼叫的通知委派。

predicate
Func<TObserver,Boolean>

用來選取觀察者來通知的述詞。

適用於

Notify(Func<TObserver,Task>, Func<TObserver,Boolean>)

通知所有觀察者。

public System.Threading.Tasks.Task Notify (Func<TObserver,System.Threading.Tasks.Task> notification, Func<TObserver,bool> predicate = default);
member this.Notify : Func<'Observer, System.Threading.Tasks.Task> * Func<'Observer, bool> -> System.Threading.Tasks.Task
Public Function Notify (notification As Func(Of TObserver, Task), Optional predicate As Func(Of TObserver, Boolean) = Nothing) As Task

參數

notification
Func<TObserver,Task>

要在每個觀察者上呼叫的通知委派。

predicate
Func<TObserver,Boolean>

用來選取觀察者來通知的述詞。

傳回

Task 表示執行的工作。

適用於