Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CommerceRuntimeContext"/> class.
 /// </summary>
 /// <param name="getCrtConfigByHostFunc">The action to get CommerceRuntimeConfiguration object for a specific host.</param>
 /// <param name="specifiedRoles">The specified role collection.</param>
 /// <param name="authenticationProvider">The authentication provider.</param>
 /// <remarks>Once specified role collection is provided, the commerce runtime will be constructed by using these roles plus default unit number from the configuration file.</remarks>
 public CommerceRuntimeContext(Func <string, CommerceRuntimeConfiguration> getCrtConfigByHostFunc, string[] specifiedRoles, CommerceAuthenticationProvider authenticationProvider)
 {
     AdaptorCaller.SetGetConfigurationFunc(getCrtConfigByHostFunc);
     CommerceRuntimeManager.SpecifiedRoles = specifiedRoles;
     this.userToken = null;
     this.authenticationProvider = authenticationProvider;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CommerceRuntimeContext"/> class.
 /// </summary>
 /// <param name="getCrtConfigByHostFunc">The action to load CommerceRuntimeConfiguration object for a specific host.</param>
 /// <param name="authenticationProvider">The authentication provider.</param>
 public CommerceRuntimeContext(Func <string, CommerceRuntimeConfiguration> getCrtConfigByHostFunc, CommerceAuthenticationProvider authenticationProvider)
     : this(getCrtConfigByHostFunc, null, authenticationProvider)
 {
 }