Exemplo n.º 1
0
        public void RewriteTopicStructure(string projectName, TopicToken newStructure)
        {
            var original = _tokens[projectName];

            var collector = new DeltaCollector(original, newStructure);

            collector.ExecuteDeltas();

            // Want the new one in on the next try.
            _tokens.Remove(projectName);
        }
Exemplo n.º 2
0
        public AjaxContinuation post_project_ProjectName(TopicToken topic)
        {
            if (_lastTimestamp == _reloaded.Timestamp.ToString())
            {
                return(AjaxContinuation.Successful());
            }

            var existing      = _tokenCache.TopicStructureFor(topic.ProjectName);
            var collector     = new DeltaCollector(existing, topic);
            var orderedDeltas = collector.OrderedDeltas().ToArray();

            orderedDeltas.Each(x => Debug.WriteLine(x));

            collector.ExecuteDeltas();

            Task.Factory.StartNew(() => {
                EventAggregator.SendMessage(new RecycleApplication());
            });

            _lastTimestamp = _reloaded.Timestamp.ToString();

            return(AjaxContinuation.Successful());
        }