LogoLogo
HomePricingDocumentation
  • 💿Getting Started
    • Installation and Project Setup
    • Hello Perigee!
    • Perigee Application Design
    • Hello Configuration
    • Hello Logs
    • Hello Integration
    • Troubleshooting
    • Case Studies
  • 📃License + Notice
    • 📂Licensing
    • Notice of Third Party Agreements
  • 🚀Perigee and Beyond
    • Extending - Threads
    • Extending - Loaders
    • ⏳All about CRON
  • 🔮API Generation
    • What is API Generation?
    • API Builder
  • 🗺️Architecting YOUR App
    • Design and Requirements
    • Define Sources
    • Requirements
  • 🧩Core Modules
    • 🌐PerigeeApplication
    • 🪡Thread Registry
    • Event Sources
      • Scheduled/Logic
        • CRON Thread
        • Scheduler
        • Sync Agent
      • Watchers
        • SalesForce
        • Sharepoint
        • Directory Watch
        • Directory Notifier
        • IMAP
    • Credential Management
      • Connection Strings
      • Custom Refresh Logic
      • RestSharp Authenticator
      • Credential Store SDK
      • ⁉️Troubleshooting Credentials
    • Integration Utilities
      • HTTP(S) - RestSharp
      • Transaction Coordinator
      • Limiter
      • Watermarking
    • Alert Managers
      • SMS
      • Email
      • Discord
      • Teams
    • File Formats
      • Excel
      • CSV
    • 📁File System Storage
      • File Revision Store
      • Concurrent File Store
      • FileSync + Cache
    • Third Party
      • SmartSheets
      • Microsoft Graph
    • Perigee In Parallel
      • Parallel Processing Reference
      • Extensions
      • GroupProcessor
      • SingleProcessor
    • 🧱Utility Classes
      • Metrics
      • F(x) Expressions
      • Multi-Threaded Processor (Scatter Gather)
      • OpenAI - GPT
      • XML Converter
      • Dynamic Data Table
      • Debounce
      • Thread Conditions
      • Perigee Utility Class
      • Network Utility
      • Lists
      • FileUtil
      • Inclusive2DRange
      • Strings, Numbers, Dates
      • Nested Sets
      • Behavior Trees
      • JsonCompress
      • Topological Sorting
      • DBDownloader
    • 🈁Bit Serializer
  • 📣Examples and Demos
    • API + Perigee
    • 📰Excel Quick Load
    • SalesForce Watcher
    • Report Scheduler
    • Agent Data Synchronization
    • 📩IMAP Echo bot
    • Watch and load CSVs
    • Graph Delegated Authorization + DataVerse
    • Coordinator Demo
    • Azure Service Bus
    • QuickBooks Online
  • 📘Blueprints
    • Perigee With .NET Hosting
    • Web Host Utilities
    • 🔌Plugin Load Context
  • 🎞️Transforms
    • 🌟What is Transforms?
    • 📘Terminology
    • 🦾The Mapping Document
    • 👾Transformation Process
    • 😎Profile
    • 🎒Automation
      • 🕓Package Options
      • 🔳Configuration
    • 🔧Utilities
      • 🧹Clean
      • 📑Map File
      • 🔎File Identification
      • 🗺️Map Generation
      • 🪅Insert Statement Generation
  • 🗃️Transform SDK
    • 👋Quick Start Guide
    • 🥳MapTo
    • 🔌Authoring Plugins
      • 🔘File IO Process
      • 📢Data Quality
      • 🟢Transform Process
    • SDK Reference
      • 🔘FileIOProcessData
      • 📢DataQualityContext
      • 🎛️TransformDataContext
      • 🏅TransformResult
Powered by GitBook
On this page
  • ParallelProcessToDictionary (DataTable)
  • ParallelProcessToDictionary (IEnumerable)
  • ParallelProcessToGroupProcessor
  • ParallelProcessToSingleProcessor
  • ParallelProcessToBag
  • ParallelProcessToBag (DataTable)
  • ParallelProcessToBag (with ExceptionRows)
  • ParallelProcess (ConcurrentBag)
  • ParallelProcess (ConcurrentDictionary)
