Ejemplo n.º 1
0
 public CounterSmuggler(CounterSmugglerOptions options, ICounterSmugglerSource source, ICounterSmugglerDestination destination)
 {
     _options       = options;
     _source        = source;
     _destination   = destination;
     _notifications = new CounterSmugglerNotifications();
 }
Ejemplo n.º 2
0
 protected CounterSmugglerBase(CounterSmugglerOptions options, CounterSmugglerNotifications notifications, ICounterSmugglerSource source, ICounterSmugglerDestination destination)
 {
     Notifications = notifications;
     Options       = options;
     Source        = source;
     Destination   = destination;
 }
Ejemplo n.º 3
0
 public DeltaSmuggler(CounterSmugglerOptions options, CounterSmugglerNotifications notifications, ICounterSmugglerSource source, ICounterSmugglerDestination destination)
     : base(options, notifications, source, destination)
 {
 }
Ejemplo n.º 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);
        }