diff --git a/examples/Net4.8/Example1-BasicETL/ETL/ConsoleLoader.cs b/examples/Net4.8/Example1-BasicETL/ETL/ConsoleLoader.cs index c3d7788..5ad05af 100644 --- a/examples/Net4.8/Example1-BasicETL/ETL/ConsoleLoader.cs +++ b/examples/Net4.8/Example1-BasicETL/ETL/ConsoleLoader.cs @@ -16,7 +16,7 @@ public async Task LoadAsync(IAsyncEnumerable items) Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } } diff --git a/examples/Net4.8/Example1-BasicETL/ETL/IntToStringTransformer.cs b/examples/Net4.8/Example1-BasicETL/ETL/IntToStringTransformer.cs index d6f7b70..b39a63a 100644 --- a/examples/Net4.8/Example1-BasicETL/ETL/IntToStringTransformer.cs +++ b/examples/Net4.8/Example1-BasicETL/ETL/IntToStringTransformer.cs @@ -10,14 +10,14 @@ internal class IntToStringTransformer : ITransformAsync public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items) { Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items) { Console.WriteLine($"Transforming integer {item} to string."); await Task.Delay(50); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } } diff --git a/examples/Net4.8/Example1-BasicETL/Program.cs b/examples/Net4.8/Example1-BasicETL/Program.cs index 8f82144..79ffcd7 100644 --- a/examples/Net4.8/Example1-BasicETL/Program.cs +++ b/examples/Net4.8/Example1-BasicETL/Program.cs @@ -23,7 +23,7 @@ private static async Task Main() var loader = new ConsoleLoader(); Console.WriteLine($"{ConsoleColors.Yellow} Starting ETL process...{ConsoleColors.Reset}\n\n"); - + var sourceItems = extractor.ExtractAsync(); var transformedItems = transformer.TransformAsync(sourceItems); await loader.LoadAsync(transformedItems); diff --git a/examples/Net4.8/Example1-BasicETL/Properties/AssemblyInfo.cs b/examples/Net4.8/Example1-BasicETL/Properties/AssemblyInfo.cs index ba94ce4..50dbd10 100644 --- a/examples/Net4.8/Example1-BasicETL/Properties/AssemblyInfo.cs +++ b/examples/Net4.8/Example1-BasicETL/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/examples/Net4.8/Example2-WithCancellationToken/ConsoleColors.cs b/examples/Net4.8/Example2-WithCancellationToken/ConsoleColors.cs index 14e78cd..05eb550 100644 --- a/examples/Net4.8/Example2-WithCancellationToken/ConsoleColors.cs +++ b/examples/Net4.8/Example2-WithCancellationToken/ConsoleColors.cs @@ -1,4 +1,4 @@ -namespace Example2_WithCancellationToken +namespace Example2_WithCancellationToken { internal class ConsoleColors { @@ -7,4 +7,4 @@ internal class ConsoleColors public const string Reset = "\u001b[0m"; public const string Red = "\u001b[31m"; } -} \ No newline at end of file +} diff --git a/examples/Net4.8/Example2-WithCancellationToken/ETL/ConsoleLoader.cs b/examples/Net4.8/Example2-WithCancellationToken/ETL/ConsoleLoader.cs index 6cdb003..0524a8f 100644 --- a/examples/Net4.8/Example2-WithCancellationToken/ETL/ConsoleLoader.cs +++ b/examples/Net4.8/Example2-WithCancellationToken/ETL/ConsoleLoader.cs @@ -36,7 +36,7 @@ public async Task LoadAsync(IAsyncEnumerable items, CancellationToken to Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50, token); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } } diff --git a/examples/Net4.8/Example2-WithCancellationToken/ETL/IntToStringTransformer.cs b/examples/Net4.8/Example2-WithCancellationToken/ETL/IntToStringTransformer.cs index e332bc6..9bd07d1 100644 --- a/examples/Net4.8/Example2-WithCancellationToken/ETL/IntToStringTransformer.cs +++ b/examples/Net4.8/Example2-WithCancellationToken/ETL/IntToStringTransformer.cs @@ -28,7 +28,7 @@ public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items, [EnumeratorCancellation] CancellationToken token) { Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items.WithCancellation(token)) { // Throw exception if cancellation is requested @@ -39,7 +39,7 @@ public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items await Task.Delay(50, token); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } } diff --git a/examples/Net4.8/Example2-WithCancellationToken/Properties/AssemblyInfo.cs b/examples/Net4.8/Example2-WithCancellationToken/Properties/AssemblyInfo.cs index f095465..3d4ac10 100644 --- a/examples/Net4.8/Example2-WithCancellationToken/Properties/AssemblyInfo.cs +++ b/examples/Net4.8/Example2-WithCancellationToken/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/examples/Net4.8/Example3-WithGracefulCancellation/ConsoleColors.cs b/examples/Net4.8/Example3-WithGracefulCancellation/ConsoleColors.cs index ed625fd..30c36fa 100644 --- a/examples/Net4.8/Example3-WithGracefulCancellation/ConsoleColors.cs +++ b/examples/Net4.8/Example3-WithGracefulCancellation/ConsoleColors.cs @@ -1,4 +1,4 @@ -namespace Example3_WithGracefulCancellation +namespace Example3_WithGracefulCancellation { internal class ConsoleColors { @@ -7,4 +7,4 @@ internal class ConsoleColors public const string Reset = "\u001b[0m"; public const string Red = "\u001b[31m"; } -} \ No newline at end of file +} diff --git a/examples/Net4.8/Example3-WithGracefulCancellation/ETL/ConsoleLoader.cs b/examples/Net4.8/Example3-WithGracefulCancellation/ETL/ConsoleLoader.cs index 6394168..dd91160 100644 --- a/examples/Net4.8/Example3-WithGracefulCancellation/ETL/ConsoleLoader.cs +++ b/examples/Net4.8/Example3-WithGracefulCancellation/ETL/ConsoleLoader.cs @@ -38,7 +38,7 @@ public async Task LoadAsync(IAsyncEnumerable items, CancellationToken to Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50, token); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } } diff --git a/examples/Net4.8/Example3-WithGracefulCancellation/ETL/IntToStringTransformer.cs b/examples/Net4.8/Example3-WithGracefulCancellation/ETL/IntToStringTransformer.cs index 6cd96f7..85b2642 100644 --- a/examples/Net4.8/Example3-WithGracefulCancellation/ETL/IntToStringTransformer.cs +++ b/examples/Net4.8/Example3-WithGracefulCancellation/ETL/IntToStringTransformer.cs @@ -28,7 +28,7 @@ public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items, [EnumeratorCancellation] CancellationToken token) { Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items.WithCancellation(token)) { if (token.IsCancellationRequested) diff --git a/examples/Net4.8/Example3-WithGracefulCancellation/Program.cs b/examples/Net4.8/Example3-WithGracefulCancellation/Program.cs index 0d8cdfd..fdc5bc8 100644 --- a/examples/Net4.8/Example3-WithGracefulCancellation/Program.cs +++ b/examples/Net4.8/Example3-WithGracefulCancellation/Program.cs @@ -30,7 +30,7 @@ private static async Task Main() var token = cts.Token; var sourceItems = extractor.ExtractAsync(token); - var transformedItems = transformer.TransformAsync(sourceItems,token); + var transformedItems = transformer.TransformAsync(sourceItems, token); await loader.LoadAsync(transformedItems, token); Console.WriteLine($"\n\n{ConsoleColors.Yellow}ETL process completed.{ConsoleColors.Reset}"); diff --git a/examples/Net4.8/Example3-WithGracefulCancellation/Properties/AssemblyInfo.cs b/examples/Net4.8/Example3-WithGracefulCancellation/Properties/AssemblyInfo.cs index 3566172..b488548 100644 --- a/examples/Net4.8/Example3-WithGracefulCancellation/Properties/AssemblyInfo.cs +++ b/examples/Net4.8/Example3-WithGracefulCancellation/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/examples/Net4.8/Example4a-WithExtractorProgress/ConsoleColors.cs b/examples/Net4.8/Example4a-WithExtractorProgress/ConsoleColors.cs index 2ac994a..c7cb43a 100644 --- a/examples/Net4.8/Example4a-WithExtractorProgress/ConsoleColors.cs +++ b/examples/Net4.8/Example4a-WithExtractorProgress/ConsoleColors.cs @@ -2,10 +2,10 @@ namespace Example4a_WithExtractorProgress { internal class ConsoleColors { - public const string Green = "\e[32m"; + public const string Green = "\e[32m"; public const string Yellow = "\e[33m"; - public const string Reset = "\e[0m"; - public const string Red = "\e[31m"; - public const string Cyan = "\e[36m"; + public const string Reset = "\e[0m"; + public const string Red = "\e[31m"; + public const string Cyan = "\e[36m"; } } diff --git a/examples/Net4.8/Example4a-WithExtractorProgress/ETL/ConsoleLoader.cs b/examples/Net4.8/Example4a-WithExtractorProgress/ETL/ConsoleLoader.cs index bd3ee8d..79d21fd 100644 --- a/examples/Net4.8/Example4a-WithExtractorProgress/ETL/ConsoleLoader.cs +++ b/examples/Net4.8/Example4a-WithExtractorProgress/ETL/ConsoleLoader.cs @@ -5,6 +5,7 @@ using Wolfgang.Etl.Abstractions; namespace Example4a_WithExtractorProgress.ETL; + internal class ConsoleLoader : ILoadWithProgressAsync { @@ -39,7 +40,7 @@ public async Task LoadAsync(IAsyncEnumerable items) Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net4.8/Example4a-WithExtractorProgress/ETL/FibonacciExtractor.cs b/examples/Net4.8/Example4a-WithExtractorProgress/ETL/FibonacciExtractor.cs index 3b02ab5..a444775 100644 --- a/examples/Net4.8/Example4a-WithExtractorProgress/ETL/FibonacciExtractor.cs +++ b/examples/Net4.8/Example4a-WithExtractorProgress/ETL/FibonacciExtractor.cs @@ -5,6 +5,7 @@ using Wolfgang.Etl.Abstractions; namespace Example4a_WithExtractorProgress.ETL; + internal class FibonacciExtractor : IExtractAsync, IExtractWithProgressAsync { private int _progressInterval = 1_000; @@ -55,7 +56,7 @@ public async IAsyncEnumerable ExtractAsync(IProgress progress) var count = 0; using var timer = new Timer - ( + ( _ => progress.Report(new EtlProgress(Volatile.Read(ref count))), state: null, TimeSpan.Zero, diff --git a/examples/Net4.8/Example4a-WithExtractorProgress/ETL/IntToStringTransformer.cs b/examples/Net4.8/Example4a-WithExtractorProgress/ETL/IntToStringTransformer.cs index abc93d1..221b597 100644 --- a/examples/Net4.8/Example4a-WithExtractorProgress/ETL/IntToStringTransformer.cs +++ b/examples/Net4.8/Example4a-WithExtractorProgress/ETL/IntToStringTransformer.cs @@ -5,7 +5,8 @@ using Wolfgang.Etl.Abstractions; namespace Example4a_WithExtractorProgress.ETL; -internal class IntToStringTransformer + +internal class IntToStringTransformer : ITransformAsync, ITransformWithProgressAsync { @@ -33,14 +34,14 @@ public int ProgressInterval public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items) { Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items) { Console.WriteLine($"Transforming integer {item} to string."); await Task.Delay(50); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net4.8/Example4a-WithExtractorProgress/Program.cs b/examples/Net4.8/Example4a-WithExtractorProgress/Program.cs index 410aa7e..4dfa05b 100644 --- a/examples/Net4.8/Example4a-WithExtractorProgress/Program.cs +++ b/examples/Net4.8/Example4a-WithExtractorProgress/Program.cs @@ -1,8 +1,9 @@ -using System; +using System; using System.Threading.Tasks; using Example4a_WithExtractorProgress.ETL; namespace Example4a_WithExtractorProgress; + internal class Program { private static async Task Main() diff --git a/examples/Net4.8/Example4a-WithExtractorProgress/Properties/AssemblyInfo.cs b/examples/Net4.8/Example4a-WithExtractorProgress/Properties/AssemblyInfo.cs index 8166221..d750b13 100644 --- a/examples/Net4.8/Example4a-WithExtractorProgress/Properties/AssemblyInfo.cs +++ b/examples/Net4.8/Example4a-WithExtractorProgress/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/examples/Net4.8/Example4b-WithTransformerProgress/ConsoleColors.cs b/examples/Net4.8/Example4b-WithTransformerProgress/ConsoleColors.cs index a95f55c..3924cb1 100644 --- a/examples/Net4.8/Example4b-WithTransformerProgress/ConsoleColors.cs +++ b/examples/Net4.8/Example4b-WithTransformerProgress/ConsoleColors.cs @@ -2,10 +2,10 @@ namespace Example4b_WithTransformerProgress { internal static class ConsoleColors { - public const string Green = "\e[32m"; + public const string Green = "\e[32m"; public const string Yellow = "\e[33m"; - public const string Reset = "\e[0m"; - public const string Red = "\e[31m"; - public const string Cyan = "\e[36m"; + public const string Reset = "\e[0m"; + public const string Red = "\e[31m"; + public const string Cyan = "\e[36m"; } } diff --git a/examples/Net4.8/Example4b-WithTransformerProgress/ETL/ConsoleLoader.cs b/examples/Net4.8/Example4b-WithTransformerProgress/ETL/ConsoleLoader.cs index 3d9fbc6..9a66bd0 100644 --- a/examples/Net4.8/Example4b-WithTransformerProgress/ETL/ConsoleLoader.cs +++ b/examples/Net4.8/Example4b-WithTransformerProgress/ETL/ConsoleLoader.cs @@ -5,6 +5,7 @@ using Wolfgang.Etl.Abstractions; namespace Example4b_WithTransformerProgress.ETL; + internal class ConsoleLoader : ILoadAsync, ILoadWithProgressAsync { @@ -39,7 +40,7 @@ public async Task LoadAsync(IAsyncEnumerable items) Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net4.8/Example4b-WithTransformerProgress/ETL/FibonacciExtractor.cs b/examples/Net4.8/Example4b-WithTransformerProgress/ETL/FibonacciExtractor.cs index e2a7f1b..0419d5f 100644 --- a/examples/Net4.8/Example4b-WithTransformerProgress/ETL/FibonacciExtractor.cs +++ b/examples/Net4.8/Example4b-WithTransformerProgress/ETL/FibonacciExtractor.cs @@ -5,6 +5,7 @@ using Wolfgang.Etl.Abstractions; namespace Example4b_WithTransformerProgress.ETL; + internal class FibonacciExtractor : IExtractAsync, IExtractWithProgressAsync { private int _progressInterval = 1_000; @@ -55,7 +56,7 @@ public async IAsyncEnumerable ExtractAsync(IProgress progress) var count = 0; using var timer = new Timer - ( + ( _ => progress.Report(new EtlProgress(Volatile.Read(ref count))), state: null, TimeSpan.Zero, diff --git a/examples/Net4.8/Example4b-WithTransformerProgress/ETL/IntToStringTransformer.cs b/examples/Net4.8/Example4b-WithTransformerProgress/ETL/IntToStringTransformer.cs index cfe30b7..9843cd5 100644 --- a/examples/Net4.8/Example4b-WithTransformerProgress/ETL/IntToStringTransformer.cs +++ b/examples/Net4.8/Example4b-WithTransformerProgress/ETL/IntToStringTransformer.cs @@ -5,7 +5,8 @@ using Wolfgang.Etl.Abstractions; namespace Example4b_WithTransformerProgress.ETL; -internal class IntToStringTransformer + +internal class IntToStringTransformer : ITransformAsync, ITransformWithProgressAsync { @@ -33,14 +34,14 @@ public int ProgressInterval public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items) { Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items) { Console.WriteLine($"Transforming integer {item} to string."); await Task.Delay(50); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net4.8/Example4b-WithTransformerProgress/Program.cs b/examples/Net4.8/Example4b-WithTransformerProgress/Program.cs index 4a374a1..423aa9a 100644 --- a/examples/Net4.8/Example4b-WithTransformerProgress/Program.cs +++ b/examples/Net4.8/Example4b-WithTransformerProgress/Program.cs @@ -1,8 +1,9 @@ -using System; +using System; using System.Threading.Tasks; using Example4b_WithTransformerProgress.ETL; namespace Example4b_WithTransformerProgress; + internal class Program { private static async Task Main() diff --git a/examples/Net4.8/Example4b-WithTransformerProgress/Properties/AssemblyInfo.cs b/examples/Net4.8/Example4b-WithTransformerProgress/Properties/AssemblyInfo.cs index 690ec78..cfdac32 100644 --- a/examples/Net4.8/Example4b-WithTransformerProgress/Properties/AssemblyInfo.cs +++ b/examples/Net4.8/Example4b-WithTransformerProgress/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/examples/Net4.8/Example4c-WithLoaderProgress/ConsoleColors.cs b/examples/Net4.8/Example4c-WithLoaderProgress/ConsoleColors.cs index 371749e..47695b8 100644 --- a/examples/Net4.8/Example4c-WithLoaderProgress/ConsoleColors.cs +++ b/examples/Net4.8/Example4c-WithLoaderProgress/ConsoleColors.cs @@ -2,10 +2,10 @@ namespace Example4c_WithLoaderProgress { internal class ConsoleColors { - public const string Green = "\e[32m"; + public const string Green = "\e[32m"; public const string Yellow = "\e[33m"; - public const string Reset = "\e[0m"; - public const string Red = "\e[31m"; - public const string Cyan = "\e[36m"; + public const string Reset = "\e[0m"; + public const string Red = "\e[31m"; + public const string Cyan = "\e[36m"; } } diff --git a/examples/Net4.8/Example4c-WithLoaderProgress/ETL/ConsoleLoader.cs b/examples/Net4.8/Example4c-WithLoaderProgress/ETL/ConsoleLoader.cs index 29f4a84..424f8ad 100644 --- a/examples/Net4.8/Example4c-WithLoaderProgress/ETL/ConsoleLoader.cs +++ b/examples/Net4.8/Example4c-WithLoaderProgress/ETL/ConsoleLoader.cs @@ -5,6 +5,7 @@ using Wolfgang.Etl.Abstractions; namespace Example4c_WithLoaderProgress.ETL; + internal class ConsoleLoader : ILoadWithProgressAsync { @@ -39,7 +40,7 @@ public async Task LoadAsync(IAsyncEnumerable items) Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net4.8/Example4c-WithLoaderProgress/ETL/FibonacciExtractor.cs b/examples/Net4.8/Example4c-WithLoaderProgress/ETL/FibonacciExtractor.cs index cd4d567..fb41ad3 100644 --- a/examples/Net4.8/Example4c-WithLoaderProgress/ETL/FibonacciExtractor.cs +++ b/examples/Net4.8/Example4c-WithLoaderProgress/ETL/FibonacciExtractor.cs @@ -5,6 +5,7 @@ using Wolfgang.Etl.Abstractions; namespace Example4c_WithLoaderProgress.ETL; + internal class FibonacciExtractor : IExtractAsync, IExtractWithProgressAsync { private int _progressInterval = 1_000; @@ -56,7 +57,7 @@ public async IAsyncEnumerable ExtractAsync(IProgress progress) var count = 0; using var timer = new Timer - ( + ( _ => progress.Report(new EtlProgress(Volatile.Read(ref count))), state: null, TimeSpan.Zero, diff --git a/examples/Net4.8/Example4c-WithLoaderProgress/ETL/IntToStringTransformer.cs b/examples/Net4.8/Example4c-WithLoaderProgress/ETL/IntToStringTransformer.cs index bec099b..60fd721 100644 --- a/examples/Net4.8/Example4c-WithLoaderProgress/ETL/IntToStringTransformer.cs +++ b/examples/Net4.8/Example4c-WithLoaderProgress/ETL/IntToStringTransformer.cs @@ -5,7 +5,8 @@ using Wolfgang.Etl.Abstractions; namespace Example4c_WithLoaderProgress.ETL; -internal class IntToStringTransformer + +internal class IntToStringTransformer : ITransformAsync, ITransformWithProgressAsync { @@ -33,14 +34,14 @@ public int ProgressInterval public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items) { Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items) { Console.WriteLine($"Transforming integer {item} to string."); await Task.Delay(50); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net4.8/Example4c-WithLoaderProgress/Program.cs b/examples/Net4.8/Example4c-WithLoaderProgress/Program.cs index 58de6d3..5d09a6b 100644 --- a/examples/Net4.8/Example4c-WithLoaderProgress/Program.cs +++ b/examples/Net4.8/Example4c-WithLoaderProgress/Program.cs @@ -1,8 +1,9 @@ -using System; +using System; using System.Threading.Tasks; using Example4c_WithLoaderProgress.ETL; namespace Example4c_WithLoaderProgress; + internal class Program { private static async Task Main() diff --git a/examples/Net4.8/Example4c-WithLoaderProgress/Properties/AssemblyInfo.cs b/examples/Net4.8/Example4c-WithLoaderProgress/Properties/AssemblyInfo.cs index d0680e3..2f2dbe9 100644 --- a/examples/Net4.8/Example4c-WithLoaderProgress/Properties/AssemblyInfo.cs +++ b/examples/Net4.8/Example4c-WithLoaderProgress/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ConsoleColors.cs b/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ConsoleColors.cs index 5a7ff4a..18765fc 100644 --- a/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ConsoleColors.cs +++ b/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ConsoleColors.cs @@ -2,10 +2,10 @@ namespace Example5a_ExtractorWithProgressAndCancellation { internal class ConsoleColors { - public const string Green = "\e[32m"; + public const string Green = "\e[32m"; public const string Yellow = "\e[33m"; - public const string Reset = "\e[0m"; - public const string Red = "\e[31m"; - public const string Cyan = "\e[36m"; + public const string Reset = "\e[0m"; + public const string Red = "\e[31m"; + public const string Cyan = "\e[36m"; } } diff --git a/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ETL/ConsoleLoader.cs b/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ETL/ConsoleLoader.cs index 05c646d..9bee6f5 100644 --- a/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ETL/ConsoleLoader.cs +++ b/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ETL/ConsoleLoader.cs @@ -5,6 +5,7 @@ using Wolfgang.Etl.Abstractions; namespace Example5a_ExtractorWithProgressAndCancellation.ETL; + internal class ConsoleLoader : ILoadWithProgressAndCancellationAsync { @@ -44,7 +45,7 @@ public async Task LoadAsync(IAsyncEnumerable items) Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } @@ -64,7 +65,7 @@ public async Task LoadAsync(IAsyncEnumerable items, CancellationToken to { // You can either throw an exception if cancellation is requested // token.ThrowIfCancellationRequested(); - + // or gracefully handle it. if (token.IsCancellationRequested) { diff --git a/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ETL/FibonacciExtractor.cs b/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ETL/FibonacciExtractor.cs index e294ce0..51ecabc 100644 --- a/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ETL/FibonacciExtractor.cs +++ b/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ETL/FibonacciExtractor.cs @@ -6,6 +6,7 @@ using Wolfgang.Etl.Abstractions; namespace Example5a_ExtractorWithProgressAndCancellation.ETL; + internal class FibonacciExtractor : IExtractWithProgressAndCancellationAsync { private int _progressInterval = 1_000; @@ -126,7 +127,7 @@ public async IAsyncEnumerable ExtractAsync(IProgress progress, var count = 0; using var timer = new Timer - ( + ( _ => progress.Report(new EtlProgress(Volatile.Read(ref count))), state: null, TimeSpan.Zero, diff --git a/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ETL/IntToStringTransformer.cs b/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ETL/IntToStringTransformer.cs index 4d61a32..21a1f50 100644 --- a/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ETL/IntToStringTransformer.cs +++ b/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/ETL/IntToStringTransformer.cs @@ -6,6 +6,7 @@ using Wolfgang.Etl.Abstractions; namespace Example5a_ExtractorWithProgressAndCancellation.ETL; + internal class IntToStringTransformer : ITransformWithProgressAndCancellationAsync { @@ -41,14 +42,14 @@ IAsyncEnumerable items } Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items) { Console.WriteLine($"Transforming integer {item} to string."); await Task.Delay(50); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } @@ -56,7 +57,7 @@ IAsyncEnumerable items public async IAsyncEnumerable TransformAsync ( - IAsyncEnumerable items, + IAsyncEnumerable items, [EnumeratorCancellation] CancellationToken token ) { @@ -85,7 +86,7 @@ [EnumeratorCancellation] CancellationToken token public async IAsyncEnumerable TransformAsync ( - IAsyncEnumerable items, + IAsyncEnumerable items, IProgress progress ) { diff --git a/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/Program.cs b/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/Program.cs index f93483b..412a3aa 100644 --- a/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/Program.cs +++ b/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/Program.cs @@ -1,9 +1,10 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using Example5a_ExtractorWithProgressAndCancellation.ETL; namespace Example5a_ExtractorWithProgressAndCancellation; + internal class Program { private static async Task Main() diff --git a/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/Properties/AssemblyInfo.cs b/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/Properties/AssemblyInfo.cs index 21e169a..bf09bdf 100644 --- a/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/Properties/AssemblyInfo.cs +++ b/examples/Net4.8/Example5a-ExtractorWithProgressAndCancellation/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/examples/Net4.8/Example6-ReducingDuplicateCode/ConsoleColors.cs b/examples/Net4.8/Example6-ReducingDuplicateCode/ConsoleColors.cs index e10c6d9..75ff804 100644 --- a/examples/Net4.8/Example6-ReducingDuplicateCode/ConsoleColors.cs +++ b/examples/Net4.8/Example6-ReducingDuplicateCode/ConsoleColors.cs @@ -2,10 +2,10 @@ namespace Example6_ReducingDuplicateCode { internal class ConsoleColors { - public const string Green = "\e[32m"; + public const string Green = "\e[32m"; public const string Yellow = "\e[33m"; - public const string Reset = "\e[0m"; - public const string Red = "\e[31m"; - public const string Cyan = "\e[36m"; + public const string Reset = "\e[0m"; + public const string Red = "\e[31m"; + public const string Cyan = "\e[36m"; } } diff --git a/examples/Net4.8/Example6-ReducingDuplicateCode/ETL/ConsoleLoader.cs b/examples/Net4.8/Example6-ReducingDuplicateCode/ETL/ConsoleLoader.cs index c088b2b..e68a180 100644 --- a/examples/Net4.8/Example6-ReducingDuplicateCode/ETL/ConsoleLoader.cs +++ b/examples/Net4.8/Example6-ReducingDuplicateCode/ETL/ConsoleLoader.cs @@ -1,11 +1,12 @@ #nullable enable -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Wolfgang.Etl.Abstractions; namespace Example6_ReducingDuplicateCode.ETL; + internal class ConsoleLoader : ILoadWithProgressAndCancellationAsync { @@ -91,8 +92,8 @@ public Task LoadAsync(IAsyncEnumerable items, IProgress pro private async Task WorkerAsync ( - IAsyncEnumerable items, - IProgress? progress, + IAsyncEnumerable items, + IProgress? progress, CancellationToken token ) { diff --git a/examples/Net4.8/Example6-ReducingDuplicateCode/ETL/FibonacciExtractor.cs b/examples/Net4.8/Example6-ReducingDuplicateCode/ETL/FibonacciExtractor.cs index 7c47267..b79f70f 100644 --- a/examples/Net4.8/Example6-ReducingDuplicateCode/ETL/FibonacciExtractor.cs +++ b/examples/Net4.8/Example6-ReducingDuplicateCode/ETL/FibonacciExtractor.cs @@ -1,5 +1,5 @@ #nullable enable -using System; +using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Threading; @@ -7,6 +7,7 @@ using Wolfgang.Etl.Abstractions; namespace Example6_ReducingDuplicateCode.ETL; + internal class FibonacciExtractor : IExtractWithProgressAndCancellationAsync { private int _progressInterval = 1_000; @@ -59,7 +60,7 @@ public IAsyncEnumerable ExtractAsync(IProgress progress) public IAsyncEnumerable ExtractAsync ( - IProgress progress, + IProgress progress, CancellationToken token ) { @@ -75,7 +76,7 @@ CancellationToken token private async IAsyncEnumerable WorkerAsync ( - IProgress? progress, + IProgress? progress, [EnumeratorCancellation] CancellationToken token ) { diff --git a/examples/Net4.8/Example6-ReducingDuplicateCode/ETL/IntToStringTransformer.cs b/examples/Net4.8/Example6-ReducingDuplicateCode/ETL/IntToStringTransformer.cs index 10ac996..f2c70b2 100644 --- a/examples/Net4.8/Example6-ReducingDuplicateCode/ETL/IntToStringTransformer.cs +++ b/examples/Net4.8/Example6-ReducingDuplicateCode/ETL/IntToStringTransformer.cs @@ -1,5 +1,5 @@ #nullable enable -using System; +using System; using System.Collections.Generic; using System.Runtime.CompilerServices; using System.Threading; @@ -7,6 +7,7 @@ using Wolfgang.Etl.Abstractions; namespace Example6_ReducingDuplicateCode.ETL; + internal class IntToStringTransformer : ITransformWithProgressAndCancellationAsync { @@ -49,7 +50,7 @@ IAsyncEnumerable items public IAsyncEnumerable TransformAsync ( - IAsyncEnumerable items, + IAsyncEnumerable items, CancellationToken token ) { @@ -66,7 +67,7 @@ CancellationToken token public IAsyncEnumerable TransformAsync ( - IAsyncEnumerable items, + IAsyncEnumerable items, IProgress progress ) { diff --git a/examples/Net4.8/Example6-ReducingDuplicateCode/Program.cs b/examples/Net4.8/Example6-ReducingDuplicateCode/Program.cs index 13ff196..448d151 100644 --- a/examples/Net4.8/Example6-ReducingDuplicateCode/Program.cs +++ b/examples/Net4.8/Example6-ReducingDuplicateCode/Program.cs @@ -1,9 +1,10 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using Example6_ReducingDuplicateCode.ETL; namespace Example6_ReducingDuplicateCode; + internal class Program { private static async Task Main() @@ -20,7 +21,7 @@ private static async Task Main() await EtlWithNoProgressOrCancellation(); - + await EtlWithCancellationToken(); @@ -34,7 +35,7 @@ private static async Task Main() } - + private static async Task EtlWithNoProgressOrCancellation() { var extractor = new FibonacciExtractor(); diff --git a/examples/Net4.8/Example6-ReducingDuplicateCode/Properties/AssemblyInfo.cs b/examples/Net4.8/Example6-ReducingDuplicateCode/Properties/AssemblyInfo.cs index 1699bc0..8ccf226 100644 --- a/examples/Net4.8/Example6-ReducingDuplicateCode/Properties/AssemblyInfo.cs +++ b/examples/Net4.8/Example6-ReducingDuplicateCode/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following diff --git a/examples/Net8.0/Example1-BasicETL/ETL/ConsoleLoader.cs b/examples/Net8.0/Example1-BasicETL/ETL/ConsoleLoader.cs index d25c5e7..db8b55b 100644 --- a/examples/Net8.0/Example1-BasicETL/ETL/ConsoleLoader.cs +++ b/examples/Net8.0/Example1-BasicETL/ETL/ConsoleLoader.cs @@ -1,6 +1,7 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example1_BasicETL.ETL; + internal class ConsoleLoader : ILoadAsync { public async Task LoadAsync(IAsyncEnumerable items) @@ -12,7 +13,7 @@ public async Task LoadAsync(IAsyncEnumerable items) Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } } diff --git a/examples/Net8.0/Example1-BasicETL/ETL/FibonacciExtractor.cs b/examples/Net8.0/Example1-BasicETL/ETL/FibonacciExtractor.cs index f3c7a25..114d0e0 100644 --- a/examples/Net8.0/Example1-BasicETL/ETL/FibonacciExtractor.cs +++ b/examples/Net8.0/Example1-BasicETL/ETL/FibonacciExtractor.cs @@ -1,6 +1,7 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example1_BasicETL.ETL; + internal class FibonacciExtractor : IExtractAsync { public async IAsyncEnumerable ExtractAsync() diff --git a/examples/Net8.0/Example1-BasicETL/ETL/IntToStringTransformer.cs b/examples/Net8.0/Example1-BasicETL/ETL/IntToStringTransformer.cs index a4803d6..f3a0545 100644 --- a/examples/Net8.0/Example1-BasicETL/ETL/IntToStringTransformer.cs +++ b/examples/Net8.0/Example1-BasicETL/ETL/IntToStringTransformer.cs @@ -1,19 +1,20 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example1_BasicETL.ETL; + internal class IntToStringTransformer : ITransformAsync { public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items) { Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items) { Console.WriteLine($"Transforming integer {item} to string."); await Task.Delay(50); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } } diff --git a/examples/Net8.0/Example1-BasicETL/Program.cs b/examples/Net8.0/Example1-BasicETL/Program.cs index dde6c65..ce1f8af 100644 --- a/examples/Net8.0/Example1-BasicETL/Program.cs +++ b/examples/Net8.0/Example1-BasicETL/Program.cs @@ -1,6 +1,7 @@ using Example1_BasicETL.ETL; namespace Example1_BasicETL; + internal class Program { private static async Task Main() @@ -20,7 +21,7 @@ private static async Task Main() var loader = new ConsoleLoader(); Console.WriteLine($"{ConsoleColors.Yellow} Starting ETL process...{ConsoleColors.Reset}\n\n"); - + var sourceItems = extractor.ExtractAsync(); var transformedItems = transformer.TransformAsync(sourceItems); await loader.LoadAsync(transformedItems); diff --git a/examples/Net8.0/Example2-WithCancellationToken/ETL/ConsoleLoader.cs b/examples/Net8.0/Example2-WithCancellationToken/ETL/ConsoleLoader.cs index d6ebffa..aed6dd9 100644 --- a/examples/Net8.0/Example2-WithCancellationToken/ETL/ConsoleLoader.cs +++ b/examples/Net8.0/Example2-WithCancellationToken/ETL/ConsoleLoader.cs @@ -1,6 +1,7 @@ using Wolfgang.Etl.Abstractions; namespace Example2_WithCancellationToken.ETL; + internal class ConsoleLoader : ILoadWithCancellationAsync { @@ -32,7 +33,7 @@ public async Task LoadAsync(IAsyncEnumerable items, CancellationToken to Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50, token); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } } diff --git a/examples/Net8.0/Example2-WithCancellationToken/ETL/FibonacciExtractor.cs b/examples/Net8.0/Example2-WithCancellationToken/ETL/FibonacciExtractor.cs index c5ada01..efc9f09 100644 --- a/examples/Net8.0/Example2-WithCancellationToken/ETL/FibonacciExtractor.cs +++ b/examples/Net8.0/Example2-WithCancellationToken/ETL/FibonacciExtractor.cs @@ -2,6 +2,7 @@ using Wolfgang.Etl.Abstractions; namespace Example2_WithCancellationToken.ETL; + internal class FibonacciExtractor : IExtractWithCancellationAsync { public async IAsyncEnumerable ExtractAsync() diff --git a/examples/Net8.0/Example2-WithCancellationToken/ETL/IntToStringTransformer.cs b/examples/Net8.0/Example2-WithCancellationToken/ETL/IntToStringTransformer.cs index 15237e7..08b7d8e 100644 --- a/examples/Net8.0/Example2-WithCancellationToken/ETL/IntToStringTransformer.cs +++ b/examples/Net8.0/Example2-WithCancellationToken/ETL/IntToStringTransformer.cs @@ -2,6 +2,7 @@ using Wolfgang.Etl.Abstractions; namespace Example2_WithCancellationToken.ETL; + internal class IntToStringTransformer : ITransformWithCancellationAsync { public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items) @@ -19,11 +20,11 @@ public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items } - + public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items, [EnumeratorCancellation] CancellationToken token) { Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items.WithCancellation(token)) { // Throw exception if cancellation is requested @@ -34,7 +35,7 @@ public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items await Task.Delay(50, token); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net8.0/Example2-WithCancellationToken/Program.cs b/examples/Net8.0/Example2-WithCancellationToken/Program.cs index fe41f4a..8290805 100644 --- a/examples/Net8.0/Example2-WithCancellationToken/Program.cs +++ b/examples/Net8.0/Example2-WithCancellationToken/Program.cs @@ -1,6 +1,7 @@ using Example2_WithCancellationToken.ETL; namespace Example2_WithCancellationToken; + internal class Program { private static async Task Main() diff --git a/examples/Net8.0/Example3-WithGracefulCancellation/ETL/ConsoleLoader.cs b/examples/Net8.0/Example3-WithGracefulCancellation/ETL/ConsoleLoader.cs index efd141a..cafea33 100644 --- a/examples/Net8.0/Example3-WithGracefulCancellation/ETL/ConsoleLoader.cs +++ b/examples/Net8.0/Example3-WithGracefulCancellation/ETL/ConsoleLoader.cs @@ -1,6 +1,7 @@ using Wolfgang.Etl.Abstractions; namespace Example3_WithGracefulCancellation.ETL; + internal class ConsoleLoader : ILoadWithCancellationAsync { @@ -34,7 +35,7 @@ public async Task LoadAsync(IAsyncEnumerable items, CancellationToken to Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50, token); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } } diff --git a/examples/Net8.0/Example3-WithGracefulCancellation/ETL/FibonacciExtractor.cs b/examples/Net8.0/Example3-WithGracefulCancellation/ETL/FibonacciExtractor.cs index 415cbcf..15a9fb6 100644 --- a/examples/Net8.0/Example3-WithGracefulCancellation/ETL/FibonacciExtractor.cs +++ b/examples/Net8.0/Example3-WithGracefulCancellation/ETL/FibonacciExtractor.cs @@ -2,6 +2,7 @@ using Wolfgang.Etl.Abstractions; namespace Example3_WithGracefulCancellation.ETL; + internal class FibonacciExtractor : IExtractWithCancellationAsync { public async IAsyncEnumerable ExtractAsync() diff --git a/examples/Net8.0/Example3-WithGracefulCancellation/ETL/IntToStringTransformer.cs b/examples/Net8.0/Example3-WithGracefulCancellation/ETL/IntToStringTransformer.cs index 23d619a..095cbfe 100644 --- a/examples/Net8.0/Example3-WithGracefulCancellation/ETL/IntToStringTransformer.cs +++ b/examples/Net8.0/Example3-WithGracefulCancellation/ETL/IntToStringTransformer.cs @@ -2,6 +2,7 @@ using Wolfgang.Etl.Abstractions; namespace Example3_WithGracefulCancellation.ETL; + internal class IntToStringTransformer : ITransformWithCancellationAsync { @@ -24,7 +25,7 @@ public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items, [EnumeratorCancellation] CancellationToken token) { Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items) { if (token.IsCancellationRequested) @@ -37,7 +38,7 @@ public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items await Task.Delay(50, token); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } } diff --git a/examples/Net8.0/Example3-WithGracefulCancellation/Program.cs b/examples/Net8.0/Example3-WithGracefulCancellation/Program.cs index 301f702..123253a 100644 --- a/examples/Net8.0/Example3-WithGracefulCancellation/Program.cs +++ b/examples/Net8.0/Example3-WithGracefulCancellation/Program.cs @@ -1,6 +1,7 @@ using Example3_WithGracefulCancellation.ETL; namespace Example3_WithGracefulCancellation; + internal class Program { private static async Task Main() diff --git a/examples/Net8.0/Example4a-WithExtractorProgress/ETL/ConsoleLoader.cs b/examples/Net8.0/Example4a-WithExtractorProgress/ETL/ConsoleLoader.cs index 0ea4aae..59d8df8 100644 --- a/examples/Net8.0/Example4a-WithExtractorProgress/ETL/ConsoleLoader.cs +++ b/examples/Net8.0/Example4a-WithExtractorProgress/ETL/ConsoleLoader.cs @@ -1,6 +1,7 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example4a_WithExtractorProgress.ETL; + internal class ConsoleLoader : ILoadAsync, ILoadWithProgressAsync { @@ -35,7 +36,7 @@ public async Task LoadAsync(IAsyncEnumerable items) Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net8.0/Example4a-WithExtractorProgress/ETL/FibonacciExtractor.cs b/examples/Net8.0/Example4a-WithExtractorProgress/ETL/FibonacciExtractor.cs index dd577c3..4176259 100644 --- a/examples/Net8.0/Example4a-WithExtractorProgress/ETL/FibonacciExtractor.cs +++ b/examples/Net8.0/Example4a-WithExtractorProgress/ETL/FibonacciExtractor.cs @@ -1,6 +1,7 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example4a_WithExtractorProgress.ETL; + internal class FibonacciExtractor : IExtractAsync, IExtractWithProgressAsync { private int _progressInterval = 1_000; @@ -53,7 +54,7 @@ public async IAsyncEnumerable ExtractAsync(IProgress progress) var count = 0; await using var timer = new Timer - ( + ( _ => progress.Report(new EtlProgress(Volatile.Read(ref count))), state: null, TimeSpan.Zero, diff --git a/examples/Net8.0/Example4a-WithExtractorProgress/ETL/IntToStringTransformer.cs b/examples/Net8.0/Example4a-WithExtractorProgress/ETL/IntToStringTransformer.cs index 59133d0..56a103a 100644 --- a/examples/Net8.0/Example4a-WithExtractorProgress/ETL/IntToStringTransformer.cs +++ b/examples/Net8.0/Example4a-WithExtractorProgress/ETL/IntToStringTransformer.cs @@ -1,7 +1,8 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example4a_WithExtractorProgress.ETL; -internal class IntToStringTransformer + +internal class IntToStringTransformer : ITransformAsync, ITransformWithProgressAsync { @@ -29,14 +30,14 @@ public int ProgressInterval public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items) { Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items) { Console.WriteLine($"Transforming integer {item} to string."); await Task.Delay(50); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net8.0/Example4a-WithExtractorProgress/Program.cs b/examples/Net8.0/Example4a-WithExtractorProgress/Program.cs index 5c187ea..d3c1b40 100644 --- a/examples/Net8.0/Example4a-WithExtractorProgress/Program.cs +++ b/examples/Net8.0/Example4a-WithExtractorProgress/Program.cs @@ -1,6 +1,7 @@ using Example4a_WithExtractorProgress.ETL; namespace Example4a_WithExtractorProgress; + internal class Program { private static async Task Main() diff --git a/examples/Net8.0/Example4b-WithTransformerProgress/ETL/ConsoleLoader.cs b/examples/Net8.0/Example4b-WithTransformerProgress/ETL/ConsoleLoader.cs index 0c03149..e5a5318 100644 --- a/examples/Net8.0/Example4b-WithTransformerProgress/ETL/ConsoleLoader.cs +++ b/examples/Net8.0/Example4b-WithTransformerProgress/ETL/ConsoleLoader.cs @@ -1,6 +1,7 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example4b_WithTransformerProgress.ETL; + internal class ConsoleLoader : ILoadAsync, ILoadWithProgressAsync { @@ -35,7 +36,7 @@ public async Task LoadAsync(IAsyncEnumerable items) Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net8.0/Example4b-WithTransformerProgress/ETL/FibonacciExtractor.cs b/examples/Net8.0/Example4b-WithTransformerProgress/ETL/FibonacciExtractor.cs index 0e8ca42..b355d36 100644 --- a/examples/Net8.0/Example4b-WithTransformerProgress/ETL/FibonacciExtractor.cs +++ b/examples/Net8.0/Example4b-WithTransformerProgress/ETL/FibonacciExtractor.cs @@ -1,6 +1,7 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example4b_WithTransformerProgress.ETL; + internal class FibonacciExtractor : IExtractAsync, IExtractWithProgressAsync { private int _progressInterval = 1_000; @@ -53,7 +54,7 @@ public async IAsyncEnumerable ExtractAsync(IProgress progress) var count = 0; await using var timer = new Timer - ( + ( _ => progress.Report(new EtlProgress(Volatile.Read(ref count))), state: null, TimeSpan.Zero, diff --git a/examples/Net8.0/Example4b-WithTransformerProgress/ETL/IntToStringTransformer.cs b/examples/Net8.0/Example4b-WithTransformerProgress/ETL/IntToStringTransformer.cs index bb91b31..53f0a71 100644 --- a/examples/Net8.0/Example4b-WithTransformerProgress/ETL/IntToStringTransformer.cs +++ b/examples/Net8.0/Example4b-WithTransformerProgress/ETL/IntToStringTransformer.cs @@ -1,7 +1,8 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example4b_WithTransformerProgress.ETL; -internal class IntToStringTransformer + +internal class IntToStringTransformer : ITransformAsync, ITransformWithProgressAsync { @@ -29,14 +30,14 @@ public int ProgressInterval public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items) { Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items) { Console.WriteLine($"Transforming integer {item} to string."); await Task.Delay(50); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net8.0/Example4b-WithTransformerProgress/Program.cs b/examples/Net8.0/Example4b-WithTransformerProgress/Program.cs index 082091d..b837e23 100644 --- a/examples/Net8.0/Example4b-WithTransformerProgress/Program.cs +++ b/examples/Net8.0/Example4b-WithTransformerProgress/Program.cs @@ -1,6 +1,7 @@ using Example4b_WithTransformerProgress.ETL; namespace Example4b_WithTransformerProgress; + internal class Program { private static async Task Main() diff --git a/examples/Net8.0/Example4c-WithLoaderProgress/ETL/ConsoleLoader.cs b/examples/Net8.0/Example4c-WithLoaderProgress/ETL/ConsoleLoader.cs index b10e2af..2e1374a 100644 --- a/examples/Net8.0/Example4c-WithLoaderProgress/ETL/ConsoleLoader.cs +++ b/examples/Net8.0/Example4c-WithLoaderProgress/ETL/ConsoleLoader.cs @@ -1,6 +1,7 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example4c_WithLoaderProgress.ETL; + internal class ConsoleLoader : ILoadAsync, ILoadWithProgressAsync { @@ -35,7 +36,7 @@ public async Task LoadAsync(IAsyncEnumerable items) Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net8.0/Example4c-WithLoaderProgress/ETL/FibonacciExtractor.cs b/examples/Net8.0/Example4c-WithLoaderProgress/ETL/FibonacciExtractor.cs index 8410e09..1da57cb 100644 --- a/examples/Net8.0/Example4c-WithLoaderProgress/ETL/FibonacciExtractor.cs +++ b/examples/Net8.0/Example4c-WithLoaderProgress/ETL/FibonacciExtractor.cs @@ -1,6 +1,7 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example4c_WithLoaderProgress.ETL; + internal class FibonacciExtractor : IExtractAsync, IExtractWithProgressAsync { private int _progressInterval = 1_000; @@ -53,7 +54,7 @@ public async IAsyncEnumerable ExtractAsync(IProgress progress) var count = 0; await using var timer = new Timer - ( + ( _ => progress.Report(new EtlProgress(Volatile.Read(ref count))), state: null, TimeSpan.Zero, diff --git a/examples/Net8.0/Example4c-WithLoaderProgress/ETL/IntToStringTransformer.cs b/examples/Net8.0/Example4c-WithLoaderProgress/ETL/IntToStringTransformer.cs index 33b52ad..418c2d8 100644 --- a/examples/Net8.0/Example4c-WithLoaderProgress/ETL/IntToStringTransformer.cs +++ b/examples/Net8.0/Example4c-WithLoaderProgress/ETL/IntToStringTransformer.cs @@ -1,7 +1,8 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example4c_WithLoaderProgress.ETL; -internal class IntToStringTransformer + +internal class IntToStringTransformer : ITransformAsync, ITransformWithProgressAsync { @@ -29,14 +30,14 @@ public int ProgressInterval public async IAsyncEnumerable TransformAsync(IAsyncEnumerable items) { Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items) { Console.WriteLine($"Transforming integer {item} to string."); await Task.Delay(50); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } diff --git a/examples/Net8.0/Example4c-WithLoaderProgress/Program.cs b/examples/Net8.0/Example4c-WithLoaderProgress/Program.cs index 8a8f82d..29f8273 100644 --- a/examples/Net8.0/Example4c-WithLoaderProgress/Program.cs +++ b/examples/Net8.0/Example4c-WithLoaderProgress/Program.cs @@ -1,6 +1,7 @@ using Example4c_WithLoaderProgress.ETL; namespace Example4c_WithLoaderProgress; + internal class Program { private static async Task Main() diff --git a/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/ETL/ConsoleLoader.cs b/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/ETL/ConsoleLoader.cs index 74beb1a..a39e443 100644 --- a/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/ETL/ConsoleLoader.cs +++ b/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/ETL/ConsoleLoader.cs @@ -1,6 +1,7 @@ using Wolfgang.Etl.Abstractions; namespace Example5a_ExtractorWithProgressAndCancellation.ETL; + internal class ConsoleLoader : ILoadWithProgressAndCancellationAsync { @@ -37,7 +38,7 @@ public async Task LoadAsync(IAsyncEnumerable items) Console.WriteLine($"Loading item: {item}\n"); await Task.Delay(50); // Simulate some delay for loading } - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} completed.\n"); } @@ -47,14 +48,14 @@ public async Task LoadAsync(IAsyncEnumerable items, CancellationToken to { ArgumentNullException.ThrowIfNull(items); - + Console.WriteLine($"{ConsoleColors.Green}Loading{ConsoleColors.Reset} data to console asynchronously...\n"); await foreach (var item in items.WithCancellation(token)) { // You can either throw an exception if cancellation is requested // token.ThrowIfCancellationRequested(); - + // or gracefully handle it. if (token.IsCancellationRequested) { diff --git a/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/ETL/FibonacciExtractor.cs b/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/ETL/FibonacciExtractor.cs index 7572ae4..f56c34f 100644 --- a/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/ETL/FibonacciExtractor.cs +++ b/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/ETL/FibonacciExtractor.cs @@ -2,6 +2,7 @@ using Wolfgang.Etl.Abstractions; namespace Example5a_ExtractorWithProgressAndCancellation.ETL; + internal class FibonacciExtractor : IExtractWithProgressAndCancellationAsync { private int _progressInterval = 1_000; @@ -116,7 +117,7 @@ public async IAsyncEnumerable ExtractAsync(IProgress progress, var count = 0; await using var timer = new Timer - ( + ( _ => progress.Report(new EtlProgress(Volatile.Read(ref count))), state: null, TimeSpan.Zero, diff --git a/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/ETL/IntToStringTransformer.cs b/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/ETL/IntToStringTransformer.cs index 1160d1f..975236a 100644 --- a/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/ETL/IntToStringTransformer.cs +++ b/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/ETL/IntToStringTransformer.cs @@ -2,6 +2,7 @@ using Wolfgang.Etl.Abstractions; namespace Example5a_ExtractorWithProgressAndCancellation.ETL; + internal class IntToStringTransformer : ITransformWithProgressAndCancellationAsync { @@ -34,14 +35,14 @@ IAsyncEnumerable items ArgumentNullException.ThrowIfNull(items); Console.WriteLine($"{ConsoleColors.Green}Transforming{ConsoleColors.Reset} integers to strings asynchronously...\n"); - + await foreach (var item in items) { Console.WriteLine($"Transforming integer {item} to string."); await Task.Delay(50); // Simulate some delay for transformation yield return item.ToString(); } - + Console.WriteLine($"{ConsoleColors.Green}Transformation{ConsoleColors.Reset} completed.\n"); } @@ -49,7 +50,7 @@ IAsyncEnumerable items public async IAsyncEnumerable TransformAsync ( - IAsyncEnumerable items, + IAsyncEnumerable items, [EnumeratorCancellation] CancellationToken token ) { @@ -75,7 +76,7 @@ [EnumeratorCancellation] CancellationToken token public async IAsyncEnumerable TransformAsync ( - IAsyncEnumerable items, + IAsyncEnumerable items, IProgress progress ) { diff --git a/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/Program.cs b/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/Program.cs index e53fb69..6ca3646 100644 --- a/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/Program.cs +++ b/examples/Net8.0/Example5a-ExtractorWithProgressAndCancellation/Program.cs @@ -1,6 +1,7 @@ using Example5a_ExtractorWithProgressAndCancellation.ETL; namespace Example5a_ExtractorWithProgressAndCancellation; + internal class Program { private static async Task Main() diff --git a/examples/Net8.0/Example6-ReducingDuplicateCode/ConsoleColors.cs b/examples/Net8.0/Example6-ReducingDuplicateCode/ConsoleColors.cs index 22571a1..4f85d87 100644 --- a/examples/Net8.0/Example6-ReducingDuplicateCode/ConsoleColors.cs +++ b/examples/Net8.0/Example6-ReducingDuplicateCode/ConsoleColors.cs @@ -1,4 +1,5 @@ namespace Example6_ReducingDuplicateCode; + internal class ConsoleColors { public const string Green = "\e[32m"; diff --git a/examples/Net8.0/Example6-ReducingDuplicateCode/ETL/ConsoleLoader.cs b/examples/Net8.0/Example6-ReducingDuplicateCode/ETL/ConsoleLoader.cs index 34674eb..451fafe 100644 --- a/examples/Net8.0/Example6-ReducingDuplicateCode/ETL/ConsoleLoader.cs +++ b/examples/Net8.0/Example6-ReducingDuplicateCode/ETL/ConsoleLoader.cs @@ -1,6 +1,7 @@ -using Wolfgang.Etl.Abstractions; +using Wolfgang.Etl.Abstractions; namespace Example6_ReducingDuplicateCode.ETL; + internal class ConsoleLoader : ILoadWithProgressAndCancellationAsync { @@ -67,8 +68,8 @@ public Task LoadAsync(IAsyncEnumerable items, IProgress pro private async Task WorkerAsync ( - IAsyncEnumerable items, - IProgress? progress, + IAsyncEnumerable items, + IProgress? progress, CancellationToken token ) { diff --git a/examples/Net8.0/Example6-ReducingDuplicateCode/ETL/FibonacciExtractor.cs b/examples/Net8.0/Example6-ReducingDuplicateCode/ETL/FibonacciExtractor.cs index 5740abf..dffca67 100644 --- a/examples/Net8.0/Example6-ReducingDuplicateCode/ETL/FibonacciExtractor.cs +++ b/examples/Net8.0/Example6-ReducingDuplicateCode/ETL/FibonacciExtractor.cs @@ -1,7 +1,8 @@ -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; using Wolfgang.Etl.Abstractions; namespace Example6_ReducingDuplicateCode.ETL; + internal class FibonacciExtractor : IExtractWithProgressAndCancellationAsync { private int _progressInterval = 1_000; @@ -28,7 +29,7 @@ public int ProgressInterval public IAsyncEnumerable ExtractAsync() { - return WorkerAsync(progress: null, CancellationToken.None); + return WorkerAsync(progress: null, CancellationToken.None); } @@ -51,7 +52,7 @@ public IAsyncEnumerable ExtractAsync(IProgress progress) public IAsyncEnumerable ExtractAsync ( - IProgress progress, + IProgress progress, CancellationToken token ) { @@ -64,7 +65,7 @@ CancellationToken token private async IAsyncEnumerable WorkerAsync ( - IProgress? progress, + IProgress? progress, [EnumeratorCancellation] CancellationToken token ) { diff --git a/examples/Net8.0/Example6-ReducingDuplicateCode/ETL/IntToStringTransformer.cs b/examples/Net8.0/Example6-ReducingDuplicateCode/ETL/IntToStringTransformer.cs index 2846085..baa472a 100644 --- a/examples/Net8.0/Example6-ReducingDuplicateCode/ETL/IntToStringTransformer.cs +++ b/examples/Net8.0/Example6-ReducingDuplicateCode/ETL/IntToStringTransformer.cs @@ -1,7 +1,8 @@ -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; using Wolfgang.Etl.Abstractions; namespace Example6_ReducingDuplicateCode.ETL; + internal class IntToStringTransformer : ITransformWithProgressAndCancellationAsync { @@ -40,7 +41,7 @@ IAsyncEnumerable items public IAsyncEnumerable TransformAsync ( - IAsyncEnumerable items, + IAsyncEnumerable items, CancellationToken token ) { @@ -53,7 +54,7 @@ CancellationToken token public IAsyncEnumerable TransformAsync ( - IAsyncEnumerable items, + IAsyncEnumerable items, IProgress progress ) { diff --git a/examples/Net8.0/Example6-ReducingDuplicateCode/EtlProgress.cs b/examples/Net8.0/Example6-ReducingDuplicateCode/EtlProgress.cs index 4adbca5..b855ef9 100644 --- a/examples/Net8.0/Example6-ReducingDuplicateCode/EtlProgress.cs +++ b/examples/Net8.0/Example6-ReducingDuplicateCode/EtlProgress.cs @@ -1,2 +1,3 @@ namespace Example6_ReducingDuplicateCode; + internal record EtlProgress(int CurrentCount); diff --git a/examples/Net8.0/Example6-ReducingDuplicateCode/Program.cs b/examples/Net8.0/Example6-ReducingDuplicateCode/Program.cs index 171ab81..0d01147 100644 --- a/examples/Net8.0/Example6-ReducingDuplicateCode/Program.cs +++ b/examples/Net8.0/Example6-ReducingDuplicateCode/Program.cs @@ -1,6 +1,7 @@ -using Example6_ReducingDuplicateCode.ETL; +using Example6_ReducingDuplicateCode.ETL; namespace Example6_ReducingDuplicateCode; + internal class Program { private static async Task Main() @@ -17,7 +18,7 @@ private static async Task Main() await EtlWithNoProgressOrCancellation().ConfigureAwait(false); - + await EtlWithCancellationToken().ConfigureAwait(false); @@ -31,7 +32,7 @@ private static async Task Main() } - + private static async Task EtlWithNoProgressOrCancellation() { var extractor = new FibonacciExtractor(); diff --git a/src/Wolfgang.Etl.Abstractions/IExtractAsync.cs b/src/Wolfgang.Etl.Abstractions/IExtractAsync.cs index 1e383cb..23676e7 100644 --- a/src/Wolfgang.Etl.Abstractions/IExtractAsync.cs +++ b/src/Wolfgang.Etl.Abstractions/IExtractAsync.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Wolfgang.Etl.Abstractions; @@ -35,4 +35,4 @@ public interface IExtractAsync /// IAsyncEnumerable<TSource> - The result may be an empty sequence if no data is available or if the extraction fails. /// IAsyncEnumerable ExtractAsync(); -} \ No newline at end of file +} diff --git a/src/Wolfgang.Etl.Abstractions/IExtractWithCancellationAsync.cs b/src/Wolfgang.Etl.Abstractions/IExtractWithCancellationAsync.cs index ff8aefb..6201ac5 100644 --- a/src/Wolfgang.Etl.Abstractions/IExtractWithCancellationAsync.cs +++ b/src/Wolfgang.Etl.Abstractions/IExtractWithCancellationAsync.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading; namespace Wolfgang.Etl.Abstractions; diff --git a/src/Wolfgang.Etl.Abstractions/IExtractWithProgressAndCancellationAsync.cs b/src/Wolfgang.Etl.Abstractions/IExtractWithProgressAndCancellationAsync.cs index 5d71d4d..c831893 100644 --- a/src/Wolfgang.Etl.Abstractions/IExtractWithProgressAndCancellationAsync.cs +++ b/src/Wolfgang.Etl.Abstractions/IExtractWithProgressAndCancellationAsync.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; diff --git a/src/Wolfgang.Etl.Abstractions/IExtractWithProgressAsync.cs b/src/Wolfgang.Etl.Abstractions/IExtractWithProgressAsync.cs index 6d5d6e9..766e0a7 100644 --- a/src/Wolfgang.Etl.Abstractions/IExtractWithProgressAsync.cs +++ b/src/Wolfgang.Etl.Abstractions/IExtractWithProgressAsync.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; @@ -43,4 +43,4 @@ IAsyncEnumerable ExtractAsync ( IProgress progress ); -} \ No newline at end of file +} diff --git a/src/Wolfgang.Etl.Abstractions/ILoadAsync.cs b/src/Wolfgang.Etl.Abstractions/ILoadAsync.cs index 25c0d0b..f9c1b8f 100644 --- a/src/Wolfgang.Etl.Abstractions/ILoadAsync.cs +++ b/src/Wolfgang.Etl.Abstractions/ILoadAsync.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading.Tasks; @@ -41,4 +41,4 @@ Task LoadAsync ( IAsyncEnumerable items ); -} \ No newline at end of file +} diff --git a/src/Wolfgang.Etl.Abstractions/ILoadWithCancellationAsync.cs b/src/Wolfgang.Etl.Abstractions/ILoadWithCancellationAsync.cs index 5942067..3cec7ab 100644 --- a/src/Wolfgang.Etl.Abstractions/ILoadWithCancellationAsync.cs +++ b/src/Wolfgang.Etl.Abstractions/ILoadWithCancellationAsync.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -46,4 +46,4 @@ Task LoadAsync IAsyncEnumerable items, CancellationToken token ); -} \ No newline at end of file +} diff --git a/src/Wolfgang.Etl.Abstractions/ILoadWithProgressAndCancellationAsync.cs b/src/Wolfgang.Etl.Abstractions/ILoadWithProgressAndCancellationAsync.cs index 86bf7c7..0ff535f 100644 --- a/src/Wolfgang.Etl.Abstractions/ILoadWithProgressAndCancellationAsync.cs +++ b/src/Wolfgang.Etl.Abstractions/ILoadWithProgressAndCancellationAsync.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; @@ -52,4 +52,4 @@ Task LoadAsync IProgress progress, CancellationToken token ); -} \ No newline at end of file +} diff --git a/src/Wolfgang.Etl.Abstractions/ILoadWithProgressAsync.cs b/src/Wolfgang.Etl.Abstractions/ILoadWithProgressAsync.cs index 6be9c26..1c5a8d5 100644 --- a/src/Wolfgang.Etl.Abstractions/ILoadWithProgressAsync.cs +++ b/src/Wolfgang.Etl.Abstractions/ILoadWithProgressAsync.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading.Tasks; @@ -44,4 +44,4 @@ Task LoadAsync IAsyncEnumerable items, IProgress progress ); -} \ No newline at end of file +} diff --git a/src/Wolfgang.Etl.Abstractions/ITransformAsync.cs b/src/Wolfgang.Etl.Abstractions/ITransformAsync.cs index e7806c2..e7ae745 100644 --- a/src/Wolfgang.Etl.Abstractions/ITransformAsync.cs +++ b/src/Wolfgang.Etl.Abstractions/ITransformAsync.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; @@ -37,4 +37,4 @@ IAsyncEnumerable TransformAsync ( IAsyncEnumerable items ); -} \ No newline at end of file +} diff --git a/src/Wolfgang.Etl.Abstractions/ITransformWithCancellationAsync.cs b/src/Wolfgang.Etl.Abstractions/ITransformWithCancellationAsync.cs index 62aeb3d..9323e51 100644 --- a/src/Wolfgang.Etl.Abstractions/ITransformWithCancellationAsync.cs +++ b/src/Wolfgang.Etl.Abstractions/ITransformWithCancellationAsync.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading; @@ -42,4 +42,4 @@ IAsyncEnumerable TransformAsync IAsyncEnumerable items, CancellationToken token ); -} \ No newline at end of file +} diff --git a/src/Wolfgang.Etl.Abstractions/ITransformWithProgressAndCancellationAsync.cs b/src/Wolfgang.Etl.Abstractions/ITransformWithProgressAndCancellationAsync.cs index 48df77a..5338482 100644 --- a/src/Wolfgang.Etl.Abstractions/ITransformWithProgressAndCancellationAsync.cs +++ b/src/Wolfgang.Etl.Abstractions/ITransformWithProgressAndCancellationAsync.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; @@ -49,4 +49,4 @@ IAsyncEnumerable TransformAsync IProgress progress, CancellationToken token ); -} \ No newline at end of file +} diff --git a/src/Wolfgang.Etl.Abstractions/ITransformWithProgressAsync.cs b/src/Wolfgang.Etl.Abstractions/ITransformWithProgressAsync.cs index 0723025..c25919e 100644 --- a/src/Wolfgang.Etl.Abstractions/ITransformWithProgressAsync.cs +++ b/src/Wolfgang.Etl.Abstractions/ITransformWithProgressAsync.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; @@ -40,4 +40,4 @@ IAsyncEnumerable TransformAsync IAsyncEnumerable items, IProgress progress ); -} \ No newline at end of file +} diff --git a/src/Wolfgang.Etl.Abstractions/Wolfgang.Etl.Abstractions.csproj b/src/Wolfgang.Etl.Abstractions/Wolfgang.Etl.Abstractions.csproj index fa82319..c4f9801 100644 --- a/src/Wolfgang.Etl.Abstractions/Wolfgang.Etl.Abstractions.csproj +++ b/src/Wolfgang.Etl.Abstractions/Wolfgang.Etl.Abstractions.csproj @@ -2,7 +2,7 @@ net462;net472;net48;net481; - netstandard2.0;netstandard2.1; + netstandard2.0; netcoreapp3.1; net5.0;net6.0;net7.0; net8.0;net9.0;net10.0 @@ -14,7 +14,7 @@ $(AssemblyName) Chris Wolfgang Contains interfaces and base classes used to build ETL applications - Copyright 2025 Chris Wolfgang + Copyright 2025 Chris Wolfgang https://github.com/Chris-Wolfgang/ETL-Abstractions README.md https://github.com/Chris-Wolfgang/ETL-Abstractions @@ -43,6 +43,13 @@ + + + true + + diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/ExtractorBaseTests.cs b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/ExtractorBaseTests.cs index 454406c..8b1aa16 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/ExtractorBaseTests.cs +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/ExtractorBaseTests.cs @@ -320,7 +320,7 @@ public async Task ExtractWithProgressAndCancellationAsync_when_passed_null_progr } - + [ExcludeFromCodeCoverage] [Fact(Skip = "Not working due to timing issues")] public async Task ExtractWithProgressAsync_invokes_progress_callback() { @@ -335,6 +335,7 @@ public async Task ExtractWithProgressAsync_invokes_progress_callback() + [ExcludeFromCodeCoverage] [Fact(Skip = "Not working due to timing issues")] public async Task ExtractWithProgressAsync_progress_callback_receives_current_item_count() { @@ -350,6 +351,7 @@ public async Task ExtractWithProgressAsync_progress_callback_receives_current_it + [ExcludeFromCodeCoverage] [Fact(Skip = "Not working due to timing issues")] public async Task ExtractWithProgressAndCancellationAsync_invokes_progress_callback() { @@ -364,6 +366,7 @@ public async Task ExtractWithProgressAndCancellationAsync_invokes_progress_callb + [ExcludeFromCodeCoverage] [Fact(Skip = "Not working due to timing issues")] public async Task ExtractWithProgressAndCancellationAsync_progress_callback_receives_current_item_count() { diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/LoaderBaseTests.cs b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/LoaderBaseTests.cs index 2cca967..9ed59b2 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/LoaderBaseTests.cs +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/LoaderBaseTests.cs @@ -145,6 +145,7 @@ public async Task LoadWithProgressAsync_returns_expected_results() + [ExcludeFromCodeCoverage] [Fact(Skip = "Not working due to timing issues")] public async Task LoadWithProgressAsync_invokes_progress_callback() { @@ -160,6 +161,7 @@ public async Task LoadWithProgressAsync_invokes_progress_callback() + [ExcludeFromCodeCoverage] [Fact(Skip = "Not working due to timing issues")] public async Task LoadWithProgressAsync_progress_callback_receives_current_item_count() { @@ -246,6 +248,7 @@ public async Task LoadWithProgressAndCancellationAsync_returns_expected_results( + [ExcludeFromCodeCoverage] [Fact(Skip = "Not working due to timing issues")] public async Task LoadWithProgressAndCancellationAsync_invokes_progress_callback() { @@ -261,6 +264,7 @@ public async Task LoadWithProgressAndCancellationAsync_invokes_progress_callback + [ExcludeFromCodeCoverage] [Fact(Skip = "Not working due to timing issues")] public async Task LoadWithProgressAndCancellationAsync_progress_callback_receives_current_item_count() { diff --git a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/TransformerBaseTests.cs b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/TransformerBaseTests.cs index 9077682..0435fdb 100644 --- a/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/TransformerBaseTests.cs +++ b/tests/Wolfgang.Etl.Abstractions.Tests.Unit/BaseClassTests/TransformerBaseTests.cs @@ -375,8 +375,8 @@ public void CurrentSkippedItemCount_default_value_is_zero() + [ExcludeFromCodeCoverage] [Fact(Skip = "Not working due to timing issues")] - public async Task TransformWithProgressAsync_invokes_progress_callback() { var sut = new IntToStringTransformerFromTransformerBase(); @@ -391,6 +391,7 @@ public async Task TransformWithProgressAsync_invokes_progress_callback() + [ExcludeFromCodeCoverage] [Fact(Skip = "Not working due to timing issues")] public async Task TransformWithProgressAsync_progress_callback_receives_current_item_count() { @@ -407,8 +408,8 @@ public async Task TransformWithProgressAsync_progress_callback_receives_current_ + [ExcludeFromCodeCoverage] [Fact(Skip = "Not working due to timing issues")] - public async Task TransformWithProgressAndCancellationAsync_invokes_progress_callback() { var sut = new IntToStringTransformerFromTransformerBase(); @@ -423,8 +424,8 @@ public async Task TransformWithProgressAndCancellationAsync_invokes_progress_cal + [ExcludeFromCodeCoverage] [Fact(Skip = "Not working due to timing issues")] - public async Task TransformWithProgressAndCancellationAsync_progress_callback_receives_current_item_count() { var sut = new IntToStringTransformerFromTransformerBase();