次の方法で共有


MessagingCenter.IMessagingCenter.Subscribe Method

Definition

Overloads

IMessagingCenter.Subscribe<TSender,TArgs>(Object, String, Action<TSender,TArgs>, TSender)
IMessagingCenter.Subscribe<TSender>(Object, String, Action<TSender>, TSender)

IMessagingCenter.Subscribe<TSender,TArgs>(Object, String, Action<TSender,TArgs>, TSender)

Source:
MessagingCenter.cs
Source:
MessagingCenter.cs
generic <typename TSender, typename TArgs>
 where TSender : class virtual void Microsoft.Maui.Controls.IMessagingCenter.Subscribe(System::Object ^ subscriber, System::String ^ message, Action<TSender, TArgs> ^ callback, TSender source) = Microsoft::Maui::Controls::IMessagingCenter::Subscribe;
void IMessagingCenter.Subscribe<TSender,TArgs> (object subscriber, string message, Action<TSender,TArgs> callback, TSender source) where TSender : class;
abstract member Microsoft.Maui.Controls.IMessagingCenter.Subscribe : obj * string * Action<'Sender, 'Args (requires 'Sender : null)> * 'Sender -> unit (requires 'Sender : null)
override this.Microsoft.Maui.Controls.IMessagingCenter.Subscribe : obj * string * Action<'Sender, 'Args (requires 'Sender : null)> * 'Sender -> unit (requires 'Sender : null)
Sub Subscribe(Of TSender As Class, TArgs As Class) (subscriber As Object, message As String, callback As Action(Of TSender, TArgs), source As TSender) Implements IMessagingCenter.Subscribe

Type Parameters

TSender
TArgs

Parameters

subscriber
Object
message
String
callback
Action<TSender,TArgs>
source
TSender

Implements

Applies to

IMessagingCenter.Subscribe<TSender>(Object, String, Action<TSender>, TSender)

Source:
MessagingCenter.cs
Source:
MessagingCenter.cs
generic <typename TSender>
 where TSender : class virtual void Microsoft.Maui.Controls.IMessagingCenter.Subscribe(System::Object ^ subscriber, System::String ^ message, Action<TSender> ^ callback, TSender source) = Microsoft::Maui::Controls::IMessagingCenter::Subscribe;
void IMessagingCenter.Subscribe<TSender> (object subscriber, string message, Action<TSender> callback, TSender source) where TSender : class;
abstract member Microsoft.Maui.Controls.IMessagingCenter.Subscribe : obj * string * Action<'Sender (requires 'Sender : null)> * 'Sender -> unit (requires 'Sender : null)
override this.Microsoft.Maui.Controls.IMessagingCenter.Subscribe : obj * string * Action<'Sender (requires 'Sender : null)> * 'Sender -> unit (requires 'Sender : null)
Sub Subscribe(Of TSender As Class) (subscriber As Object, message As String, callback As Action(Of TSender), source As TSender) Implements IMessagingCenter.Subscribe

Type Parameters

TSender

Parameters

subscriber
Object
message
String
callback
Action<TSender>
source
TSender

Implements

Applies to