public void should_return_a_storage_peer_with_its_timestamp_kind_set_to_utc()
        {
            var unspecifiedKindUtcNow = new DateTime(DateTime.UtcNow.Ticks, DateTimeKind.Unspecified);
            var peerDescriptor = new PeerDescriptor(new PeerId("Abc.Titi.0"), "tcp://toto:123", false, true, true, unspecifiedKindUtcNow);

            var storagePeer = peerDescriptor.ToStoragePeer();

            storagePeer.TimestampUtc.Kind.ShouldEqual(DateTimeKind.Utc);
        }
Пример #2
0
        public void should_return_a_storage_peer_with_its_timestamp_kind_set_to_utc()
        {
            var unspecifiedKindUtcNow = new DateTime(DateTime.UtcNow.Ticks, DateTimeKind.Unspecified);
            var peerDescriptor        = new PeerDescriptor(new PeerId("Abc.Titi.0"), "tcp://toto:123", false, true, true, unspecifiedKindUtcNow);

            var storagePeer = peerDescriptor.ToStoragePeer();

            storagePeer.TimestampUtc.Kind.ShouldEqual(DateTimeKind.Utc);
        }
 public void AddOrUpdatePeer(PeerDescriptor peerDescriptor)
 {
     var storagePeer = peerDescriptor.ToStoragePeer();
     _dataContext.StoragePeers
                 .Insert(storagePeer)
                 .SetConsistencyLevel(ConsistencyLevel.LocalQuorum)
                 .SetTimestamp(storagePeer.TimestampUtc)
                 .Execute();
 }
Пример #4
0
        public void AddOrUpdatePeer(PeerDescriptor peerDescriptor)
        {
            var storagePeer = peerDescriptor.ToStoragePeer();

            _dataContext.StoragePeers
            .Insert(storagePeer)
            .SetConsistencyLevel(ConsistencyLevel.LocalQuorum)
            .SetTimestamp(storagePeer.TimestampUtc)
            .Execute();
        }