SkillAgentSearch skills...

DotNetTips.Spargine.8

Spargine libraries for .NET 8

Install / Use

/learn @RealDotNetDave/DotNetTips.Spargine.8
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

DotNetTips.Spargine for Microsoft .NET 8: v2026.8.1.1

Spargine 8

Open-source .NET assemblies from dotNetTips.com and <a href="https://dotnettips.wordpress.com/about/" target="_blank">David (dotNetDave) McCarter</a>. This repository hosts the dotNetTips.Spargine codebase for .NET 8 & 9. Spargine encompasses foundational code that I’ve been building and perfecting since the early days of .NET 2. In addition to the core library, it includes a dedicated library to support efficient testing and another designed specifically for benchmarking your code, helping you achieve optimal performance with ease.

Please support this project by <a href="https://github.com/sponsors/RealDotNetDave" target="_blank">clicking here</a>. <a href="https://dotnettips.wordpress.com/spargine/" target="_blank">Click here</a> to visit the Spargine page on dotNetTips.com. Much of this code is also documented on <a href="https://dotnettips.wordpress.com/category/open-source/spargine/" target="_blank">dotNetTips.com</a>.

NuGet

All of the assemblies listed below can be found on NuGet by <a href="https://www.nuget.org/profiles/davidmccarter" target="_blank">clicking here</a>.

Projects

