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.13.2.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 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
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)
Returns the element of this message having the specified name.
Public methodGetElement(Name)
Returns the element of this message having the specified name.
Public methodGetElementAsBool(String)
Returns the value of the element having the specified name as a boolean value.
Public methodGetElementAsBool(Name)
Returns the value of the element having the specified name as a boolean value.
Public methodGetElementAsBytes(String)
Returns the value of the element having the specified name as a byte array.
Public methodGetElementAsBytes(Name)
Returns the value of the element having the specified name as a byte array.
Public methodGetElementAsChar(String)
Returns the value of the element having the specified name as a char value.
Public methodGetElementAsChar(Name)
Returns the value of the element having the specified name as a char value.
Public methodGetElementAsDate(String)
Returns the value of the element having the specified name as a Date value.
Public methodGetElementAsDate(Name)
Returns the value of the element having the specified name as a Date value.
Public methodGetElementAsDatetime(String)
Returns the value of the element having the specified name as a Datetime value.
Public methodGetElementAsDatetime(Name)
Returns the value of the element having the specified name as a Datetime value.
Public methodGetElementAsFloat32(String)
Returns the value of the element having the specified name as a float value.
Public methodGetElementAsFloat32(Name)
Returns the value of the element having the specified name as a float value.
Public methodGetElementAsFloat64(String)
Returns the value of the element having the specified name as a double value.
Public methodGetElementAsFloat64(Name)
Returns the value of the element having the specified name as a double value.
Public methodGetElementAsInt32(String)
Returns the value of the element having the specified name as an int value.
Public methodGetElementAsInt32(Name)
Returns the value of the element having the specified name as an int value.
Public methodGetElementAsInt64(String)
Returns the value of the element having the specified name as a long value.
Public methodGetElementAsInt64(Name)
Returns the value of the element having the specified name as a long value.
Public methodGetElementAsName(String)
Returns the value of the element having the specified name as a Constant value.
Public methodGetElementAsName(Name)
Returns the value of the element having the specified name as a Constant value.
Public methodGetElementAsString(String)
Returns the value of the element having the specified name as a string value.
Public methodGetElementAsString(Name)
Returns the value of the element having the specified name as a string value.
Public methodGetElementAsTime(String)
Returns the value of the element having the specified name as a Time value.
Public methodGetElementAsTime(Name)
Returns the value of the element having the specified name as a Time value.
Public methodHasElement(String)
Returns true if this message has the element having the specified name false otherwise.
Public methodHasElement(Name)
Returns true if this message has the element having the specified name false otherwise.
Public methodHasElement(String, Boolean)
Returns true if this message has the element having the specified name false otherwise.
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