Esempio n. 1
0
        /// <summary>
        /// The GetDictionaries method analyzes a collection of elements
        /// and determines which FIX data dictionaries are relevant to the
        /// collection of elements. The method uses VfxFixVxMatcher to find
        /// the version definitions that match the elements, and then it goes
        /// to the version registry to retrieve the relevant dictionaries.
        /// </summary>
        /// <param name="elements">
        /// The collection of FIX elements to analyze.
        /// </param>
        /// <returns>
        /// The collection of all FIX dictionaries that are relevant to the
        /// elements, according to the corresponding version definitions.
        /// </returns>
        public Collection <string> GetDictionaries(FixCollection elements)
        {
            Collection <string> result = new Collection <string>();

            if ((_vxRegistry != null) && (_dxRegistry != null))
            {
                VfxFixVxMatcher matcher = new VfxFixVxMatcher();
                matcher.Init(_vxRegistry);

                string sxVersion = matcher.GetVersion(elements, "session");
                if (sxVersion == null)
                {
                    sxVersion = matcher.GetVersion(elements, "combined");
                }

                string axVersion = matcher.GetVersion(elements, "app");
                if (axVersion == null)
                {
                    axVersion = matcher.GetVersion(elements, "combined");
                }

                VfxFixVxRecord sxDetails = _vxRegistry.Get(sxVersion);
                if (sxDetails != null)
                {
                    foreach (VfxFixVersion_Dictionary_Reference dxEntry in sxDetails.Dictionaries)
                    {
                        result.Add(dxEntry.Name);
                    }
                }

                if ((sxVersion == null) || (sxVersion.CompareTo(axVersion) != 0))
                {
                    VfxFixVxRecord axDetails = _vxRegistry.Get(axVersion);
                    if (axDetails != null)
                    {
                        foreach (VfxFixVersion_Dictionary_Reference dxEntry in axDetails.Dictionaries)
                        {
                            result.Add(dxEntry.Name);
                        }
                    }
                }
            }

            return(result);
        }
Esempio n. 2
0
        /// <summary>
        /// The GetDictionaries method analyzes a collection of elements
        /// and determines which FIX data dictionaries are relevant to the
        /// collection of elements. The method uses VfxFixVxMatcher to find
        /// the version definitions that match the elements, and then it goes
        /// to the version registry to retrieve the relevant dictionaries.
        /// </summary>
        /// <param name="elements">
        /// The collection of FIX elements to analyze.
        /// </param>
        /// <returns>
        /// The collection of all FIX dictionaries that are relevant to the
        /// elements, according to the corresponding version definitions.
        /// </returns>
        public Collection<string> GetDictionaries(FixCollection elements)
        {
            Collection<string> result = new Collection<string>();
            if ((_vxRegistry != null) && (_dxRegistry != null))
            {
                VfxFixVxMatcher matcher = new VfxFixVxMatcher();
                matcher.Init(_vxRegistry);

                string sxVersion = matcher.GetVersion(elements, "session");
                if (sxVersion == null)
                {
                    sxVersion = matcher.GetVersion(elements, "combined");
                }

                string axVersion = matcher.GetVersion(elements, "app");
                if (axVersion == null)
                {
                    axVersion = matcher.GetVersion(elements, "combined");
                }

                VfxFixVxRecord sxDetails = _vxRegistry.Get(sxVersion);
                if (sxDetails != null)
                {
                    foreach (VfxFixVersion_Dictionary_Reference dxEntry in sxDetails.Dictionaries)
                    {
                        result.Add(dxEntry.Name);
                    }
                }

                if ((sxVersion == null) || (sxVersion.CompareTo(axVersion) != 0))
                {
                    VfxFixVxRecord axDetails = _vxRegistry.Get(axVersion);
                    if (axDetails != null)
                    {
                        foreach (VfxFixVersion_Dictionary_Reference dxEntry in axDetails.Dictionaries)
                        {
                            result.Add(dxEntry.Name);
                        }
                    }
                }
            }

            return result;
        }