Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
 public MultiFileProvider(FileOptionsFromClause fileOptions, DataComparer dataComparer)
 {
     this.fileOptions = fileOptions;
     this.dataComparer = dataComparer;
 }
Ejemplo n.º 3
0
 public DirectoryProvider(FileOptionsFromClause fileOptions, StringComparer stringComparer)
 {
     this.fileOptions = fileOptions;
     this.stringComparer = stringComparer;
 }