public static int Main(string[] args) { if (projectId == "YOUR-PROJECT" + "-ID") { Console.WriteLine("Edit TableAdmin.cs and replace YOUR-PROJECT-ID with your project id."); return(-1); } if (instanceId == "YOUR-INSTANCE" + "-ID") { Console.WriteLine("Edit TableAdmin.cs and replace YOUR-INSTANCE-ID with your instance id."); return(-1); } var verbMap = new VerbMap <object>(); verbMap .Add((CreateTableOptions opts) => CreateTable(opts.tableId)) .Add((ListTablesOptions opts) => ListTables()) .Add((GetTableOptions opts) => GetTable(opts.tableId)) .Add((CreateMaxAgeFamilyOptions opts) => CreateMaxAgeFamily(opts.tableId)) .Add((CreateMaxVersionsFamilyOptions opts) => CreateMaxVersionsFamily(opts.tableId)) .Add((CreateUnionFamilyOptions opts) => CreateUnionFamily(opts.tableId)) .Add((CreateIntersectionFamilyOptions opts) => CreateIntersectionFamily(opts.tableId)) .Add((CreateNestedFamilyOptions opts) => CreateNestedFamily(opts.tableId)) .Add((UpdateFamilyOptions opts) => UpdateFamily(opts.tableId)) .Add((DeleteFamilyOptions opts) => DeleteFamily(opts.tableId)) .Add((DeleteTableOptions opts) => DeleteTable(opts.tableId)) .NotParsedFunc = (err) => 1; return((int)verbMap.Run(args)); }
// [END video_analyze_explicit_content] public static void Main(string[] args) { var verbMap = new VerbMap <object>() .Add((AnalyzeShotsOptions opts) => AnalyzeShotsGcs(opts.Uri)) .Add((AnalyzeExplicitContentOptions opts) => AnalyzeExplicitContentGcs(opts.Uri)) .Add((AnalyzeLabelsOptions opts) => IsStorageUri(opts.Uri) ? AnalyzeLabelsGcs(opts.Uri) : AnalyzeLabels(opts.Uri)) .SetNotParsedFunc((errs) => 1); verbMap.Run(args); }
public static int Main(string[] args) { var verbMap = new VerbMap <object>(); verbMap .Add((CreateOptions opts) => Create( opts.projectId, opts.instanceId, opts.databaseId)) .NotParsedFunc = (err) => 1; return((int)verbMap.Run(args)); }
// [END video_object_tracking] public static void Main(string[] args) { var verbMap = new VerbMap <object>() .Add((AnalyzeShotsOptions opts) => AnalyzeShotsGcs(opts.Uri)) .Add((AnalyzeExplicitContentOptions opts) => AnalyzeExplicitContentGcs(opts.Uri)) .Add((AnalyzeLabelsOptions opts) => IsStorageUri(opts.Uri) ? AnalyzeLabelsGcs(opts.Uri) : AnalyzeLabels(opts.Uri)) .Add((TranscribeOptions opts) => TranscribeVideo(opts.Uri)) .Add((DetectTextOptions opts) => IsStorageUri(opts.Uri) ? DetectTextGcs(opts.Uri) : DetectText(opts.Uri)) .Add((TrackObjectOptions opts) => IsStorageUri(opts.Uri) ? TrackObjectGcs(opts.Uri) : TrackObject(opts.Uri)) .SetNotParsedFunc((errs) => 1); verbMap.Run(args); }
public static int Main(string[] args) { var verbMap = new VerbMap <object>(); verbMap .Add((CreateSampleDatabaseOptions opts) => CreateSampleDatabase(opts.projectId, opts.instanceId, opts.databaseId)) .Add((InsertPlayerOptions opts) => InsertPlayers( opts.projectId, opts.instanceId, opts.databaseId)) .Add((InsertScoresOptions opts) => InsertScores( opts.projectId, opts.instanceId, opts.databaseId)) .NotParsedFunc = (err) => 1; return((int)verbMap.Run(args)); }
public static int Main(string[] args) { var verbMap = new VerbMap <object>(); verbMap .Add((CreateOptions opts) => Create( opts.projectId, opts.instanceId, opts.databaseId)) .Add((InsertOptions opts) => Insert( opts.projectId, opts.instanceId, opts.databaseId, opts.insertType)) .Add((QueryOptions opts) => Query( opts.projectId, opts.instanceId, opts.databaseId, opts.timespan)) .Add((DeleteOptions opts) => Delete( opts.projectId, opts.instanceId, opts.databaseId)) .NotParsedFunc = (err) => 1; return((int)verbMap.Run(args)); }
public static int Main(string[] args) { var verbMap = new VerbMap <object>(); verbMap .Add((CreateSampleDatabaseOptions opts) => CreateSampleDatabase(opts.projectId, opts.instanceId, opts.databaseId)) .Add((InsertPlayerOptions opts) => InsertPlayers( opts.projectId, opts.instanceId, opts.databaseId)) .Add((InsertScoresOptions opts) => InsertScores( opts.projectId, opts.instanceId, opts.databaseId)) .Add((QueryTopTenAllTimeOptions opts) => QueryTopTenAllTime( opts.projectId, opts.instanceId, opts.databaseId)) .Add((QueryTopTenWithTimespanOptions opts) => QueryTopTenWithTimespan( opts.projectId, opts.instanceId, opts.databaseId, opts.timespan)) return((int)verbMap.Run(args)); }
public static int Main(string[] args) { var verbMap = new VerbMap <object>(); verbMap .Add((CreatePlanetsDatabaseOptions opts) => CreatePlanetsDatabase(opts.projectId, opts.instanceId, opts.databaseId)) .Add((InsertPlanetOptions opts) => InsertPlanet(opts.projectId, opts.instanceId, opts.databaseId, opts.planetName, opts.planetValue)) .Add((BatchInsertPlanetsOptions opts) => BatchInsertPlanets(opts.projectId, opts.instanceId, opts.databaseId, opts.csvFile)) .Add((BatchInsertPlayersOptions opts) => BatchInsertPlayers(opts.projectId, opts.instanceId, opts.databaseId)) .Add((RunPlanetAuctionOptions opts) => RunPlanetAuction(opts.projectId, opts.instanceId, opts.databaseId, opts.numberOfShares, opts.showConsoleOutput)) .NotParsedFunc = (err) => 1; return((int)verbMap.Run(args)); }