Пример #1
0
        internal CollectorConfiguration CreateCollectorConfiguration(ConfigurationCollectorData source)
        {
            CollectorConfiguration result = new CollectorConfiguration();

            if (source.Databases.Count > 0)
            {
                foreach (var d in source.Databases)
                {
                    result.Databases.Add(d.DatabaseID, Convert(d));
                }
            }
            return(result);
        }
Пример #2
0
        internal ConfigurationCollectorData Convert(CollectorConfiguration source)
        {
            ConfigurationCollectorData result = new ConfigurationCollectorData();

            if (source != null)
            {
                if (source.Databases != null)
                {
                    foreach (var d in source.Databases.Values)
                    {
                        result.Databases.Add(Convert(d));
                    }
                }
            }
            return(result);
        }