Bloomberg API for .NET
EventFormatter Class
NamespacesBloomberglp.BlpapiEventFormatter
EventFormatter is used to format publisher events or responses to certain ProviderSession requests.
Declaration Syntax
C#Visual BasicVisual C++
public class EventFormatter
Public Class EventFormatter
public ref class EventFormatter
Members
All MembersConstructorsMethods



IconMemberDescription
EventFormatter(Event)
Creates an instance of EventFormatter to create messages in the specified event. The behavior is undefined if the specified event already has another EventFormatter attached.

AppendElement()()()()
Append an empty complex element of the appropriate type to the element which represents an array of 'Element' type.

AppendMessage(String, Topic)
Appends a (empty) message of the specified 'messageType' that will be published under the specified 'topic' to the event referenced by this EventFormatter. After a message has been appended its elements can be set using the various 'SetElement' methods.

AppendMessage(String, Topic, Nullable<(Of <<'(Int32>)>>))
Appends a (empty) message of the specified 'messageType' that will be published under the specified 'topic' with the specified 'sequenceNumber' to the event referenced by this EventFormatter. After a message has been appended its elements can be set using the various 'SetElement' methods. The behavior is undefined unless the 'sequenceNumber' is greater (unless the value wrapped) than the last value used in any previous message on this 'topic'.

AppendMessage(Name, Topic)
Appends a (empty) message of the specified 'messageType' that will be published under the specified 'topic' to the event referenced by this EventFormatter. After a message has been appended its elements can be set using the various 'SetElement' methods.

AppendMessage(Name, Topic, Nullable<(Of <<'(Int32>)>>))
Appends a (empty) message of the specified 'messageType' that will be published under the specified 'topic' with the specified 'sequenceNumber' to the event referenced by this EventFormatter. After a message has been appended its elements can be set using the various 'SetElement' methods. The behavior is undefined unless the 'sequenceNumber' is greater (unless the value wrapped) than the last value used in any previous message on this 'topic'.

AppendRecapMessage(Topic, CorrelationID)
Appends a (empty) recap message that will be published under the specified 'topic' to the event referenced by this EventFormatter. Specifies the optional 'cid' if this recap message is added in response to a 'TopicRecap' message. After a message has been appended its elements can be set using the various 'SetElement' methods. It is an error to create append a recap message to an admin event.

AppendRecapMessage(Topic, Nullable<(Of <<'(Int32>)>>), CorrelationID)
Appends a (empty) recap message that will be published under the specified 'topic' to the event referenced by this EventFormatter. Specifies the optional 'cid' if this recap message is added in response to a 'TopicRecap' message. After a message has been appended its elements can be set using the various 'SetElement' methods. It is an error to create append a recap message to an admin event. The behavior is undefined unless the 'sequenceNumber' is greater (unless the value wrapped) than the last value used in any previous message on this 'topic'.

AppendResponse(String)
Appends a (empty) response message of the specified 'messageType' that will be sent in response to previously received operation request. After a message has been appended its elements can be set using the various 'SetElement' methods. Only one response can be appended to an event.

AppendResponse(Name)
Appends a (empty) response message of the specified 'name' that will be sent in response to previously received operation request. After a message has been appended its elements can be set using the various 'SetElement' methods. Only one response can be appended to an event.

AppendValue(Boolean)
Appends the specified 'value' to the element which represents an array of 'bool'.

AppendValue(Char)
Appends the specified 'value' to the element which represents an array of 'char'

AppendValue(Int32)
Appends the specified 'value' to the element which represents an array of 'int'.

AppendValue(Int64)
Appends the specified 'value' to the element which represents an array of 'long'

AppendValue(Single)
Appends the specified 'value' to the element which represents an array of 'float'.

AppendValue(Double)
Appends the specified 'value' to the element which represents an array of 'double'.

AppendValue(Datetime)
Appends the specified 'value' to the element which represents an array of 'Datetime'.

AppendValue(String)
Appends the specified 'value' to the element which represents an array of 'String'

AppendValue(Name)
Appends the specified 'value' to the element which represents an array of 'Name'.

PopElement()()()()
Returns this formatter's context back to the location where it was before the most recent call to 'PushElement' or 'AppendElement()'.

PushElement(String)
Changes the level at which this formatter is operating to the specified element 'name'. After this returns the context of this formatter is set to the element 'name' in the schema and subsequent calls to 'SetElement' or 'PushElement' are applied at that level. If 'name' represents an array of scalars then 'AppendValue' must be used to add values. If 'name' represents an array of complex types then 'AppendElement()' creates the first entry and set the context of the formatter to that element. Calling 'AppendElement()' again will create another entry.

PushElement(Name)
Changes the level at which this formatter is operating to the specified element 'name'. After this returns the context of this formatter is set to the element 'name' in the schema and subsequent calls to 'SetElement' or 'PushElement' are applied at that level. If 'name' represents an array of scalars then 'AppendValue' must be used to add values. If 'name' represents an array of complex types then 'AppendElement()' creates the first entry and set the context of the formatter to that element. Calling 'AppendElement()' again will create another entry.

SetElement(String, String)
Sets the element with the specified 'name' within the current element to the specified 'value'. The behavior of this function is undefined if 'value' is 'null'. Note that this function is not intended for publication of null values; uses SetElementNull(String) instead.

SetElement(Name, String)
Sets the element with the specified 'name' within the current element to the specified 'value'. The behavior of this function is undefined if 'value' is 'null'. Note that this function is not intended for publication of null values; uses SetElementNull(Name) instead.

SetElement(String, Name)
Sets the element with the specified 'name' within the current element to the specified 'value'. The behavior of this function is undefined if 'value' is 'null'. Note that this function is not intended for publication of null values; uses SetElementNull(String) instead.

SetElement(Name, Name)
Sets the element with the specified 'name' within the current element to the specified 'value'. The behavior of this function is undefined if 'value' is 'null'. Note that this function is not intended for publication of null values; uses SetElementNull(Name) instead.

SetElement(String, Boolean)
Sets the element with the specified 'name' within the current element to the specified 'value'.

SetElement(Name, Boolean)
Sets the element with the specified 'name' within the current element to the specified 'value'.

SetElement(String, Char)
Sets the element with the specified 'name' within the current element to the specified 'value'.

SetElement(Name, Char)
Sets the element with the specified 'name' within the current element to the specified 'value'.

SetElement(String, Int32)
Sets the element with the specified 'name' within the current element to the specified 'value'.

SetElement(Name, Int32)
Sets the element with the specified 'name' within the current element to the specified 'value'.

SetElement(String, Int64)
Sets the element with the specified 'name' within the current element to the specified 'value'.

SetElement(Name, Int64)
Sets the element with the specified 'name' within the current element to the specified 'value'.

SetElement(String, Single)
Sets the element with the specified 'name' within the current element to the specified 'value'.

SetElement(Name, Single)
Sets the element with the specified 'name' within the current element to the specified 'value'.

SetElement(String, Double)
Sets the element with the specified 'name' within the current element to the specified 'value'.

SetElement(Name, Double)
Sets the element with the specified 'name' within the current element to the specified 'value'.

SetElement(String, Datetime)
Sets the element with the specified 'name' within the current element to the specified 'value'. The behavior of this function is undefined if 'value' is 'null'. Note that this function is not intended for publication of null values; uses SetElementNull(String) instead.

SetElement(Name, Datetime)
Sets the element with the specified 'name' within the current element to the specified 'value'. The behavior of this function is undefined if 'value' is 'null'. Note that this function is not intended for publication of null values; uses SetElementNull(String) instead.

SetElementNull(String)
Creates a null element with the specified 'name'. Note that whether or not fields containing null values are published to subscribers is dependent upon details of the service and schema configuration.

SetElementNull(Name)
Creates a null element with the specified 'name'. Note that whether or not fields containing null values are published to subscribers is dependent upon details of the service and schema configuration.

Remarks

An EventFormatter is created either from an Event obtained from Service.CreatePublishEvent() or from Service.CreateResponseEvent(). Once one or more Messages have been appended to the Event using the EventFormatter the Event can be published using ProviderSession.Publish(Event)} or sent back as a response using ProviderSession.SendResponse(Event).

EventFormatter objects cannot be copied or assigned so as to ensure there is no ambiguity about what happens if two EventFormatters are both formatting the same Event.

The EventFormatter supports write once only to each field. It is an error to call SetElement() or PushElement() for the same name more than once at a particular level of the schema when creating a message.

Inheritance Hierarchy
Object
EventFormatter

Assembly: Bloomberglp.Blpapi (Module: Bloomberglp.Blpapi.dll) Version: 3.9.6.1