Class DataFlowStreamDestination<TInput>

The base implementation for a destination that allows writing of data in a stream.

Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: ETLBox.DataFlow
Assembly: ETLBox.dll
Syntax
    public abstract class DataFlowStreamDestination<TInput> : DataFlowDestination<TInput>, ILoggableTask, IDataFlowLogging, IDataFlowStreamDestination<TInput>, IDataFlowDestination<TInput>, IDataFlowDestination, IDataFlowComponent, IDataFlowStreamDestination
Type Parameters
NameDescription
TInput

Type of ingoing data

Properties

AzureBlobStorage

Use this to pass your AzureBlobStorage connection information. There are different methods to connect with Azure Blob Storage: Option 1: provide an existing BlockBlobClient Option 2: create BlockBlobClient based on the Uri and optional credential tokens - the Uri needs to be the blob url Option 3: create BlobkBlobClient with provided ConnectionString and ContainerName, the Uri is then the name of the blob

Declaration
    public AzureBlobStorageConfiguration AzureBlobStorage { get; set; }
Property Value
TypeDescription
AzureBlobStorageConfiguration

CreateStreamWriter

By default, stream are created internally based on Uri & ResourceType. If you already have an existing stream, use this function to returns a new StreamWriter based on this stream.

Declaration
    public Func<string, StreamWriter> CreateStreamWriter { get; set; }
Property Value
TypeDescription
System.Func<System.String, System.IO.StreamWriter>

Encoding

Encoding used to write data into the source file or web request.

Declaration
    public Encoding Encoding { get; set; }
Property Value
TypeDescription
System.Text.Encoding

GetNextUri

This function returns the next url that is used for writing data. It will used until HasNextUri returns false. The incoming StreamMetaData holds information about the current progress and currently processed data row. This property can be used if you want to write into multiple files or send data into different web services.

Declaration
    public Func<StreamMetaData, TInput, string> GetNextUri { get; set; }
Property Value
TypeDescription
System.Func<StreamMetaData, TInput, System.String>

HasNextUri

This func determines if the next data record should be written into another location. StreamMetaData has information about the current progress and currently processed data row.

Declaration
    public Func<StreamMetaData, TInput, bool> HasNextUri { get; set; }
Property Value
TypeDescription
System.Func<StreamMetaData, TInput, System.Boolean>

HttpClient

The System.Net.HttpClient used to connect with the destination (only needed when the ResourceType is Http.

Declaration
    public HttpClient HttpClient { get; set; }
Property Value
TypeDescription
System.Net.Http.HttpClient

HttpContentType

The content type used when sending the http request content.

Declaration
    public virtual string HttpContentType { get; set; }
Property Value
TypeDescription
System.String

HttpRequestMessage

The System.Net.Http.HttpRequestMessage use for the request from the HttpClient. You can use the to add additional meta data or to change the request type (default is POST).

Declaration
    public HttpRequestMessage HttpRequestMessage { get; set; }
Property Value
TypeDescription
System.Net.Http.HttpRequestMessage

ResourceType

Specifies the resource type. Use ResourceType.File if you want to write into a file (default) Use ResourceType.Http to write into a web endpoint.

Declaration
    public ResourceType ResourceType { get; set; }
Property Value
TypeDescription
ResourceType

StreamWriter

The stream writer used for the current request.

Declaration
    public StreamWriter StreamWriter { get; protected set; }
Property Value
TypeDescription
System.IO.StreamWriter

Uri

The Url of the webservice (e.g. https://test.com/foo) or the file name (relative or absolute)

Declaration
    public string Uri { get; set; }
Property Value
TypeDescription
System.String

WriteUri

The Uri used for the current write operation- this will only be different to the Uri if you use the GetNextUri and HasNextUri functions.

Declaration
    public string WriteUri { get; protected set; }
Property Value
TypeDescription
System.String

Methods

CheckParameter()

Declaration
    protected override void CheckParameter()
Overrides

CleanUpOnFaulted(Exception)

Declaration
    protected override void CleanUpOnFaulted(Exception e)
Parameters
TypeNameDescription
System.Exceptione
Overrides

CleanUpOnSuccess()

Declaration
    protected override void CleanUpOnSuccess()
Overrides

CloseStream()

Declaration
    protected abstract void CloseStream()

InitComponent()

Declaration
    protected override void InitComponent()
Overrides

InitStream()

Declaration
    protected abstract void InitStream()

PrepareParameter()

Declaration
    protected override void PrepareParameter()
Overrides

WriteData(TInput)

Declaration
    protected void WriteData(TInput data)
Parameters
TypeNameDescription
TInputdata

WriteIntoStream(TInput)

Declaration
    protected abstract void WriteIntoStream(TInput data)
Parameters
TypeNameDescription
TInputdata

Implements