Exemplo n.º 1
0
 public ReplicationDocumentSender(Stream stream, OutgoingReplicationHandler parent, Logger log, string[] pathsToSend, string[] destinationAcceptablePaths)
 {
     _log = log;
     if (pathsToSend != null && pathsToSend.Length > 0)
     {
         _pathsToSend = new AllowedPathsValidator(pathsToSend);
     }
     if (destinationAcceptablePaths != null && destinationAcceptablePaths.Length > 0)
     {
         _destinationAcceptablePaths = new AllowedPathsValidator(destinationAcceptablePaths);
     }
     _stream = stream;
     _parent = parent;
 }
Exemplo n.º 2
0
        public ReplicationDocumentSender(Stream stream, OutgoingReplicationHandler parent, Logger log, string[] pathsToSend, string[] destinationAcceptablePaths)
        {
            _log = log;
            if (pathsToSend != null && pathsToSend.Length > 0)
            {
                _pathsToSend = new AllowedPathsValidator(pathsToSend);
            }
            if (destinationAcceptablePaths != null && destinationAcceptablePaths.Length > 0)
            {
                _destinationAcceptablePaths = new AllowedPathsValidator(destinationAcceptablePaths);
            }
            _stream = stream;
            _parent = parent;

            _shouldSkipSendingTombstones = _parent.Destination is PullReplicationAsSink sink && sink.Mode == PullReplicationMode.SinkToHub &&
                                           parent._outgoingPullReplicationParams?.PreventDeletionsMode?.HasFlag(PreventDeletionsMode.PreventSinkToHubDeletions) == true &&
                                           _parent._database.ForTestingPurposes?.ForceSendTombstones == false;
        }