IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Lib.MsgBase Class Reference

Base class for all messages. More...

+ Inheritance diagram for IG.Lib.MsgBase:
+ Collaboration diagram for IG.Lib.MsgBase:

Public Member Functions

void SetSenderLabex ()
 Sets msg data such that sender is Labex and receiver is Bis. More...
 
void SetSenderBis ()
 Sets msg data such that sender is Bis and receiver is Labex. More...
 
- Public Member Functions inherited from IG.Lib.ParsableXmlObject
virtual void Save (string filename)
 Saves contents of the msg to an xml file. More...
 
virtual void CreateXml ()
 Creates msg Xml from the current msg data and stores it in this object. More...
 
virtual void Load (string filename)
 Loads msg data from a file containing the XML msg. More...
 
virtual void LoadXml (string doc)
 Loads msg data from a string containing the XML msg. More...
 
virtual void LoadXml (XmlDocument doc)
 Loads msg data from an XmlDocument containing XML msg. More...
 
abstract void Read ()
 Reads msg data from the internal XML document containing the msg. More...
 
abstract void Read (XmlParser data)
 Read msg data from an XML document containing the msg. More...
 
virtual void CheckConsistency (AccummulatedReport rep)
 Empty data consistency check, intended to be overridden in derived classes. More...
 
virtual void WriteToConsole ()
 Writes cntents of the msg in a human readable form to the system console. More...
 
virtual void Write (string filename, bool append)
 Writes cntents of the msg in a human readable form to a file. More...
 
abstract XmlDocument ToXml ()
 Converts a msg to Xml and returns it. More...
 

Static Public Member Functions

static void SetMessageReceiverOld (ref XmlDocument msg, string receiver, out bool changed)
 Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. WARNING: searching for receiver element is done through an XPath expression, which may fail due to default namespaces that were not detected. More...
 
static void SetMessageReceiver (ref string message, string receiver, out bool changed)
 Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. More...
 
static void SetMessageReceiver (ref XmlDocument msg, string receiver, out bool changed)
 Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. More...
 
static void SetMessageReceiver (ref XmlBuilder data, string receiver, out bool changed)
 Sets the receiver of the communication msg stored in an Xml builder to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. More...
 
static void SetMessageSender (ref XmlBuilder data, string sender, out bool changed)
 Sets the sender of the communication msg stored in an Xml builder to the specified sender, and indicates through an output argument whether the sender has been changed in msg. If the Sender stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. More...
 
static void SetMessageResponder (ref XmlBuilder data, string responder, out bool changed)
 Sets the responder of the communication msg stored in an Xml builder to the specified responder, and indicates through an output argument whether the responder has been changed in msg. If the responder stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. More...
 
static MessageType GetMessageType (string msgstring)
 Infers the msg type from the XML string containing the msg, and returns it. More...
 
static MessageType GetMessageType (XmlDocument msg)
 Infers the msg type from the XML document containing the msg, and returns it. More...
 
static MessageType GetMessageType (XmlParser data)
 Infers the msg type from the XML parser containing the msg, and returns it. More...
 

Public Attributes

MessageType Type = MessageType.Unknown
 Message type. Helps with general methods that operate on any datatype of msg. More...
 
string MessageId = null
 Message ID, obtained form the web service. More...
 
string MessageFile = null
 Specifies the file where message has been backed up. Warning: this file may be deleted at any time! More...
 
string MessageNumber = null
 
- Public Attributes inherited from IG.Lib.ParsableXmlObject
string XmlString = null
 

Static Protected Attributes

static string LabexIdLowercase = null
 

Properties

static MsgConst Const [get]
 Gets objects that contains all constants related to communication messages. More...
 
string MessageXml [get, set]
 Complete msg as obtained from the web service. More...
 
- Properties inherited from IG.Lib.ParsableXmlObject
virtual IReporter R [get]
 Reporter for this class. More...
 
XmlDocument Doc [get]
 Returns the XML document representing the msg. More...
 

Static Private Member Functions

static bool IsSpecimenObservationOrder (XmlParser data)
 Returns true if data contains a msg of type MessageType.SpecimenObservationOrder. More...
 
