Message Class

 

Core message class. In general, this class should not be sub-classed directly. AsynchronousMessage should be used for one-way (no reply) messages (such as DDR or status) and SynchronousMessageRequest with SynchronousMessageReply should be used for two-way, synchronous, messages (such as policy or location).

Namespace:   Microsoft.ConfigurationManagement.Messaging.Framework
Assembly:  Microsoft.ConfigurationManagement.Messaging (in Microsoft.ConfigurationManagement.Messaging.dll)


[SerializableAttribute]
[MessageSupportAttribute(MessageSupportStatus::Unknown)]
public ref class Message abstract : IMessage, IMessageBase, IDeserializationCallback

NameDescription
System_CAPS_pubpropertyAttachments

Gets message attachments.

System_CAPS_pubpropertyBody

Gets the message body. This property should not be empty, with limited exceptions.

System_CAPS_pubpropertyMessageId

Gets the internal ID of a message.

System_CAPS_protpropertyPostSendActionsSupported

Gets a value that indicates whether the message supports post-send actions.

System_CAPS_pubpropertyPriority

Gets the priority for a message. This property is only used for reference by senders and has no effect on the message.

System_CAPS_pubpropertySenderCallback

Gets a sender callback for a message. This property is null unless a message is in the process of being sent.

System_CAPS_pubpropertySenderType

Gets the sender type for a message. This property is only used for reference by senders and has no effect on the message.

System_CAPS_pubpropertySettings

Gets message settings.

System_CAPS_pubpropertySiteCode

Gets or sets the site code to use for sending a message. Some messages require this property.

System_CAPS_pubpropertySmsId

Gets or sets the SMSID to use for signing and sending a message.

System_CAPS_protpropertySupportsInlineSerializers

Gets a value that indicates whether Serialize() is called on send and DeserializeMessageBody is called on receive.

The default setting for this property is true. Override to false with caution.

NameDescription
System_CAPS_pubmethodAddCertificateToMessage(MessageCertificateX509^, CertificatePurposes)

Adds a certificate to the message.

System_CAPS_pubmethodAddCertificateToMessage(MessageCertificateX509^, CertificatePurposes, Boolean)

Adds a certificate to a message with the option to disable any intelligence.

System_CAPS_pubmethodCloneBase()

Creates a clone of a message.

Important: This method is not the same as nor does it behave the same as Clone. That is why this message type does not implement ICloneable. It is not recommended that any code outside of Messaging core code use this function without understanding how it works, what its limitations are, and why it's being used.

Note: If you're considering this method, ensure that you have evaluated CloneByRef which you might want to use instead.

System_CAPS_pubmethodCloneByRef(IMessage^)

Clones a reference of a message. Use this method to create a copy of an existing message, especially one of a different type, into this message.

Important: This method is not the same as nor does it behave the same as Clone. That is why this message type does not implement ICloneable. It is not recommended that any code outside of Messaging core code use this function without understanding how it works, what its limitations are, and why it's being used.

System_CAPS_pubmethodCloneByRef(IMessage^, MessageCloneOptions)

Clones a reference of a message. Use this method to create a copy of an existing message, especially one of a different type, into this message.

Important: This method is not the same as nor does it behave the same as Clone. That is why this message type does not implement ICloneable. It is not recommended that any code outside of Messaging core code use this function without understanding how it works, what its limitations are, and why it's being used.

System_CAPS_protmethodCriticalSection(Action^)

Invokes a statement within a thread-safe critical section.

System_CAPS_protmethodCriticalSection<T>(Func<T>^)

Invokes a statement within a thread-safe critical section.

System_CAPS_pubmethodDeserializeMessageBody()

Internal handler for deserializing a payload into its object format. This method should only be called by external code under exceptional circumstances.

System_CAPS_pubmethodDiscover()

Performs discovery, if supported by the message.

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetCertificateFromMessage(CertificatePurposes)

Retrieves the X509-based certificate from a message.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodOnDeserialization(Object^)

Ensures validity checks are never performed on deserialization.

System_CAPS_pubmethodPostSendActions(IMessageSender^, Boolean)

Actions that run after a message is sent. This is an asynchronous action; use with caution.

System_CAPS_pubmethodPreSendActions()

Actions that run before the message is sent. This operation is synchronous and blocking.

System_CAPS_protmethodSendInlineStatusMessage(SmsEvent^, IMessageSender^)

Sends a status message. This is a synchronous operation and should be called from a separate thread to avoid blocking.

System_CAPS_protmethodSendInlineStatusMessage(StatusMessage^, IMessageSender^)

Sends a status message. This is a synchronous operation and should be called from a separate thread to avoid blocking.

System_CAPS_protmethodSendMessageAsync(IMessageSender^)

Sends a message by using the specified sender.

System_CAPS_protmethodSendMessageSync<T>(IMessageSender^)

Sends a message by using the specified sender.

System_CAPS_pubmethodSerializeMessageBody()

Internal handler for serializing the message payload to its wire-level format. This method should only be called by external code under exceptional circumstances.

System_CAPS_protmethodSimpleBodyDeserialization<T>()

Helper function that deserializes an object from the existing payload.

System_CAPS_protmethodSimpleBodyDeserialization<T>(DeserializationArguments)

Helper function that deserializes an object from the existing payload.

System_CAPS_protmethodSimpleObjectSerialization(Object^)

Helper function that serializes an object to a payload.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodValidate()

Obsolete. Validates that all required message settings are present and meet the requirements. If this method fails, the message will likely fail in being sent or processed by the site or management point.

System_CAPS_pubmethodValidate(IMessageSender^)

Validates that all required message settings are present and meet the requirements. If this validation fails, the message is almost certain to fail in being sent or processed by the site or management point.

NameDescription
System_CAPS_protfieldSynchronizer

Synchronizer to use for locking in thread-safe operations.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIMessage::SendMessage(IMessageSender^)

Sends a message by using the specified sender.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIMessageBase::Settings

Gets message properties and settings.

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: