AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

AdvantageModuleEngine..::..GetPublishedKeyValueObjects<(Of <(<'T, Y>)>)> Method (String)

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.Engine
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public List<Y> GetPublishedKeyValueObjects<T, Y>(
	string keyName
)
where T : BusinessObject<T>, BusinessObject<T>

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


Sample usage:
C#
// Example: Retrieving integer values for a specific key name from selected master IDs.
var keyValues = GetPublishedKeyValueObjects<BusinessObject, int>("SomeKeyName");
// keyValues will contain a list of integers retrieved based on the key name "SomeKeyName".