static bool IsSpecimenObservationEvent (XmlParser data)
 Returns true if data contains a msg of type MessageType.SpecimenObservationEvent. More...
 
static bool IsDetailedFinancialTransaction (XmlParser data)
 Returns true if data contains a msg of type MessageType.DetailedFinancialTransaction. More...
 

Private Attributes

string MessageNumberOid = null
 
string MessageReceiver = null
 
string MessageReceiverOid = null
 
string MessageResponder = null
 
string MessageResponderOid = null
 
string MessageSender = null
 
string MessageSenderOid = null
 

Static Private Attributes

static string BisIdLowercase = null
 

Additional Inherited Members

- Protected Attributes inherited from IG.Lib.ParsableXmlObject
XmlBuilder Data = new XmlBuilder()
 

Detailed Description

Base class for all messages.

Member Function Documentation

void IG.Lib.MsgBase.SetSenderLabex ( )
inline

Sets msg data such that sender is Labex and receiver is Bis.

References IG.Lib.MsgConst.Const, and IG.Lib.MsgConstCommon.LabexId.

Referenced by IGTest.ProgramIGTest.TestMsgFinancialTransaction(), and IGTest.ProgramIGTest.TestMsgObservationEvent().

void IG.Lib.MsgBase.SetSenderBis ( )
inline

Sets msg data such that sender is Bis and receiver is Labex.

References IG.Lib.MsgConst.Const, and IG.Lib.MsgConstCommon.LabexId.

static void IG.Lib.MsgBase.SetMessageReceiverOld ( ref XmlDocument  msg,
string  receiver,
out bool  changed 
)
inlinestatic

Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false. WARNING: searching for receiver element is done through an XPath expression, which may fail due to default namespaces that were not detected.

Parameters
msgMessage in which receiver should be set.
receiverThe new receiver of the msg.
changedIndicates whether the msg has been changed (i.e., whether the new receiver has been written to the msg).
static void IG.Lib.MsgBase.SetMessageReceiver ( ref string  message,
string  receiver,
out bool  changed 
)
inlinestatic

Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false.

Parameters
msgMessage document in which receiver should be set.
receiverThe new receiver of the msg.
changedIndicates whether the msg has been changed (i.e., whether the new receiver has been written to the msg).

Referenced by LabexBis.Calypso.SendMessage().

static void IG.Lib.MsgBase.SetMessageReceiver ( ref XmlDocument  msg,
string  receiver,
out bool  changed 
)
inlinestatic

Sets the receiver of the communication msg stored in msg to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false.

Parameters
msgMessage in which receiver should be set.
receiverThe new receiver of the msg.
changedIndicates whether the msg has been changed (i.e., whether the new receiver has been written to the msg).

References IG.Lib.XmlUtilityBase.LoadXml().

static void IG.Lib.MsgBase.SetMessageReceiver ( ref XmlBuilder  data,
string  receiver,
out bool  changed 
)
inlinestatic

Sets the receiver of the communication msg stored in an Xml builder to the specified receiver, and indicates through an output argument whether the receiver has been changed in msg. If the receiver stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false.

Parameters
dataXML builder containing the msg where receiver is to be set.
receiverThe new receiver of the msg.
changedIndicates whether the msg has been changed (i.e., whether the new receiver has been written to the msg).
static void IG.Lib.MsgBase.SetMessageSender ( ref XmlBuilder  data,
string  sender,
out bool  changed 
)
inlinestatic

Sets the sender of the communication msg stored in an Xml builder to the specified sender, and indicates through an output argument whether the sender has been changed in msg. If the Sender stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false.

Parameters
dataXML builder containing the msg where Sender is to be set.
senderThe new Sender of the msg.
changedIndicates whether the msg has been changed (i.e., whether the new Sender has been written to the msg).
static void IG.Lib.MsgBase.SetMessageResponder ( ref XmlBuilder  data,
string  responder,
out bool  changed 
)
inlinestatic

Sets the responder of the communication msg stored in an Xml builder to the specified responder, and indicates through an output argument whether the responder has been changed in msg. If the responder stated in the msg already equals to the specified one then nothing changes in the msg and the output indicator becomes false.

