Class MetadataSearchCriteria
Inherited Members
Namespace: Unity.Cloud.Assets
Assembly: Unity.Cloud.Assets.dll
Syntax
public sealed class MetadataSearchCriteria : BaseSearchCriteria
Constructors
MetadataSearchCriteria(string, string)
Declaration
public MetadataSearchCriteria(string propertyName, string searchKey)
Parameters
Type | Name | Description |
---|---|---|
string | propertyName | |
string | searchKey |
Methods
Clear()
Clears the criteria fields.
Declaration
public override void Clear()
Overrides
WithFuzzyValue(string, string)
Sets the search criteria for the metadata text field.
Declaration
[Obsolete("Fuzzy search on text metadata is not supported.")]
public void WithFuzzyValue(string metadataFieldKey, string value)
Parameters
Type | Name | Description |
---|---|---|
string | metadataFieldKey | The key of the metadata field. |
string | value | The approximate value of the text field. |
WithNumberValue(string, NumericRangePredicate)
Sets the search criteria for the metadata number field.
Declaration
public void WithNumberValue(string metadataFieldKey, NumericRangePredicate numericRangePredicate)
Parameters
Type | Name | Description |
---|---|---|
string | metadataFieldKey | The key of the metadata number field. |
NumericRangePredicate | numericRangePredicate | The predicate to match to the metadata number field. |
Remarks
Only supported for system metadata.
WithTextValue(string, StringPredicate)
Sets the search criteria for the metadata text field.
Declaration
public void WithTextValue(string metadataFieldKey, StringPredicate stringPredicate)
Parameters
Type | Name | Description |
---|---|---|
string | metadataFieldKey | The key of the metadata text field. |
StringPredicate | stringPredicate | The predicate to match to the metadata text field. |
Remarks
Does not currently support wildcard, regex, or fuzzy search. Only use prefix and exact match.
WithTimestampValue(string, DateTime, bool, DateTime, bool)
Sets the search criteria for the metadata date time field.
Declaration
public void WithTimestampValue(string metadataFieldKey, DateTime min = default, bool inclusiveOfMin = true, DateTime max = default, bool inclusiveOfMax = true)
Parameters
Type | Name | Description |
---|---|---|
string | metadataFieldKey | The key of the metadata text field. |
DateTime | min | The minimum value of the date range. |
bool | inclusiveOfMin | Whether the minimum value is inclusive. |
DateTime | max | The maximum value of the date range. |
bool | inclusiveOfMax | Whether the maximum value is inclusive. |
WithValue(string, string, SearchOptions)
Sets the search criteria for the metadata text field.
Declaration
[Obsolete("Use WithTextValue(string, StringPredicate) instead.")]
public void WithValue(string metadataFieldKey, string value, StringSearchCriteria.SearchOptions options)
Parameters
Type | Name | Description |
---|---|---|
string | metadataFieldKey | The key of the metadata field. |
string | value | The expected value of the text field. |
StringSearchCriteria.SearchOptions | options | The search options. |
WithValue(string, Regex)
Sets the search criteria for the metadata text field.
Declaration
[Obsolete("Regex search on text metadata is not supported.")]
public void WithValue(string metadataFieldKey, Regex pattern)
Parameters
Type | Name | Description |
---|---|---|
string | metadataFieldKey | The key of the metadata field. |
Regex | pattern | The expected pattern of the text field. |
WithValue(string, MetadataValue)
Sets the search criteria for the metadata field.
Declaration
public void WithValue(string metadataFieldKey, MetadataValue value)
Parameters
Type | Name | Description |
---|---|---|
string | metadataFieldKey | The key of the metadata field. |
MetadataValue | value | The expected value of the field. |