Share via


Create Method (MarketingServiceAgent)

Creates a new instance of the MarketingContext class using the specified Marketing Web service in Agent mode.

Namespace:  Microsoft.CommerceServer.Marketing
Assembly:  Microsoft.CommerceServer.Marketing.CrossTierTypes (in Microsoft.CommerceServer.Marketing.CrossTierTypes.dll)

Syntax

'Declaration
Public Shared Function Create ( _
    agent As MarketingServiceAgent _
) As MarketingContext
'Usage
Dim agent As MarketingServiceAgent
Dim returnValue As MarketingContext

returnValue = MarketingContext.Create(agent)
public static MarketingContext Create(
    MarketingServiceAgent agent
)
public:
static MarketingContext^ Create(
    MarketingServiceAgent^ agent
)
public static function Create(
    agent : MarketingServiceAgent
) : MarketingContext

Parameters

Return Value

Type: Microsoft.CommerceServer.Marketing..::.MarketingContext
An object used to mange CampaignItem, Customer, DisplaySizeDisplayTemplate, Expression, IndustryCode, MailingList, PageGroup, profile definitions and site terms, and PromoCodeDefinition, entities.

Exceptions

Exception Condition
FileNotFoundException

The dynamically loaded assembly containing the MarketingContext Agent implementation could not be loaded. The inner exception contains more details of the exception.

Remarks

MarketingContext is often referred to as the Marketing System Agent object, since it is used to communicate with a Web service. The MarketingContext objects uses the services of a MarketingServiceAgent to negotiate an appropriate authentication method with the Marketing Web service and manages authentication credentials used to authenticate the user to the service. It is also possible to manage Web service authentication credentials manually. This can be done by explicitly setting Credentials before constructing the MarketingContext object.

Permissions

See Also

Reference

MarketingContext Class

MarketingContext Members

Create Overload

Microsoft.CommerceServer.Marketing Namespace