示例#1
0
        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);
        }
示例#3
0
 private void OnLoadScriptCommand()
 {
     _itemFilterScript = _itemFilterScriptTranslator.TranslateStringToItemFilterScript(Resources.neversinkfilter);
 }