Пример #1
0
 public CounterSmuggler(CounterSmugglerOptions options, ICounterSmugglerSource source, ICounterSmugglerDestination destination)
 {
     _options       = options;
     _source        = source;
     _destination   = destination;
     _notifications = new CounterSmugglerNotifications();
 }
Пример #2
0
 protected CounterSmugglerBase(CounterSmugglerOptions options, CounterSmugglerNotifications notifications, ICounterSmugglerSource source, ICounterSmugglerDestination destination)
 {
     Notifications = notifications;
     Options       = options;
     Source        = source;
     Destination   = destination;
 }
Пример #3
0
 public DeltaSmuggler(CounterSmugglerOptions options, CounterSmugglerNotifications notifications, ICounterSmugglerSource source, ICounterSmugglerDestination destination)
     : base(options, notifications, source, destination)
 {
 }
Пример #4
0
        private static async Task <CounterSmugglerOperationState> GetOperationStateAsync(CounterSmugglerOptions options, ICounterSmugglerSource source, ICounterSmugglerDestination destination, CancellationToken cancellationToken)
        {
            CounterSmugglerOperationState state = null;

            if (destination.SupportsOperationState)
            {
                state = await destination
                        .LoadOperationStateAsync(options, cancellationToken)
                        .ConfigureAwait(false);
            }

            if (state == null)
            {
                state = new CounterSmugglerOperationState
                {
                    LastEtag = options.StartEtag
                };
            }

            Debug.Assert(state.LastEtag != null);

            return(state);
        }