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.
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
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
Name | Description |
---|---|
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()
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" }
};
MemorySource(IEnumerable<TOutput>)
Declaration
public MemorySource(IEnumerable<TOutput> data)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T><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
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><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
Type | Description |
---|---|
System.Collections.Generic.IList<T><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
Type | Description |
---|---|
string |
Overrides
Methods
CheckParameter()
Declaration
protected override void CheckParameter()
Overrides
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" }
};
CleanUpOnFaulted(Exception)
Declaration
protected override void CleanUpOnFaulted(Exception e)
Parameters
Type | Name | Description |
---|---|---|
System.Exception | e |
Overrides
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" }
};
CleanUpOnSuccess()
Declaration
protected override void CleanUpOnSuccess()
Overrides
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" }
};
OnExecutionDoAsyncWork()
Declaration
protected override void OnExecutionDoAsyncWork()
Overrides
ETLBox.DataFlow.DataFlowExecutableSource<TOutput>.OnExecutionDoAsyncWork()
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" }
};
OnExecutionDoSynchronousWork()
Declaration
protected override void OnExecutionDoSynchronousWork()
Overrides
ETLBox.DataFlow.DataFlowExecutableSource<TOutput>.OnExecutionDoSynchronousWork()
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" }
};