Class MatchCollection
Represents the sets of successful metadata matches found by a query.
Implements
Inherited Members
Namespace: Unity.Cloud.Metadata
Assembly: solution.dll
Syntax
public class MatchCollection : IReadOnlyDictionary<InstanceId, MetadataObject>, IReadOnlyCollection<KeyValuePair<InstanceId, MetadataObject>>, IEnumerable<KeyValuePair<InstanceId, MetadataObject>>, IEnumerable
Properties
Count
Gets the number of elements in the collection.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int | The number of elements in the collection. |
this[InstanceId]
Gets the element that has the specified key in the read-only dictionary.
Declaration
public MetadataObject this[InstanceId key] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| InstanceId | key | The key to locate. |
Property Value
| Type | Description |
|---|---|
| MetadataObject | The element that has the specified key in the read-only dictionary. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| KeyNotFoundException | The property is retrieved and |
Keys
Gets an enumerable collection that contains the keys in the read-only dictionary.
Declaration
public IEnumerable<InstanceId> Keys { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<InstanceId> | An enumerable collection that contains the keys in the read-only dictionary. |
Values
Gets an enumerable collection that contains the values in the read-only dictionary.
Declaration
public IEnumerable<MetadataObject> Values { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<MetadataObject> | An enumerable collection that contains the values in the read-only dictionary. |
Methods
ContainsKey(InstanceId)
Determines whether the owner ID appears in the match collection.
Declaration
public bool ContainsKey(InstanceId key)
Parameters
| Type | Name | Description |
|---|---|---|
| InstanceId | key | The ownerId |
Returns
| Type | Description |
|---|---|
| bool |
|
GetEnumerator()
Returns an enumerator that can be used to iterate through the collection.
Declaration
public IEnumerator<KeyValuePair<InstanceId, MetadataObject>> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<KeyValuePair<InstanceId, MetadataObject>> | A IEnumerator<T> that can be used to iterate through the collection. |
TryGetValue(InstanceId, out MetadataObject)
Tries to get the MetadataObject with the specified ownerId.
Declaration
public bool TryGetValue(InstanceId key, out MetadataObject value)
Parameters
| Type | Name | Description |
|---|---|---|
| InstanceId | key | The ownerId. |
| MetadataObject | value | The value. |
Returns
| Type | Description |
|---|---|
| bool |
|