internal void RegisterConverter(DbgValueConverterInfo converterInfo)
            {
                if (null == converterInfo)
                {
                    throw new ArgumentNullException("converterInfo");
                }

                m_scriptLoader.AddSourceFile(converterInfo.SourceScript);

                string mod;

                if (String.IsNullOrEmpty(converterInfo.ScopingModule))
                {
                    mod = c_NoModule;
                }
                else
                {
                    mod = converterInfo.ScopingModule;
                }

                var templateMap = GetOrCreateValue(m_moduleMap,
                                                   mod,
                                                   () => new Dictionary <string, TypeNameMatchList <DbgValueConverterInfo> >(StringComparer.OrdinalIgnoreCase));

                var matchList = GetOrCreateValue(templateMap, converterInfo.TypeName.TemplateName);

                if (!matchList.AddOrReplace(converterInfo))
                {
                    LogManager.Trace("Replaced existing converter for: {0}", converterInfo.TypeName);
                }
            } // end RegisterConverter()
Пример #2
0
 public static void RegisterConverter(DbgValueConverterInfo converterInfo)
 {
     _Singleton.RegisterConverter(converterInfo);
 }