What is the difference between Producer and ProducerContent in Delphi?

157 Views Asked by At

In Delphi, TWebActionItem.Producer and TWebActionItem.ProducerContent properties are used in Web Brokers to generates the content of response messages when the action item executes.

What is the difference between TWebActionItem.Producer and TWebActionItem.ProducerContent? And which one should we use?

1

There are 1 best solutions below

0
Ken White On BEST ANSWER

From the TWebActionItem.ProducerContent documentation:

This property is identical to Producer except for the type of content producer. ProducerContent is used when the producer is of type IProduceContent instead of TCustomContentProducer. In the latter case, the property Producer is set instead. Note that Producer and ProducerContent are mutually exclusive; if one is set, the other must not be.

So you should use whichever one is appropriate for the type of the producer of the response content. If that producer is of type IProduceContent, you use ProducerContent; if the producer is a ICustomerContentProducer type, you'd use Producer instead.