I am instantiating a Geodatabase using the ServiceConnectionProperties constructor, which contains the url of a map service. If I call GetDefinitions() (for either TableDefinition or FeatureClassDefinition), the method returns an empty list.
However, I am able to access specific tables and their definitions using OpenDataset() and GetDefinition().
Through tinkering in Visual Studio's immediate window, I have found that if I call OpenDataset() on a specific table, then THAT table's definition will appear in the results of GetDefinitions(). For example, I have a map service with 19 feature classes. If I call OpenDataset() on 8 of those feature classes, then those 8 - and only those 8 - will appear in the results of GetDefinitions().
I was hoping to use the workflow described in other threads related to fetching data from map services: I have a string that likely matches an alias of one of the map service's feature classes or tables. I call GetDefinitions() to get all of the table definitions, and then call GetAlias() for each of those definitions, so that I can match the alias. This is still technically possible with a workaround (call GetDefinition("0"), GetDefinition("1"), etc. until I either find a match or until that causes an Exception), but it'd be nice to actually get all of the definitions off the bat.
Is this a bug? Something potentially wrong with the way the Map Service is set up? I would assume the latter isn't the case, as I've been testing using the ESRI World_Imagery service.
Edit - here is the Map Service I'm using to test: https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer