Поделиться через


Create Method (String, String, AuthorizationMode)

Creates a new instance of the MarketingContext class using the specified Marketing Web service in Database mode and authorization policy configuration to manager authorization credentials.

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

Syntax

'Declaration
Public Shared Function Create ( _
    siteName As String, _
    authorizationPolicyFullPath As String, _
    authorizationMode As AuthorizationMode _
) As MarketingContext
'Usage
Dim siteName As String
Dim authorizationPolicyFullPath As String
Dim authorizationMode As AuthorizationMode
Dim returnValue As MarketingContext

returnValue = MarketingContext.Create(siteName, _
    authorizationPolicyFullPath, authorizationMode)
public static MarketingContext Create(
    string siteName,
    string authorizationPolicyFullPath,
    AuthorizationMode authorizationMode
)
public:
static MarketingContext^ Create(
    String^ siteName, 
    String^ authorizationPolicyFullPath, 
    AuthorizationMode authorizationMode
)
public static function Create(
    siteName : String, 
    authorizationPolicyFullPath : String, 
    authorizationMode : AuthorizationMode
) : MarketingContext

Parameters

  • siteName
    Type: System..::.String
    The name of Commerce Server site that the current instance represents.
  • authorizationPolicyFullPath
    Type: System..::.String
    The path to authorization policy XML file.

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.

Remarks

A static overloaded method to create Local-mode or Remote-mode Marketing system objects used to run against the Marketing Web Service.

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