title: Pass Parameter for Lazy Instantiation
body: <p>Given the following code snippet, how can I pass the member variable <code>_tenantContext</code> into the <code>Lazy&lt;CloudBlobContainer&gt;</code> constructor?</p>
  
  <pre><code>public class BlobStorage : IStorage
  {
      private readonly ITenantContext _tenantContext;
  
      public BlobStorage(ITenantContext tenantContext)
      {
          _tenantContext = tenantContext;
      }
  
      private readonly Lazy&lt;CloudBlobContainer&gt; _blobcontainer = new Lazy&lt;CloudBlobContainer&gt;(() =&gt;
      {
          var connectionString = ConfigurationManager.ConnectionStrings["FileStorage"].ConnectionString;
          CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
          CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
          CloudBlobContainer blobContainer = blobClient.GetContainerReference("attachments");
          blobContainer.CreateIfNotExists();
  
          return blobContainer;
      });
  </code></pre>