Class MetadataRepository
Allows querying of geometric metadata from an asset dataset. Can be used to call either the cloud API or a local database.
Implements
Inherited Members
Namespace: Unity.Cloud.Metadata
Assembly: solution.dll
Syntax
public class MetadataRepository : IMetadataRepository
Constructors
MetadataRepository(IServiceHttpClient, IServiceHostResolver, ProjectId, AssetId, DatasetId)
Initializes and returns an instance of IMetadataRepository.
Declaration
public MetadataRepository(IServiceHttpClient serviceHttpClient, IServiceHostResolver serviceHostResolver, ProjectId projectId, AssetId assetId, DatasetId datasetId)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceHttpClient | serviceHttpClient | The HTTP client from which to request the app information. |
| IServiceHostResolver | serviceHostResolver | The IServiceHostResolver for determining the service URL. |
| ProjectId | projectId | The ID of the project. |
| AssetId | assetId | The ID of the assets. |
| DatasetId | datasetId | The ID of the dataset. |
Methods
GetAllKeysAsync()
Gets a list of all the possible root keys in the objects contained in the dataset.
Declaration
public Task<IEnumerable<string>> GetAllKeysAsync()
Returns
| Type | Description |
|---|---|
| Task<IEnumerable<string>> | The list of possible root keys in the dataset's metadata. |
GetMetadataAsync(GetMetadataParameters, CancellationToken)
Gets a list of Match in the dataset from a list of owners ID.
Declaration
public Task<MatchCollection> GetMetadataAsync(GetMetadataParameters parameters, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| GetMetadataParameters | parameters | The parameters containing the filter's conditions to extract only records that fulfill them. |
| CancellationToken | cancellationToken | A cancellation token |
Returns
| Type | Description |
|---|---|
| Task<MatchCollection> | The list of Match. |