asked on February 15, 2018
•
Show version history
I set up the following function to export a volume using repository access:
public bool export(string volumeName, string volumePath) { try { VolumeInfo vi = Volume.GetInfo(volumeName, _lfSess); VolumeExportSettings veSettings = new VolumeExportSettings(); veSettings.Path = volumePath; LongOperation longOp = vi.Export(veSettings); while (longOp.IsCompleted != true) { System.Threading.Thread.Sleep(5000); Console.Write("."); } } catch (Exception) { return false; } return true; }
The volume exports just fine but "longOp" never receives any values other than "isOpen" which is set to true. Without the "IsCompleted" notification, the loop just keeps running long after the volume is exported. Am I missing something about how this is supposed to work?
0
0