public IAuthenticator CreateAuthenticator(ReplicationDriverContext context)
 {
     return(AuthenticatorFactory.CreateBasicAuthenticator(
                username: this._credentials.Item1,
                password: this._credentials.Item2
                ));
 }
 public void ReplicationStarting(ReplicationDriverContext context)
 {
     context.Replication.Continuous         = true;
     context.Replication.ReplicationOptions = new ReplicationOptions
     {
         UseWebSocket = false
     };
 }
        public static PullReplicationDriverResult Create(ReplicationDriverContext context, IPullReplicationTestStrategy strategy)
        {
            return(new PullReplicationDriverResult
            {
                TestStrategy = strategy,
                ElapsedMilliseconds = context.ReplicationStopwatch.ElapsedMilliseconds,

                // Error info
                Error = context.Aborted,
                ErrorMessage = context.ErrorMessage,
                ErrorDetails = context.ErrorDetails,

                // Database file
                DbDirectory = context.DbDirectory,
                AttachmentStorePath = context.AttachmentStorePath,

                Username = context.Replication.Username
            });
        }
Example #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="testStrategy"></param>
        /// <returns></returns>

        public PullReplicationDriverResult Start(IPullReplicationTestStrategy testStrategy)
        {
            if (testStrategy == null)
            {
                throw new ArgumentNullException("testStrategy");
            }

            ReplicationDriverContext context = null;

            try { context = InternalStart(testStrategy); }
            catch (Exception ex)
            {
                return(new PullReplicationDriverResult
                {
                    ErrorMessage = ex.Message,
                    Error = true
                });
            }

            return(PullReplicationDriverResult.Create(context, testStrategy));
        }
 public void ReplicationStarting(ReplicationDriverContext context)
 {
     context.Replication.Continuous = this._continuous;
 }
 public void ReplicationChanged(ReplicationDriverContext context, ReplicationChangeEventArgs eventArgs)
 {
 }
 public void DatabaseChanged(ReplicationDriverContext context, DatabaseChangeEventArgs eventArgs)
 {
 }
 public void ReplicationChanged(ReplicationDriverContext context, ReplicationChangeEventArgs eventArgs)
 {
     //if(eventArgs.LastError != null)
     //    context.Abort(eventArgs.LastError.Message, eventArgs.LastError.ToString());
 }
 public IAuthenticator CreateAuthenticator(ReplicationDriverContext context)
 {
     return(AuthenticatorFactory.CreateBasicAuthenticator(this._username, this._password));
 }