private BoxedValue GetDirectoryFiles(BoxedValue options) { var directoryPath = options.SimpleProperty<string>("directory"); var searchPattern = "*.*"; if (options.Has("pattern")) searchPattern = options.SimpleProperty<string>("pattern"); var recurse = SearchOption.TopDirectoryOnly; if (options.Has("recurse")) recurse = SearchOption.AllDirectories; var files = Directory.GetFiles(directoryPath, searchPattern, recurse); return files.ToBoxedValue(context.Environment); }
public static void TaskFunction(BoxedValue options) { var paths = options.ComplexProperty("Paths").ToArray<string>(); var numberOfRetries = options.SimpleProperty<double>("NumberOfRetries"); System.Console.WriteLine(numberOfRetries); TaskFunction(paths); }