AdvantageModuleEngine..::..GetPublishedKeyValueObjects<(Of <(<'T, Y>)>)> Method (String, List<(Of <(<'Guid>)>)>)
Retrieves a list of values of a specified type Y from key-value pairs
based on a provided key name and optional list of master IDs.
Namespace:
AdvantageCMS.Core.Common.EngineAssembly: AdvantageCMS.Core (in AdvantageCMS.Core.dll)
Syntax
Type Parameters
- T
- The type of the business object, inheriting from BusinessObject<(Of <(<'T>)>)>.
- Y
- The type of the value to retrieve (e.g., Int32, Guid, String, etc.).
Parameters
- keyName
- Type: String
The name of the key whose values should be retrieved.
Return Value
A list of values of type Y that match the specified key name and, if provided, the master IDs.Examples
C#
// Example: Retrieving integer values for a specific key name from selected master IDs. var keyValues = GetPublishedKeyValueObjects<BusinessObject, int>("SomeKeyName", new List<Guid> { Guid.Parse("3d9b2f50-9edc-4c7d-9a6c-2e7897d5b50b"), Guid.Parse("b839a4e1-91cd-4d3f-b3ab-8a2fb5d775f2") }); // keyValues will contain a list of integers retrieved based on the key name "SomeKeyName".