/// <summary> /// Creates a SyncServer instance that the SyncManager can use to /// synchronize with this service. This method is called during /// every synchronization process. If the same SyncServer object /// is returned here, it should be reset as if it were new. /// </summary> public override SyncServer CreateSyncServer() { SyncServer server = null; string syncPath; if (GetConfigSettings(out syncPath)) { path = syncPath; if (Directory.Exists(path) == false) { try { Directory.CreateDirectory(path); } catch (Exception e) { throw new Exception("Could not create \"" + path + "\": " + e.Message); } } byte[] key = Util.GetBytes("passwordWRONG"); server = new EncryptedFileSystemSyncServer(path, key, null); } else { throw new InvalidOperationException("EncryptedFileSystemSyncServiceAddin.CreateSyncServer () called without being configured"); } return(server); }
/// <summary> /// Creates a SyncServer instance that the SyncManager can use to /// synchronize with this service. This method is called during /// every synchronization process. If the same SyncServer object /// is returned here, it should be reset as if it were new. /// </summary> public override SyncServer CreateSyncServer() { SyncServer server = null; string syncPath; if (GetConfigSettings (out syncPath)) { path = syncPath; if (Directory.Exists (path) == false) { try { Directory.CreateDirectory (path); } catch (Exception e) { throw new Exception ("Could not create \"" + path + "\": " + e.Message); } } byte[] key = Util.GetBytes("passwordWRONG"); server = new EncryptedFileSystemSyncServer(path, key, null); } else { throw new InvalidOperationException ("EncryptedFileSystemSyncServiceAddin.CreateSyncServer () called without being configured"); } return server; }