共用方式為


IMessagingCenter.Unsubscribe Method

Definition

Overloads

Unsubscribe<TSender,TArgs>(Object, String)

Unsubscribes from the specified parameterless subscriber messages.

Unsubscribe<TSender>(Object, String)

Unsubscribes a subscriber from the specified messages that come from the specified sender.

Unsubscribe<TSender,TArgs>(Object, String)

Unsubscribes from the specified parameterless subscriber messages.

public void Unsubscribe<TSender,TArgs> (object subscriber, string message) where TSender : class;
abstract member Unsubscribe : obj * string -> unit (requires 'Sender : null)

Type Parameters

TSender

The type of object that sends the message.

TArgs

The type of the objects that are used as message arguments for the message.

Parameters

subscriber
System.Object

The object that is subscribing to the messages. Typically, this is specified with the this keyword used within the subscribing object.

message
System.String

The message that will be sent to objects that are listening for the message from instances of type TSender.

Applies to

Unsubscribe<TSender>(Object, String)

Unsubscribes a subscriber from the specified messages that come from the specified sender.

public void Unsubscribe<TSender> (object subscriber, string message) where TSender : class;
abstract member Unsubscribe : obj * string -> unit (requires 'Sender : null)

Type Parameters

TSender

The type of object that sends the message.

Parameters

subscriber
System.Object

The object that is subscribing to the messages. Typically, this is specified with the this keyword used within the subscribing object.

message
System.String

The message that will be sent to objects that are listening for the message from instances of type TSender.

Applies to