private void CommutativeAdd(CRDT.Application.Commutative.Counter.PN_CounterService sourceReplica, Guid replicaId, int value, List <CRDT.Application.Commutative.Counter.PN_CounterService> downstreamReplicas)
        {
            sourceReplica.DownstreamAdd(value, replicaId);

            foreach (var downstreamReplica in downstreamReplicas)
            {
                downstreamReplica.DownstreamAdd(value, replicaId);
            }
        }
        private Dictionary <Node, CRDT.Application.Commutative.Counter.PN_CounterService> CreateCommutativeReplicas(List <Node> nodes)
        {
            var dictionary = new Dictionary <Node, CRDT.Application.Commutative.Counter.PN_CounterService>();

            foreach (var node in nodes)
            {
                var repository = new PN_CounterRepository();
                var service    = new CRDT.Application.Commutative.Counter.PN_CounterService(repository);

                dictionary.Add(node, service);
            }

            return(dictionary);
        }