I'm trying to use ResourceManagerHelper and ResourceExposers to get all resources with a specific discrete capability. I don't want to use the GetEligibleResources method because I don't care about the current usage/reservations of the resource.
I think I need the following code to build the FilterElement, but I'm stuck at this point.
ResourceExposers.Capabilities.DiscreteCapability(profileParameterGuid)...
My capability has discrete values "True" and "False" defined. I want to find resources where this capability is set to "True".
Can you help me finish building the FilterElement?
Hi Thomas,
The DiscreteCapability filter can be used as follows:
// Get all resources with a certain discrete option var encodingQualityParameterId = Guid.Parse("..."); // GUID of the profile parameter FilterElement<Resource> filter = ResourceExposers.Capabilities.DiscreteCapability(encodingQualityParameterId).Contains("UHD"); var resources = helper.GetResources(filter);
The reason why the "Contains" method is being used on discretes is because a resource could also support multiple discreets, i.e. SD and HD.