Click or drag to resize
Message Class
Message objects are used to represent all outputs from the API.
Inheritance Hierarchy
SystemObject
  Bloomberglp.BlpapiMessage

Namespace:  Bloomberglp.Blpapi
Assembly:  Bloomberglp.Blpapi (in Bloomberglp.Blpapi.dll) Version: 3.24.11.1
Syntax
public abstract class Message

The Message type exposes the following members.

Constructors
  NameDescription
Protected methodMessage
Initializes a new instance of the Message class
Top
Properties
  NameDescription
Public propertyAsElement
Gets the contents of this Message as a read-only Element.
Public propertyCorrelationID
Gets the correlationId associated with this message.
Public propertyCorrelationIDs
Gets an enumerable collection of all collectionIds associated with this message.
Public propertyElements
Gets the enumerable collection of elements.
Public propertyFragmentType
Gets the fragment type of this message.
Public propertyIsValid
Return true if the message is valid.
Public propertyItemString
This is the same as calling GetElement(name).
Public propertyItemString, Int32
This is the same as calling GetElement(name). GetValue(index).
Public propertyMessageType
Gets the Name constant representing the type of the message.
Public propertyNumCorrelationIDs
Gets the number of correlation ids associated with this message.
Public propertyNumElements
Gets the number of elements contained by this message.
Public propertyRecapType
Gets the recap type of this message.
Public propertyRequestId
Gets the request id of the message if one exists, otherwise, null.

When present, the request id can be reported to Bloomberg to troubleshoot the cause of failure messages, or issues with the data contained in the message.

Note that request id is not the same as correlation id and should not be used for correlation purposes.

Public propertyService
Gets the Service associated with this message. Returns null if this method is not associated with a service.
Public propertyTimeReceived
Gets the timestamp in System.DateTime in UTC, when the message was received by the library. The value is
DateTime(0)
if the timestamp is not present.
Public propertyTopicName Obsolete.
Gets the topic string associated with this message. Returns an empty string if there is no topic associated with this message.
Top
Methods
  NameDescription
Public methodGetCorrelationID
Returns the correlationId associated with this message at the specified position.
Public methodGetElement(String) Obsolete.
Returns the element of this message having the specified name. Deprecated, use GetElement(Name) instead.
Public methodGetElement(Name)
Returns the element of this message having the specified name.
Public methodGetElementAsBool(String) Obsolete.
Returns the value of the element having the specified name as a boolean value. Deprecated, use GetElementAsBool(Name) instead.
Public methodGetElementAsBool(Name)
Returns the value of the element having the specified name as a boolean value.
Public methodGetElementAsBytes(String) Obsolete.
Returns the value of the element having the specified name as a byte array. Deprecated, use GetElementAsBytes(Name) instead.
Public methodGetElementAsBytes(Name)
Returns the value of the element having the specified name as a byte array.
Public methodGetElementAsChar(String) Obsolete.
Returns the value of the element having the specified name as a char value. Deprecated, use GetElementAsChar(Name) instead.
Public methodGetElementAsChar(Name)
Returns the value of the element having the specified name as a char value.
Public methodGetElementAsDate(String) Obsolete.
Returns the value of the element having the specified name as a Date value. Deprecated, use GetElementAsDate(Name) instead.
Public methodGetElementAsDate(Name)
Returns the value of the element having the specified name as a Date value.
Public methodGetElementAsDatetime(String) Obsolete.
Returns the value of the element having the specified name as a Datetime value. Deprecated, use GetElementAsDatetime(Name) instead.
Public methodGetElementAsDatetime(Name)
Returns the value of the element having the specified name as a Datetime value.
Public methodGetElementAsFloat32(String) Obsolete.
Returns the value of the element having the specified name as a float value. Deprecated, use GetElementAsFloat32(Name) instead.
Public methodGetElementAsFloat32(Name)
Returns the value of the element having the specified name as a float value.
Public methodGetElementAsFloat64(String) Obsolete.
Returns the value of the element having the specified name as a double value. Deprecated, use GetElementAsFloat64(Name) instead.
Public methodGetElementAsFloat64(Name)
Returns the value of the element having the specified name as a double value.
Public methodGetElementAsInt32(String) Obsolete.
Returns the value of the element having the specified name as an int value. Deprecated, use GetElementAsInt32(Name) instead.
Public methodGetElementAsInt32(Name)
Returns the value of the element having the specified name as an int value.
Public methodGetElementAsInt64(String) Obsolete.
Returns the value of the element having the specified name as a long value. Deprecated, use GetElementAsInt64(Name) instead.
Public methodGetElementAsInt64(Name)
Returns the value of the element having the specified name as a long value.
Public methodGetElementAsName(String) Obsolete.
Returns the value of the element having the specified name as a Constant value. Deprecated, use GetElementAsName(Name) instead.
Public methodGetElementAsName(Name)
Returns the value of the element having the specified name as a Constant value.
Public methodGetElementAsString(String) Obsolete.
Returns the value of the element having the specified name as a string value. Deprecated, use GetElementAsString(Name) instead.
Public methodGetElementAsString(Name)
Returns the value of the element having the specified name as a string value.
Public methodGetElementAsTime(String) Obsolete.
Returns the value of the element having the specified name as a Time value. Deprecated, use GetElementAsTime(Name) instead.
Public methodGetElementAsTime(Name)
Returns the value of the element having the specified name as a Time value.
Public methodHasElement(String) Obsolete.
Returns true if this message has the element having the specified name false otherwise. Deprecated, use HasElement(Name) instead.
Public methodHasElement(Name)
Returns true if this message has the element having the specified name false otherwise.
Public methodHasElement(String, Boolean) Obsolete.
Returns true if this message has the element having the specified name false otherwise. Deprecated, use HasElement(Name, Boolean) instead.
Public methodHasElement(Name, Boolean)
Returns true if this message has the element having the specified name false otherwise.
Public methodPrint(Stream)
Print the message into the stream.
Public methodPrint(TextWriter)
Print the message with the help of text writer.
Public methodToString
Return the string representation of this object.
(Overrides ObjectToString.)
Top
Remarks
Message objects are used to represent all outputs from the API including subscription data, response, administrative and status messages. Message objects are obtained from Event.GetMessages(). A message always has a message type and may optionally contain the following
TopicNameValid for Subscription data messages.
ServiceThe service from which this message was received from.
CorrelationIdOne or more correlationIds if this message was delivered for a pending request or a subscription.

A Message object is a handle to a single underlying protocol message. The Message contents are represented as an Element and some convenient shortcuts are supplied to the Element accessors.

Thread Safety
Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
See Also