Skip to content

A set of helper utilities in C# (Exception, threadsafe logging, collection manipulation, etc)

License

Notifications You must be signed in to change notification settings

kevdever/UtilitiesLibrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Utilities Library

A set of C# utilitity methods.

UtilitiesLibrary.Exceptions

  • ExceptionHelpers
    • public static string ConcatInnerExceptions(Exception e)

UtilitiesLibrary.Logging

  • Logger --> A threadsafe logger.
    • public Logger(string path)
    • public Logger(string applicationName, string filename, string subfolderName = null)
    • public void SaveLogEntry(string message)
    • public async Task SaveLogEntryAsync(string message)

UtilitiesLibrary.IEnumerableExtensions

  • Extensions
    • public static IEnumerable<IEnumerable> SplitIntoNChunks(this IEnumerable source, int numChunks)
    • public static IEnumerable<IEnumerable> SplitIntoBatchesOfSize(this IEnumerable source, int batchSize)
    • public static IEnumerable Shuffle(this IEnumerable source)
    • public static IEnumerable Shuffle(this IEnumerable source, Random rng)
  • RandomNumbers
    • public static IEnumerable GetRandomNumbers(int numValues, int maxVal, bool allowRepetition = false)

UtilitiesLibrary.MathConvenience

  • MathConvenience
    • public static double Max(params double[] values)
    • public static double Min(params double[] values)

UtilitiesLibrary.Networking

  • ConnectivityHelpers
    • public static async Task PingIp(string ip, Logging.Logger logger = null)
    • public static bool PingHost(string _HostURI, int _PortNumber)

About

A set of helper utilities in C# (Exception, threadsafe logging, collection manipulation, etc)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages