Ejemplo n.º 1
0
        public async Task <bool> Initialize()
        {
            try
            {
                await this.projections.CreateIfNotExistsAsync();

                await this.table.CreateIfNotExistsAsync();
            }
            catch (StorageException ex)
            {
                Logger.DebugFormat("Failed to initialize, best guess is bad naming of table. Check azure naming guidelines.");
                Logger.InfoFormat("Error: {0} with status code: {1}. Extended info: {2} ({3})", ex.RequestInformation.HttpStatusMessage, ex.RequestInformation.HttpStatusCode, ex.RequestInformation.ExtendedErrorInformation.ErrorMessage, ex.RequestInformation.ExtendedErrorInformation.ErrorCode);
                Logger.Debug(ex.ToString());
                return(false);
            }

            return(true);
        }