public override SyncInfo Initialize(DatabaseInfo info) { if (info == null) throw new ArgumentNullException("info"); var details = info.Details; var parts = details.Url.Split('\n'); _client = new WebDavClient( parts[1], parts[2]); _info = new SyncInfo { Path = parts[0], Modified = details.Modified, HasLocalChanges = details.HasLocalChanges, }; info.OpenDatabaseFile(x => { using (var buffer = new MemoryStream()) { BufferEx.CopyStream(x, buffer); _info.Database = buffer.ToArray(); } }); return _info; }
private void InitPars() { var pars = NavigationContext.QueryString; _client = new WebDavClient( pars["user"], pars["pass"]); _path = pars["path"]; _folder = pars["folder"]; }