IContentSelector::GetContent

Ee797748.c++_off(en-US,CS.10).gifEe797748.vb_on(en-US,CS.10).gif

Use this method to execute a Content Selection pipeline and return the resulting content in a SimpleList object.

Definition

HRESULT IContentSelector::get_GetContent(IDictionary* pdictCSFContext,ISimpleList** ppLstContent);

Parameters

pdictCSFContext

[in] A pointer to a global context dictionary with a configuration for an instance of a CSF application. The dictionary contains global objects and configurations used by the ContentSelector object. At a minimum, the dictionary must contain the Pipeline key so that the ContentSelector object knows which pipeline to execute.

ppLstContent

[out, retval] A pointer to a SimpleList object containing the selected content. The elements of the SimpleList object are HTML or XML strings.

Return Values

This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

Error Values

This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

Ee797748.note(en-US,CS.10).gif Note

  • This method can also return an error returned by the invoked pipeline.

Remarks

The ContentSelector object reads the Pipeline key of the passed in dictionary object to find the pipeline object to invoke. It copies the values of the dictionary passed to it into a new dictionary. The new dictionary is passed to the pipeline as the pipe Context dictionary. An empty dictionary is created and passed as the Order dictionary for the pipeline. The ContentSelector object adds a reference to itself under the ContextProfile key in the pipe Context dictionary.

When pipeline execution has completed, the ContentSelector object looks for the key _formatted in the Order dictionary, and returns the list assigned to that key as the return value. If the list assigned to the _formatted key does not exist, an empty list is created and returned. The self-reference in the pipe Context dictionary is removed to prevent a circular reference. References to the Order and Context dictionaries are added to the ContentSelector object before it returns, giving the page access to the values written into those dictionaries by the pipeline.

See Also

CacheManager Object

Content Selection Pipelines

ContentSelector Object


All rights reserved.