Export as PDF
  1. Core Modules
  2. Perigee In Parallel

Extensions

ParallelProcessToDictionary (DataTable)

This extension method processes a DataTable in parallel and returns a ConcurrentDictionary containing the results, with the keys generated by the provided callback.

Example:

DataTable dataTable = GetDataTable();
ConcurrentDictionary<int, DataRow> resultDictionary = dataTable.ParallelProcessToDictionary(row => (int)row["Id"]);

ParallelProcessToDictionary (IEnumerable)

This extension method processes an IEnumerable in parallel and returns a ConcurrentDictionary containing the results, with the keys generated by the provided callback.

Example:

IEnumerable<int> numbers = new List<int> { 1, 2, 3, 4, 5 };
ConcurrentDictionary<int, int> resultDictionary = numbers.ParallelProcessToDictionary(number => new KeyValuePair<int, int>(number, number * 2));

ParallelProcessToGroupProcessor

This extension method processes an IEnumerable in parallel to a new grouped processor.

Example:

IEnumerable<MyClass> myClasses = GetMyClasses();

GroupProcessor<MyClass, string> groupProcessor = myClasses.ParallelProcessToGroupProcessor((x) => x.groupByField);

ParallelProcessToSingleProcessor

Converts an IEnumerable to a SingleProcessor using a provided callback function.

Example:

IEnumerable<int> numbers = new List<int> { 1, 2, 3, 4, 5 };
Expression<Func<int, int>> callback = x => x * 2;

SingleProcessor<int, int> singleProcessor = numbers.ParallelProcessToSingleProcessor(callback);

ParallelProcessToBag

This extension method processes an IEnumerable in parallel and returns a ConcurrentBag containing the transformed items, with the transformation function provided by the callback.

Example:

IEnumerable<int> numbers = new List<int> { 1, 2, 3, 4, 5 };
ConcurrentBag<string> resultBag = numbers.ParallelProcessToBag(number => $"Number: {number}");

ParallelProcessToBag (DataTable)

This extension method processes a DataTable in parallel and returns a ConcurrentBag containing the transformed items, with the transformation function provided by the callback.

Example:

DataTable dataTable = GetDataTable();
ConcurrentBag<int> resultBag = dataTable .ParallelProcessToBag(row => (int)row["Id"]);

ParallelProcessToBag (with ExceptionRows)

This extension method processes an IEnumerable in parallel, returns a ConcurrentBag containing the transformed items, and handles exceptions using the provided callback.

Example:

IEnumerable<int> numbers = new List<int> { 1, 2, 3, 4, 5 };
ConcurrentBag<string> resultBag = numbers.ParallelProcessToBag(
    number => $"Number: {number}",
    exceptions => {
        foreach (var exception in exceptions)
        {
            Console.WriteLine($"Error: {exception.exception.Message}, Item: {exception.Item}");
        }
    });

ParallelProcess (ConcurrentBag)

This extension method processes a ConcurrentBag in parallel, invoking the provided callback for each item.

Example:

ConcurrentBag<int> numbers = new ConcurrentBag<int>(new List<int> { 1, 2, 3, 4, 5 });
numbers.ParallelProcess(number => Console.WriteLine($"Processing number: {number}"));

ParallelProcess (ConcurrentDictionary)

This extension method processes a ConcurrentDictionary in parallel, invoking the provided callback for each key-value pair.

Example:

ConcurrentDictionary<int, string> dictionary = new ConcurrentDictionary<int, string>();
dictionary[1] = "One";
dictionary[2] = "Two";
dictionary[3] = "Three";
dictionary.ParallelProcess(pair => Console.WriteLine($"Processing pair: {pair.Key}, {pair.Value}"));
PreviousParallel Processing ReferenceNextGroupProcessor

Last updated 1 year ago

🧩