biggy icon indicating copy to clipboard operation
biggy copied to clipboard

AzureStore ctor calls AzureBlobCore ctor. Params named differently causing confusion.

Open philoushka opened this issue 10 years ago • 1 comments

Can you please change the AzureStore ctor param name to indicate that it should be the name of the conn string, and not a connection string itself?

public AzureStore(string connectionString)
        : this(new AzureBlobCore(connectionString)) {   }

calls into

public AzureBlobCore(string connectionStringName)
    {
        var connectionString = ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString;
        var storageAccount = CloudStorageAccount.Parse(connectionString);
        this.blobClient = storageAccount.CreateCloudBlobClient();
        this.containerName = "biggy";
    }

I was calling the AzureStore constructor with the actual conn string.

Object reference not set to an instance of an object.

This is because the AzureBlobCore ctor was expecting the NAME of the entry in the .config, not the value as indicated in the first ctor (AzureStore(string connectionString)).

So it passed through an entire connstring when the base constructor was expecting the name.

philoushka avatar Jan 26 '15 06:01 philoushka

Yup. Thanks.

xivSolutions avatar Jan 26 '15 12:01 xivSolutions