// TODO(Craig): Make this more intelligent private FileInfo[] GetPackageFiles(string package) { var directoryInfo = Directory.Exists(package) ? new DirectoryInfo(package) : null; if (directoryInfo == null) { Alchemist.LogError($"Package directory \"{package}\" doesn't exist."); return(Array.Empty <FileInfo>()); } return(directoryInfo.GetFiles("*.ele", SearchOption.AllDirectories)); }
protected override int ExecuteImplementation() { var function = _sourceContext.GlobalScope.GetFunction(Function, _compilationContext); if (function == null) { Alchemist.LogError($"Could not find function \"{Function}\"."); return(1); } var output = function.EvaluateAndSerialize(Arguments.ToArray(), _compilationContext); var asString = string.Join(", ", output).Replace("∞", "Infinity"); Alchemist.Log(asString); return(0); }