Пример #1
0
        public Task <HttpResponseMessage> ReplicationTopology()
        {
            var replicationSchemaDiscoverer = new ReplicationTopologyDiscoverer(Database, Enumerable.Empty <string>(), 10, Log);
            var node     = replicationSchemaDiscoverer.Discover();
            var topology = node.Flatten();

            return(GetMessageWithObjectAsTask(topology));
        }
Пример #2
0
        public async Task <HttpResponseMessage> ReplicationTopologyDiscover()
        {
            var ttlAsString = GetQueryStringValue("ttl");

            int         ttl;
            RavenJArray from;

            if (string.IsNullOrEmpty(ttlAsString))
            {
                ttl  = 10;
                from = new RavenJArray();
            }
            else
            {
                ttl  = int.Parse(ttlAsString);
                from = await ReadJsonArrayAsync();
            }

            var replicationSchemaDiscoverer = new ReplicationTopologyDiscoverer(Database, from, ttl, Log);
            var node = replicationSchemaDiscoverer.Discover();

            return(GetMessageWithObject(node));
        }