public void CreateSessionWithCompressionEnabled(
string canonical_name,
string localPath,
string remoteFolderPath,
string url,
string user,
string password,
string repositoryId,
string binding)
{
Dictionary<string, string> cmisParameters = new Dictionary<string, string>();
if (binding.Equals(BindingType.AtomPub, StringComparison.OrdinalIgnoreCase)) {
cmisParameters[SessionParameter.BindingType] = BindingType.AtomPub;
cmisParameters[SessionParameter.AtomPubUrl] = url;
} else if (binding.Equals(BindingType.Browser, StringComparison.OrdinalIgnoreCase)) {
cmisParameters[SessionParameter.BindingType] = BindingType.Browser;
cmisParameters[SessionParameter.BrowserUrl] = url;
}
cmisParameters[SessionParameter.User] = user;
cmisParameters[SessionParameter.Password] = password;
cmisParameters[SessionParameter.RepositoryId] = repositoryId;
cmisParameters[SessionParameter.Compression] = bool.TrueString;
// Sets the Connect Timeout to 60 secs
cmisParameters[SessionParameter.ConnectTimeout] = "60000";
// Sets the Read Timeout to 60 secs
cmisParameters[SessionParameter.ReadTimeout] = "60000";
SessionFactory.NewInstance().CreateSession(cmisParameters);
}
}