public static IProvider Get(FileOptionsFromClause fileOptions, DataComparer dataComparer)
        {
            string fileName;
            if (fileOptions.FileName is ConstExpression<DataString>)
                fileName = fileOptions.FileName.EvaluateAsData (null).ToDataString (dataComparer.CultureInfo);
            else
                fileName = null;

            IProvider provider;
            if (fileName == null || fileName.Contains ("*") || fileName.Contains ("?") || fileOptions.Recurse) {
                provider = new MultiFileProvider (
                    fileOptions,
                    dataComparer);
            } else {
                provider = Get (fileName, fileOptions.Skip);
            }

            return provider;
        }
Beispiel #2
0
 public MultiFileProvider(FileOptionsFromClause fileOptions, DataComparer dataComparer)
 {
     this.fileOptions = fileOptions;
     this.dataComparer = dataComparer;
 }
Beispiel #3
0
 public DirectoryProvider(FileOptionsFromClause fileOptions, StringComparer stringComparer)
 {
     this.fileOptions = fileOptions;
     this.stringComparer = stringComparer;
 }