public Topology Parse(IManagementClient client, Vhost virtualHost)
        {
            var topology = new Topology();

            foreach (var exchange in client.GetExchanges())
            {
                if (!IsSystemExchange(exchange.Name))
                {
                    var modelExchange = new Model.Exchange
                    {
                        Name = exchange.Name,
                        ExchangeType = ExchangeTypeMap[exchange.Type],
                        Durable = exchange.Durable,
                    };

                    MapArguments(exchange.Arguments, modelExchange.Arguments);
                    topology.Exchanges.Add(modelExchange);
                }
            }

            foreach (var queue in client.GetQueues())
            {
                if (!IsSystemQueue(queue))
                {
                    var modelQueue = new Model.Queue
                    {
                        Name = queue.Name,
                        Durable = queue.Durable
                    };

                    MapArguments(queue.Arguments, modelQueue.Arguments);

                    foreach (var binding in client.GetBindingsForQueue(queue))
                    {
                        if (!IsSystemBinding(binding))
                        {
                            var modelBinding = new Model.Binding
                            {
                                Exchange = binding.Source,
                                RoutingKey = binding.RoutingKey
                            };

                            MapArguments(binding.Arguments, modelBinding.Arguments);
                            modelQueue.Bindings.Add(modelBinding);
                        }
                    }

                    topology.Queues.Add(modelQueue);
                }
            }

            return topology;
        }
 public void SetUp()
 {
     definedTopology = new Topology();
     existingTopology = new Topology();
 }