Parameters
dataXML builder containing the msg where responder is to be set.
responderThe new responder of the msg.
changedIndicates whether the msg has been changed (i.e., whether the new responder has been written to the msg).
static bool IG.Lib.MsgBase.IsSpecimenObservationOrder ( XmlParser  data)
inlinestaticprivate

Returns true if data contains a msg of type MessageType.SpecimenObservationOrder.

Parameters
dataXmlParser containing the msg.

References IG.Lib.XmlParser.Current, IG.Lib.XmlParser.GoToRoot(), IG.Lib.XmlParser.Name, IG.Lib.XmlParser.NextOrCurrentElement(), and IG.Lib.XmlParser.StepIn().

static bool IG.Lib.MsgBase.IsSpecimenObservationEvent ( XmlParser  data)
inlinestaticprivate

Returns true if data contains a msg of type MessageType.SpecimenObservationEvent.

Parameters
dataXmlParser containing the msg.

References IG.Lib.XmlParser.Current, IG.Lib.XmlParser.GoToRoot(), IG.Lib.XmlParser.Name, IG.Lib.XmlParser.NextOrCurrentElement(), and IG.Lib.XmlParser.StepIn().

static bool IG.Lib.MsgBase.IsDetailedFinancialTransaction ( XmlParser  data)
inlinestaticprivate

Returns true if data contains a msg of type MessageType.DetailedFinancialTransaction.

Parameters
dataXmlParser containing the msg.

References IG.Lib.XmlParser.Current, IG.Lib.XmlParser.GoToRoot(), IG.Lib.XmlParser.Name, IG.Lib.XmlParser.NextOrCurrentElement(), and IG.Lib.XmlParser.StepIn().

static MessageType IG.Lib.MsgBase.GetMessageType ( string  msgstring)
inlinestatic

Infers the msg type from the XML string containing the msg, and returns it.

Parameters
msgstringMessage string.
Returns
The type of the msg.

Referenced by LabexBis.Calypso.GetMessage().

static MessageType IG.Lib.MsgBase.GetMessageType ( XmlDocument  msg)
inlinestatic

Infers the msg type from the XML document containing the msg, and returns it.

Parameters
msgXml document containing the msg.
Returns
Message type (null if the type could not be inferred).

References IG.Lib.XmlUtilityBase.LoadXml().

static MessageType IG.Lib.MsgBase.GetMessageType ( XmlParser  data)
inlinestatic

Infers the msg type from the XML parser containing the msg, and returns it.

Parameters
msgXml parser containing the msg.
Returns
Message type (null if the type could not be inferred).

Member Data Documentation

MessageType IG.Lib.MsgBase.Type = MessageType.Unknown

Message type. Helps with general methods that operate on any datatype of msg.

Referenced by IGTest.ProgramIGTest.ReceiveSpecimenObservationOrder(), LabexBis.Calypso.SendOoNullifyToBis(), and IGTest.ProgramIGTest.TestCalypsoWs().

string IG.Lib.MsgBase.MessageFile = null

Specifies the file where message has been backed up. Warning: this file may be deleted at any time!

Referenced by LabexBis.Calypso.GetMessage().

string IG.Lib.MsgBase.MessageNumberOid = null
private
string IG.Lib.MsgBase.MessageReceiver = null
private
string IG.Lib.MsgBase.MessageReceiverOid = null
private
string IG.Lib.MsgBase.MessageResponder = null
private
string IG.Lib.MsgBase.MessageResponderOid = null
private
string IG.Lib.MsgBase.MessageSender = null
private
string IG.Lib.MsgBase.MessageSenderOid = null
private
string IG.Lib.MsgBase.LabexIdLowercase = null
staticprotected
string IG.Lib.MsgBase.BisIdLowercase = null
staticprivate

Property Documentation

MsgConst IG.Lib.MsgBase.Const
staticgetprotected

Gets objects that contains all constants related to communication messages.

string IG.Lib.MsgBase.MessageXml
getset

The documentation for this class was generated from the following file: