public Task Init(string name, Providers.IProviderRuntime providerRuntime, Providers.IProviderConfiguration config) { this.Name = name; if (!config.Properties.ContainsKey("DataConnectionString") || string.IsNullOrWhiteSpace(config.Properties["DataConnectionString"])) { throw new ArgumentException("DataConnectionString property not set"); } var connectionString = config.Properties["DataConnectionString"]; var tableName = "OrleansGrainState"; if (config.Properties.ContainsKey("TableName")) { tableName = config.Properties["TableName"]; } Log = providerRuntime.GetLogger("Storage.AzureTableStorageEx", Logger.LoggerType.Runtime); CloudStorageAccount storageAccount = null; if (!CloudStorageAccount.TryParse(connectionString, out storageAccount)) { throw new ApplicationException("Invalid DataConnectionString"); } var tableClient = storageAccount.CreateCloudTableClient(); _table = tableClient.GetTableReference(tableName); return _table.CreateIfNotExistsAsync(); }