Amazon.SessionProvider.DynamoDBSessionStateStore.Initialize C# (CSharp) Method

Initialize() public method

Initializes the provider by pulling the config info from the web.config and validate/create the DynamoDB table. If the table is being created this method will block until the table is active.
public Initialize ( string name, NameValueCollection config ) : void
name string
config System.Collections.Specialized.NameValueCollection
return void
        public override void Initialize(string name, NameValueCollection config)
        {
            if (config == null)
                throw new ArgumentNullException("config");

            base.Initialize(name, config);

            GetConfigSettings(config);


            var region = RegionEndpoint.GetBySystemName(this._regionName);
            if (!string.IsNullOrEmpty(this._accessKey))
            {
                this._ddbClient = new AmazonDynamoDBClient(this._accessKey, this._secretKey, region);
            }
            else
            {
                this._ddbClient = new AmazonDynamoDBClient(region);
            }

            SetupTable();
        }