Mono For Android アプリケーションで [TinyMessenger][1] を正常に使用しており、コンテンツを送信できるように GenericTinyMessage からクラス化されたメッセージを取得しています。
GenericTinyMessage は、wiki で説明されているように、Sender をコンストラクターに渡す必要があります。
// And if your message needs some "content" we provide a simple
// generic message (GenericTinyMessage<TContent>) out of the box.
//
// We can use that message directly or derive from it to gain a
// strongly typed "content" property
public class MyMessageAgain : GenericTinyMessage<String>
{
/// <summary>
/// Create a new instance of the MyMessageAgain class.
/// </summary>
/// <param name="sender">Message sender (usually "this")</param>
/// <param name="content">Contents of the message</param>
public MyMessageAgain(object sender, String content)
: base(sender, content)
{
// We now have a public string property called Content
}
}
ただし、静的クラスからこれを使用しているため、送信者に使用する必要はありません。nullを使用できますか、それとも送信オブジェクトを提供する必要がありますか?
ありがとう、
ジェームズ