Class MetadataQueryBuilder
Allow to build fluently a query to the metadata provider.
Inherited Members
Namespace: Unity.Cloud.Metadata
Syntax
public class MetadataQueryBuilder
Methods
ExecuteAsync()
Execute the built query by calling the metadata provider
Declaration
public async Task<MatchCollection> ExecuteAsync()
Returns
| Type | Description |
|---|---|
| Task<MatchCollection> | The list of Match |
IncludedIn(IEnumerable<String>)
Add to the query the owner' ids in which to do the lookup
Declaration
public MetadataQueryBuilder IncludedIn(IEnumerable<string> ownerIds)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<String> | ownerIds | The owners' ids |
Returns
| Type | Description |
|---|---|
| MetadataQueryBuilder | The called MetadataQueryBuilder |
Select(IEnumerable<String>)
Add to the query the metadata keys wanted in the output metadata
Declaration
public MetadataQueryBuilder Select(IEnumerable<string> keys)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<String> | keys | An of wanted keys |
Returns
| Type | Description |
|---|---|
| MetadataQueryBuilder | The called MetadataQueryBuilder |
SelectAll()
Set the query to return the full metadata
Declaration
public MetadataQueryBuilder SelectAll()
Returns
| Type | Description |
|---|---|
| MetadataQueryBuilder | The called MetadataQueryBuilder |
SelectOnlyId()
Set the query to return only owner's id
Declaration
public MetadataQueryBuilder SelectOnlyId()
Returns
| Type | Description |
|---|---|
| MetadataQueryBuilder | The called MetadataQueryBuilder |
WhereKeyEquals(IEnumerable<String>, String)
Add to the query the condition that the metadata needs to satisfy
Declaration
public MetadataQueryBuilder WhereKeyEquals(IEnumerable<string> path, string value)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<String> | path | A list representing the path of keys and sub-keys in the metadata |
| String | value | The value that the last keys in the keyHierarchy needs to be equals to |
Returns
| Type | Description |
|---|---|
| MetadataQueryBuilder | The called MetadataQueryBuilder |