private long downloadDataPackage(string packageZipFilePath) { using (var fileWriteStream = IoMethods.GetFileStreamForWrite(packageZipFilePath)) { ConfigurationLogic.ExecuteIsuServiceMethod( channel => { using (var networkStream = channel.DownloadDataPackage(ConfigurationLogic.SystemManagerAccessToken, Id)) networkStream.CopyTo(fileWriteStream); }, "data package download"); return(fileWriteStream.Length); } }