Class MemorySource<TOutput>

Define a source based on a generic .NET collection. This could be a List<T> or any other IEnumerable<T>. By default, an empty List<T> is created which can be filled with data.

Inheritance
System.Object
MemorySource<TOutput>
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.Connectors
Assembly: ETLBox.dll
Syntax
    public class MemorySource<TOutput> : DataFlowExecutableSource<TOutput>, ILoggableTask, IDataFlowLogging, IDataFlowExecutableSource<TOutput>, IDataFlowSource<TOutput>, IDataFlowSource, IDataFlowComponent, IDataFlowExecutableSource
Type Parameters
NameDescription
TOutput

Type of outgoing data.

Examples
MemorySource<MyRow> source = new MemorySource<MyRow>();
source.Data = new List<MyRow>()
{
    new MyRow() { Id = 1, Value = "Test1" },
    new MyRow() { Id = 2, Value = "Test2" },
    new MyRow() { Id = 3, Value = "Test3" }
};

Constructors

MemorySource()

Declaration
    public MemorySource()

MemorySource(IEnumerable<TOutput>)

Declaration
    public MemorySource(IEnumerable<TOutput> data)
Parameters
TypeNameDescription
System.Collections.Generic.IEnumerable<TOutput>data

Set the source collection and stores it in Data

Properties

Data

The .NET collection that is used to read the data from.

Declaration
    public IEnumerable<TOutput> Data { get; set; }
Property Value
TypeDescription
System.Collections.Generic.IEnumerable<TOutput>

DataAsList

If the source collection implements IList<T> then this property will convert the collection into this interface type.

Declaration
    public IList<TOutput> DataAsList { get; set; }
Property Value
TypeDescription
System.Collections.Generic.IList<TOutput>

TaskName

A name to identify the task or component. Every component or task comes with a default name that can be overwritten.

Declaration
    public override string TaskName { get; set; }
Property Value
TypeDescription
System.String
Overrides

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

OnExecutionDoAsyncWork()

Declaration
    protected override void OnExecutionDoAsyncWork()
Overrides
ETLBox.DataFlow.DataFlowExecutableSource<TOutput>.OnExecutionDoAsyncWork()

OnExecutionDoSynchronousWork()

Declaration
    protected override void OnExecutionDoSynchronousWork()
Overrides
ETLBox.DataFlow.DataFlowExecutableSource<TOutput>.OnExecutionDoSynchronousWork()

Implements