On Tue, Mar 5, 2013 at 11:35 AM, James A. Smith <span dir="ltr"><<a href="mailto:jsmith@anstca.com" target="_blank">jsmith@anstca.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="color:rgb(31,73,125)">Given an incoming message, how can I get *</span><b style="color:rgb(31,73,125)">the</b><span style="color:rgb(31,73,125)">* set of keys (Fix TAGS) for that message? I understand the messages are pre-defined in the XML file, however, vendors can add custom Fix TAGS too right?</span></p>
</div></blockquote><div><br></div><div>True, and typically you would receive a specification document from your counterparty instead of trying to figure this out on the fly. You would then modify the quickfix data dictionary (XML) accordingly. You don't have to do that if 1) you don't care about validation and 2) there are no incoming messages with repeating groups. They may even have a quickfix-formatted data dictionary they can give you, if you ask. </div>
<div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><p class="MsoNormal"><span style="color:rgb(31,73,125)"> So there may be additional Fix TAGS that are vendor specific in a given message? Is there a generic way to get the set of Fix TAGS from the message that are in the message?</span></p>
</div></blockquote><div><br></div><div>Each message is a FieldMap, which is IEnumerable. So I suppose you could do this:</div><div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_quote">
<div><div><font face="courier new, monospace">foreach (KeyValuePair<int, QuickFix.Fields.IField> kvp in msg)</font></div></div></div><div class="gmail_quote"><div><div><font face="courier new, monospace"> System.Console.WriteLine(kvp);</font></div>
</div></div></blockquote><div class="gmail_quote"><div><br></div></div>-- <br><font face="arial, helvetica, sans-serif">Mike Gatny<br>Connamara Systems, LLC</font>