public ItemFilterScript LoadItemFilterScript(string filePath) { var script = _itemFilterScriptTranslator.TranslateStringToItemFilterScript( _fileSystemService.ReadFileAsString(filePath)); script.FilePath = filePath; return(script); }
public async Task <ItemFilterScript> LoadItemFilterScriptAsync(string filePath) { ItemFilterScript loadedScript = null; await Task.Run(() => { loadedScript = _itemFilterScriptTranslator.TranslateStringToItemFilterScript( _fileSystemService.ReadFileAsString(filePath)); }); if (loadedScript != null) { loadedScript.FilePath = filePath; } return(loadedScript); }
private void OnLoadScriptCommand() { _itemFilterScript = _itemFilterScriptTranslator.TranslateStringToItemFilterScript(Resources.neversinkfilter); }