Below is the list of current projects in this repository

  • DotNetTips.Spargine: Windows and File I/O Targeting Library.
    • IO
      • DirectoryHelper: Common methods for working with file directories.
      • DriveHelper: Common methods for working with disk drives.
      • FileHelper: Common methods for working with files.
      • FileProcessor: Facilitates file copying and deletion operations, incorporating event handling for files. Additionally, it offers the capability to delete folders.
      • PathHelper: Common methods for path manipulation, encompassing handling invalid filter characters, invalid path names, and path separators.
      • TempFileManager: Creates and maintains a list of temporary files.
    • Net
      • Http
        • HttpClientHelper: Utility methods for HttpClient.
      • Sockets
        • SocketsHelper: Helper methods for Socket operations.
    • Win32
      • RegistryHelper: Convenient methods for interacting with the Windows registration database, streamlining access and manipulation tasks.
    • Service: Convenient helper methods for seamless management of Windows services, offering key features such as loading a service, checking its running status, starting and stopping services, and more.
  • DotNetTips.Spargine.Core: Core library used by all of the other assemblies.
    • Cache
      • InMemoryCache: MemoryCache with a default duration of 20 minutes for storing objects in memory.
    • Collections
      • Generic
        • Concurrent
          • ChannelQueue: QueueManager class featuring the ListenAsync method for common queuing of items.
          • ConcurrentHashSet: Represents a thread-safe, hash-based unique collection.
          • DistinctBlockingCollection: A custom thread-safe collection type designed for multi-threading tasks, ensuring uniqueness for all items in the collection.
          • DistinctConcurrentBag: Inherits from ConcurrentBag<T> and ensures that all items in the bag are unique.
        • AutoDefaultDictionary: The AutoDefaultDictionary is a specialized dictionary type that automatically returns a predefined default value when a key is not found. This eliminates the need for explicit error handling or null checks when accessing non-existent keys.
        • FastSortedList: Custom Collection Class for <T>. Items within this collection are sorted only upon request.
        • ObservableList: Custom Observable Collection Class for <T>. Includes the following events: CollectionChanged, PropertyChanged, PropertyChanging.
      • CollectionRandomizer: Designed to shuffle a collection either once or endlessly. Enables users to retrieve items using the GetNext() method.
    • Devices
      • Clock: Time Utility Class for common tasks related to clocks and time. It includes functionalities to retrieve the current time and tick count, along with a method to determine the number of days in the current month (DaysInCurrentMonth).
    • Diagnostics
      • PerformanceStopwatch: Enhances Stopwatch with helpful methods: StartNew() and StopReset(). Additionally, it possesses the ability to add messages that can be retrieved when the Stopwatch stops.
    • Logging
      • FastLogger: This class efficiently logs to any ILogger object, providing rapid logging for Critical, Debug, Error, Exception, Information, Trace, and Warning messages.
      • LoggingHelper: Utility methods designed for logging purposes. Includes functionality to log computer information and application details. Additionally, it can capture and log all domain exceptions, even if the exception originates from a different assembly, covering exceptions from the .NET framework.
    • Network
      • HttpEventListener: Listens and logs messages from HTTP events, capturing events such as request start and stop. This functionality facilitates comprehensive monitoring and logging of HTTP-related activities.
      • HttpEventListenerAsysncLocal: Listens asynchronously and logs messages from HTTP events, including request start and stop. This functionality enables comprehensive monitoring and logging of asynchronous HTTP-related activities.
      • HttpHandlerDiagnosticListener: Accesses the HttpRequestMessage/HttpResponseMessage instances, providing a useful means to retrieve information such as request headers or the response status code.
      • HttpRequestObserver: Observes the HttpRequestMessage/HttpResponseMessage instances, offering a valuable method to retrieve information such as request headers or the response status code.
    • RegularExpressions
      • RegexProcessor: Utility methods for common string regular expressions. Included methods: ContainsWord, IsCreditCardNumber, IsEmailAddress, IsUrl, IsISBN, and more.
    • Security
      • EncryptionHelper: Provides secure encryption for strings using AES (Advanced Encryption Standard) and includes a method to validate encrypted strings. The AES encryption ensures the confidentiality and integrity of sensitive information, making it suitable for securely handling data.
      • PasswordGenerator: Provides functionality to generate random passwords with a mix of uppercase letters, lowercase letters, digits, and special characters.
      • SHA256PasswordHasher: Generates and verifies passwords using SHA256, a secure cryptographic hash function.
      • UlidGenerator: Provides methods to generate and manipulate ULIDs (Universally Unique Lexicographically Sortable Identifiers)
      • PBKDF2PasswordHasher: Provides methods for hashing and verifying passwords using PBKDF2.
      • UlidGenerator: Provides methods to generate and manipulate ULIDs (Universally Unique Lexicographically Sortable Identifiers)
    • Serialization
      • BinarySerialization: Provides methods for serializing and deserializing objects to and from binary format.
      • JsonSerialization: This class simplifies the process of serializing and deserializing strings to and from JSON format using the JsonSerializer. JSON serialization is a widely adopted and efficient method for storing and exchanging data in various applications and APIs.
      • XmlSerialization: Facilitates seamless serialization and deserialization of strings to and from the XML format.
    • Web
      • ServiceProxy: Generates a service proxy for types that implement ICommunicationObject, enabling communication with such objects.
      • WebHelper: Utility methods for website calls. These functions streamline website interactions and efficiently manage HTTP-related tasks.
    • ApiLibraries: List of common Windows API libraries.
    • App: Application Information and Utility Methods.
    • AssemblyHelper: Provides static helper methods for working with assemblies.
    • ArgumentInvalidException: Custom exception type for invalid argument value.
    • ArgumentReadOnlyException: Custom exception type for read-only argument values, such as collections.
    • ComputerInfo: Used to retrieve common computer information.
    • Config: Adaptable type designed to simplify the creation of custom configuration objects, with a focus on easy disk saving in applications.
    • ControlChars: Contains frequently used strings and characters, including backslash, comma, dash, double quote, empty string, forward slash, quote, space, tab, underscore, and more.
    • DirectoryNotFoundException: Custom exception to be utilized when a directory cannot be found.
    • Enumeration: Provides a base class for creating an enumeration-like class structure that supports descriptive names and associated values, offering more flexibility than the standard Enum type.
    • EnumHelper: Facilitates the usage of Enums by providing convenient methods such as AdjustCamelCase(), AdjustName(), GetNames(), and more.
    • EnvironmentKey: Enumeration for common environment keys.
    • ExceptionThrower: Inspired by the .NET ExceptionThrower, this tool streamlines the process of throwing exceptions effortlessly. All exceptions thrown utilize default messages, and if necessary, custom messages can also be provided.
    • ExecutionHelper: When making calls to code that might be interrupted by network issues, the ProgressiveRetry() method proves beneficial. It automatically retries the code multiple times (default is 3) when encountering connection problems or other internet-related interruptions.
    • FastStringBuilder: Enhances performance when usi

Related Skills

View on GitHub
GitHub Stars45
CategoryDevelopment
Updated1mo ago
Forks2

Languages

C#

Security Score

95/100

Audited on Feb 16, 2026

No findings