QuickFix.DataDictionary.DDMap.IsField C# (CSharp) Method

IsField() public method

public IsField ( int tag ) : System.Boolean
tag int
return System.Boolean
        public Boolean IsField(int tag)
        {
            return Fields.ContainsKey(tag);
        }

Usage Example

Beispiel #1
0
        private void parseMsgEl(XmlNode node, DDMap ddmap)
        {
            if (!node.HasChildNodes)
            {
                return;
            }
            foreach (XmlNode childNode in node.ChildNodes)
            {
                if (childNode.Name == "field")
                {
                    DDField fld = FieldsByName[childNode.Attributes["name"].Value];
                    if (childNode.Attributes["required"].Value == "Y")
                    {
                        fld.Required = true;
                        ddmap.ReqFields.Add(fld.Tag);
                    }
                    if (!ddmap.IsField(fld.Tag))
                    {
                        ddmap.Fields.Add(fld.Tag, fld);
                    }

                    // if first field in group, make it the DELIM <3 FIX
                    if ((ddmap.GetType() == typeof(DDGrp) && ((DDGrp)ddmap).Delim == 0))
                    {
                        ((DDGrp)ddmap).Delim = fld.Tag;
                    }
                }
                else if (childNode.Name == "group")
                {
                    DDField fld = FieldsByName[childNode.Attributes["name"].Value];
                    DDGrp   grp = new DDGrp();
                    if (childNode.Attributes["required"].Value == "Y")
                    {
                        fld.Required = true;
                        ddmap.ReqFields.Add(fld.Tag);
                        grp.Required = true;
                    }
                    if (!ddmap.IsField(fld.Tag))
                    {
                        ddmap.Fields.Add(fld.Tag, fld);
                    }
                    grp.NumFld = fld.Tag;
                    parseMsgEl(childNode, grp);
                    ddmap.Groups.Add(fld.Tag, grp);
                }
                else if (childNode.Name == "component")
                {
                    String  name     = childNode.Attributes["name"].Value;
                    XmlNode compNode = RootDoc.SelectSingleNode("//components/component[@name='" + name + "']");
                    parseMsgEl(compNode, ddmap);
                }
            }
        }
All Usage Examples Of QuickFix.DataDictionary.DDMap::IsField