Create Method (String, String, AuthorizationMode, Int32, Int32, Int32, Int32)
Initializes a new instance of the MarketingContext class using the specified Marketing System 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, _
sqlCommandTimeoutSeconds As Integer, _
sqlLongRunningCommandTimeoutSeconds As Integer, _
sqlPcgCommandTimeoutSeconds As Integer, _
sqlPcgLongRunningCommandTimeoutSeconds As Integer _
) As MarketingContext
'Usage
Dim siteName As String
Dim authorizationPolicyFullPath As String
Dim authorizationMode As AuthorizationMode
Dim sqlCommandTimeoutSeconds As Integer
Dim sqlLongRunningCommandTimeoutSeconds As Integer
Dim sqlPcgCommandTimeoutSeconds As Integer
Dim sqlPcgLongRunningCommandTimeoutSeconds As Integer
Dim returnValue As MarketingContext
returnValue = MarketingContext.Create(siteName, _
authorizationPolicyFullPath, authorizationMode, _
sqlCommandTimeoutSeconds, sqlLongRunningCommandTimeoutSeconds, _
sqlPcgCommandTimeoutSeconds, sqlPcgLongRunningCommandTimeoutSeconds)
public static MarketingContext Create(
string siteName,
string authorizationPolicyFullPath,
AuthorizationMode authorizationMode,
int sqlCommandTimeoutSeconds,
int sqlLongRunningCommandTimeoutSeconds,
int sqlPcgCommandTimeoutSeconds,
int sqlPcgLongRunningCommandTimeoutSeconds
)
public:
static MarketingContext^ Create(
String^ siteName,
String^ authorizationPolicyFullPath,
AuthorizationMode authorizationMode,
int sqlCommandTimeoutSeconds,
int sqlLongRunningCommandTimeoutSeconds,
int sqlPcgCommandTimeoutSeconds,
int sqlPcgLongRunningCommandTimeoutSeconds
)
public static function Create(
siteName : String,
authorizationPolicyFullPath : String,
authorizationMode : AuthorizationMode,
sqlCommandTimeoutSeconds : int,
sqlLongRunningCommandTimeoutSeconds : int,
sqlPcgCommandTimeoutSeconds : int,
sqlPcgLongRunningCommandTimeoutSeconds : int
) : 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.
- authorizationMode
Type: Microsoft.CommerceServer..::.AuthorizationMode
One of AuthorizationMode values which determines the source of identity information.
- sqlCommandTimeoutSeconds
Type: System..::.Int32
The number of seconds to wait for normal SQL commands to execute. Default is 30 seconds.
- sqlLongRunningCommandTimeoutSeconds
Type: System..::.Int32
The number of seconds to wait for long-running SQL commands to execute. Default is 120 seconds.
- sqlPcgCommandTimeoutSeconds
Type: System..::.Int32
The number of seconds to wait for normal Promotion Code Generator SQL commands to execute. Default is 60 seconds.
- sqlPcgLongRunningCommandTimeoutSeconds
Type: System..::.Int32
The number of seconds to wait for long-running Promotion Code Generator SQL commands to execute. Default is 600 seconds.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.