protected bool TryParseCommonArgs(string localStorePath, out FlowContext flowContext) { if (Tables.Length == 0) { Tables = "*"; } if (localStorePath.Length == 0) { localStorePath = "."; } var tables = Tables == "*" ? Array.Empty <string>() : Tables.Split(',', StringSplitOptions.RemoveEmptyEntries).Select(s => s.Trim()).ToArray(); if (!TryGetConfig(out var config)) { flowContext = null !; return(false); } var remoteStore = CreateGiantBombStore(config); var localStore = new LocalJsonTableStore(Path.GetFullPath(localStorePath)); flowContext = new FlowContext(localStore, remoteStore, tables, config); return(true); }
public FlowContext( LocalJsonTableStore localStore, IReadOnlyTableStore remoteStore, IReadOnlyList <string> tables, Config config) { LocalStore = localStore; RemoteStore = remoteStore; Tables = tables; Config = config; }