private void bgwCreateFFMSIndexBatchFile_DoWork(object sender, DoWorkEventArgs e) { IFFMSIndexBatchFileWriteService batchFileWriteService = e.Argument as FFMSIndexBatchFileWriteService; batchFileWriteService.Write(); e.Result = batchFileWriteService; }