/// <inheritdoc />
        public virtual ISchemaSink WithBlobClient(CloudBlobClient blobClient)
        {
            this._blobClient  = blobClient.ThrowIfNullOrDefault();
            this.BaseLocation = this._blobClient.BaseUri.ToString();

            return(this);
        }
Esempio n. 2
0
        /// <summary>
        /// Adds the <see cref="CloudBlobClient"/> instance to the sink.
        /// </summary>
        /// <param name="sink"><see cref="ISchemaSink"/> instance.</param>
        /// <param name="blobClient"><see cref="CloudBlobClient"/> instance.</param>
        /// <returns>Returns the <see cref="ISchemaSink"/> instance.</returns>
        public static ISchemaSink WithBlobClient(this ISchemaSink sink, CloudBlobClient blobClient)
        {
            sink.ThrowIfNullOrDefault();
            blobClient.ThrowIfNullOrDefault();

            var instance = (sink as BlobStorageSchemaSink).ThrowIfNullOrDefault();

            instance.WithBlobClient(blobClient);

            return(instance);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="BlobStorageSchemaSink"/> class.
 /// </summary>
 /// <param name="location">Base URL of the Azure Blob Storage instance.</param>
 /// <param name="blobClient"><see cref="CloudBlobClient"/> instance.</param>
 public BlobStorageSchemaSink(Uri location, CloudBlobClient blobClient)
     : base(location.ThrowIfNullOrDefault().ToString())
 {
     this._blobClient  = blobClient.ThrowIfNullOrDefault();
     this.BaseLocation = this._blobClient.BaseUri.ToString();
 }