public Task <Stream> ExportInstances(string authenticationCookie, string[] instanceUIDs, ExportOptions options) { return(Task.Factory.StartNew <Stream>(() => { var userName = AuthHandler.Authorize(authenticationCookie, PermissionsTable.Instance.CanExport); var zip = _exportAddin.ExportInstances(userName, instanceUIDs, options); return zip; })); }
public string ExportInstances(string authenticationCookie, string[] instanceUIDs, ExportOptions options) { Stream zip; var userName = ServiceUtils.Authorize(authenticationCookie, PermissionsTable.Instance.CanExport); zip = _exportAddin.ExportInstances(userName, instanceUIDs, options); return(SaveZip("Instances", zip)); }