public Replicator(ReplicatorContext context) { this.Context = context; this.actions = new List <SyncAction>(); if (context.IgnoreCertificateErrors) { ServicePointManager.ServerCertificateValidationCallback = (sender, cert, chain, errors) => { return(true); }; } if (ReplicatorContext.IsRunningOnMono) { Environment.SetEnvironmentVariable("MONO_IOMAP", "all"); } if (!context.Recover && context.IsRunning) { throw new AnotherInstanceIsRunningException(); } context.IsRunning = true; context.DataDirectory.Create(); context.Persist(); }
public SyncActionListBuilder(ReplicatorContext context) { this.Context = context; this.ActionDictionary = new Dictionary <string, SyncAction>(); this.Actions = new List <SyncAction>(); this.TypeChooser = this.CreateSyncActionTypeChooser(); }
public async Task Reconstruct(ReplicatorContext context) { this.LocalPath = context.LocalPath + this.CommonPath; this.RemotePath = context.RemotePath + this.CommonPath; if (this.Type == SyncActionType.Download) { this.Remote = await context.CloudService.FileSelectAsync(this.RemotePath); } else if (this.Type == SyncActionType.Upload) { this.Local = await context.LocalFilesystem.FileSelectAsync(this.LocalPath); } }
public DropboxService(ReplicatorContext context) { this.context = context; }
public SyncActionTypeChooserTwoWay(ReplicatorContext context) { this.context = context; }
public LocalFilesystemService(ReplicatorContext context) { this.context = context; }