Show / Hide Table of Contents

Class LocalMessageSender

Represents the sending end of a local messaging channel between two Silverlight-based applications.

Inheritance
System.Object
LocalMessageSender
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Messaging
Assembly: OpenSilver.dll
Syntax
[NotImplemented]
public sealed class LocalMessageSender

Constructors

| Improve this Doc View Source

LocalMessageSender(String)

Initializes a new instance of the LocalMessageSender class and configures it to send messages to the receiver with the specified name.

Declaration
[NotImplemented]
public LocalMessageSender(string receiverName)
Parameters
Type Name Description
System.String receiverName

The ReceiverName property value of the LocalMessageReceiver that this sender will send messages to.

Exceptions
Type Condition
System.ArgumentNullException

receiverName is null.

System.ArgumentException

receiverName is longer than 256 characters.

| Improve this Doc View Source

LocalMessageSender(String, String)

Initializes a new instance of the LocalMessageSender class and configures it to send messages to the receiver with the specified name and domain.

Declaration
[NotImplemented]
public LocalMessageSender(string receiverName, string receiverDomain)
Parameters
Type Name Description
System.String receiverName

The ReceiverName property value of the LocalMessageReceiver that this sender will send messages to.

System.String receiverDomain

The domain of the LocalMessageReceiver that this sender will send messages to, or Global if the receiver is not scoped to a domain.

Exceptions
Type Condition
System.ArgumentNullException

receiverName is null.-or-receiverDomain is null.

System.ArgumentException

receiverName is longer than 256 characters.-or-receiverDomain is longer than 256 characters.-or-receiverDomain contains one or more invalid characters ("," and ":").

Fields

| Improve this Doc View Source

Global

A value that represents the global domain.

Declaration
public const string Global = "*"
Field Value
Type Description
System.String

Properties

| Improve this Doc View Source

ReceiverDomain

Gets the domain of the LocalMessageReceiver that this sender will send messages to.

Declaration
[NotImplemented]
public string ReceiverDomain { get; }
Property Value
Type Description
System.String

The domain of the LocalMessageReceiver that this sender will send messages to, depending on the receiver's NameScope property value.

| Improve this Doc View Source

ReceiverName

Gets the name of the LocalMessageReceiver that this sender will send messages to.

Declaration
[NotImplemented]
public string ReceiverName { get; }
Property Value
Type Description
System.String

The name of the LocalMessageReceiver that this sender will send messages to.

Methods

| Improve this Doc View Source

SendAsync(String)

Sends the specified message to the configured receiver asynchronously.

Declaration
[NotImplemented]
public void SendAsync(string message)
Parameters
Type Name Description
System.String message

The message to send.

Exceptions
Type Condition
System.ArgumentNullException

message is null.

System.ArgumentException

message is longer than 40,960 characters.

| Improve this Doc View Source

SendAsync(String, Object)

Sends the specified messages to the configured receiver asynchronously.

Declaration
[NotImplemented]
public void SendAsync(string message, object userState)
Parameters
Type Name Description
System.String message

The message to send.

System.Object userState

A unique user-state object that functions as a task ID for the message transfer.

Exceptions
Type Condition
System.ArgumentNullException

message is null.

System.ArgumentException

message is longer than 40,960 characters.

Events

| Improve this Doc View Source

SendCompleted

Occurs when the message has been successfully sent.

Declaration
[NotImplemented]
public event EventHandler<SendCompletedEventArgs> SendCompleted
Event Type
Type Description
System.EventHandler<SendCompletedEventArgs>
  • Improve this Doc
  • View Source