public override RowSource GetRowSource(string name, InterCommunicator interCommunicator, params object[] parameters) { switch (name.ToLowerInvariant()) { case FilesTable: return(new FilesSource((string)parameters[0], (bool)parameters[1], interCommunicator)); case DirectoriesTable: return(new DirectoriesSource((string)parameters[0], (bool)parameters[1], interCommunicator)); case ZipTable: return(new ZipSource((string)parameters[0], interCommunicator)); case ProcessesName: return(new ProcessesSource(interCommunicator)); case Self: return(new OsSource()); case DllsTable: return(new DllSource((string)parameters[0], (bool)parameters[1], interCommunicator)); } throw new NotSupportedException($"Unsupported row source {name}"); }
public CsvSource(string filePath, string separator, bool hasHeader, int skipLines, InterCommunicator communicator) { _filePath = filePath; _separator = separator; _hasHeader = hasHeader; _skipLines = skipLines; _communicator = communicator; }
public override RowSource GetRowSource(string name, InterCommunicator communicator, params object[] parameters) { if (_whenChecked == WhenCheckedParameters.OnSchemaTableOrRowSourceGet) { _onGetTableOrRowSource(parameters); } return(new EntitySource <TestEntity>(_entities, new Dictionary <string, int>(), new Dictionary <int, Func <TestEntity, object> >())); }
public override RowSource GetRowSource(string name, InterCommunicator interCommunicator, params object[] parameters) { switch (name.ToLowerInvariant()) { case "file": return(new FlatFileSource((string)parameters[0], interCommunicator)); } throw new SourceNotFoundException(nameof(name)); }
public override RowSource GetRowSource(string name, InterCommunicator interCommunicator, params object[] parameters) { switch (name.ToLowerInvariant()) { case Dual: return(new DualRowSource()); } throw new NotSupportedException(name); }
public override RowSource GetRowSource(string name, InterCommunicator interCommunicator, params object[] parameters) { switch (name.ToLowerInvariant()) { case FileTable: parameters[3] = Convert.ToInt32(parameters[3]); return((CsvSource)Activator.CreateInstance(typeof(CsvSource), parameters.ExpandParameters(interCommunicator))); } throw new NotSupportedException(); }
public override RowSource GetRowSource(string name, InterCommunicator interCommunicator, params object[] parameters) { switch (name.ToLowerInvariant()) { case "interval": return(new TimeSource(DateTimeOffset.Parse((string)parameters[0]), DateTimeOffset.Parse((string)parameters[1]), (string)parameters[2], interCommunicator)); } throw new NotSupportedException($"Table {name} not found."); }
public override RowSource GetRowSource(string name, InterCommunicator interCommunicator, params object[] parameters) { switch (name) { case "commits": return(new CommitsSource((string)parameters[0], SchemaGitHelper.CommitsNameToIndexMap, SchemaGitHelper.CommitsIndexToMethodAccessMap)); case "tags": return(new TagsSource((string)parameters[0], SchemaGitHelper.TagsNameToIndexMap, SchemaGitHelper.TagsIndexToMethodAccessMap)); case "branches": return(new BranchesSource((string)parameters[0], SchemaGitHelper.BranchesNameToIndexMap, SchemaGitHelper.BranchesIndexToMethodAccessMap)); } throw new NotSupportedException(name); }
public TimeSource(DateTimeOffset startAt, DateTimeOffset stopAt, string resolution, InterCommunicator communicator) { _startAt = startAt; _resolution = resolution.ToLowerInvariant(); switch (_resolution) { case "seconds": _stopAt = stopAt.Add(TimeSpan.FromMilliseconds(1)); break; case "minutes": _stopAt = stopAt.AddSeconds(1); break; case "hours": _stopAt = stopAt.AddMinutes(1); break; case "days": _stopAt = stopAt.AddHours(1); break; case "months": _stopAt = stopAt.AddDays(1); break; case "years": _stopAt = stopAt.AddMonths(1); break; default: throw new NotSupportedException($"Chosen resolution '{_resolution}' is not supported."); } _communicator = communicator; }
public FilesSource(string path, bool useSubDirectories, InterCommunicator communicator) { _communicator = communicator; _source = new DirectorySourceSearchOptions(path, useSubDirectories); }
public FlatFileSource(string filePath, InterCommunicator communicator) { _filePath = filePath; _communicator = communicator; }
public DirectoriesSource(string path, bool recursive, InterCommunicator communicator) { _communicator = communicator; _source = new DirectorySourceSearchOptions(path, recursive); }
public abstract RowSource GetRowSource(string name, InterCommunicator communicator, params object[] parameters);
public ZipSource(string zipPath, InterCommunicator communicator) { _zipPath = zipPath; _communicator = communicator; }
public override RowSource GetRowSource(string name, InterCommunicator interCommunicator, params object[] parameters) { return(new TransientVariableSource(name)); }
public DllSource(string path, bool useSubDirectories, InterCommunicator communicator) : base(path, useSubDirectories, communicator) { }
public override RowSource GetRowSource(string name, InterCommunicator communicator, params object[] parameters) { return(new JsonSource((string)parameters[0], communicator)); }
public override RowSource GetRowSource(string name, InterCommunicator interCommunicator, params object[] parameters) { return(new TableMetadataSource(_columns)); }
public TestDirectoriesSource(string path, bool recursive, InterCommunicator communicator) : base(path, recursive, communicator) { }
public ProcessesSource(InterCommunicator communicator) { _communicator = communicator; }
public override RowSource GetRowSource(string name, InterCommunicator interCommunicator, params object[] parameters) { return(new EntitySource <T>(_sources, TestNameToIndexMap, TestIndexToObjectAccessMap)); }