Example #1
0
        public TableDataSource(Application app, string name, Dictionary <string, object> configuration)
            : base(app, name, configuration)
        {
            string storageAccount = (string)configuration["storageAccount"];

            if (String.IsNullOrEmpty(storageAccount))
            {
                Runtime.Abort("No storageAccount was specified in the configuration for the '%s' data source.", name);
            }

            string accessKey = (string)configuration["accessKey"];

            if (String.IsNullOrEmpty(accessKey))
            {
                Runtime.Abort("No accessKey was specified in the configuration for the '%s' data source.", name);
            }

            _tableService = Azure.CreateTableService(storageAccount, accessKey);
        }