This project is read-only.
Craig's Utility Library is one of the largest collections of extension methods and various helper classes out there. It has gotten to the point where if you can think it, it's probably already in there (and if not, put a message on the Issue Tracker and I'll add it when I get bored, which is often). So how much is in there, well let's start with the extension methods:
Utilities.DataTypes.ExtensionMethods
  • Array extensions
    • Clear
    • Combine
  • DateTime extensions
    • DaysInMonth
    • DaysLeftInMonth
    • DaysLeftInYear
    • FirstDayOfMonth
    • FirstDayOfWeek
    • FromUnixTime (actually extension for int and long values)
    • IsInFuture
    • IsInPast
    • IsWeekDay
    • IsWeekEnd
    • LastDayOfMonth
    • LastDayOfWeek
    • ToUnix
    • FirstDayOfQuarter
    • FirstDayOfYear
    • LastDayOfQuarter
    • LastDayOfYear
    • ConvertToTimeZone (assumes that times are in UTC time)
    • LocalTimeZone
    • AddWeeks
    • Age
    • BeginningOfDay
    • EndOfDay
    • IsToday
    • SetTime
    • UTCOffset
  • Generic object extensions
    • If
    • NotIf
    • Return
    • Chain
    • Do
    • Execute
    • ThrowIfTrue
    • ThrowIfFalse
  • ICollection extensions
    • AddAndReturn
    • AddRange
    • AddIf
    • AddIfUnique
    • Remove
    • RemoveRange
  • IComparable extensions
    • Between
  • IDictionary extensions
    • Sort
    • SortByValue
  • IEnumerable extensions
    • Exists
    • For
    • ForEach
    • ForParallel
    • ForEachParallel
    • IsNullOrEmpty
    • RemoveDefaults
    • ToArray
    • ToString
    • TrueForAll
    • TryAll
    • TryAllParallel
    • FalseForAll
    • FalseForAny
    • TrueForAll
    • TrueForAny
    • ThrowIfFalseForAll
    • ThrowIfFalseForAny
    • ThrowIfTrueForAll
    • ThrowIfTrueForAny
    • ElementsBetween
    • First
    • Last
    • ToDataTable
    • ToCSV
    • ToDelimitedFile
  • MatchCollection extensions
    • Where
  • string extensions
    • Encode
    • FromBase64
    • Left
    • Right
    • ToBase64
    • ToByteArray
    • ToFirstCharacterUpperCase
    • ToSentenceCapitalize
    • ToTitleCase
    • NumberTimesOccurs
    • Reverse
    • FilterOutText
    • KeepFilterText
    • AlphaNumericOnly
    • AlphaCharactersOnly
    • NumericOnly
    • IsUnicode
    • FormatString
    • RegexFormat
    • ExpandTabs
    • StripLeft
    • StripRight
    • Pluralize
    • Singularize
    • Center
    • MaskLeft
    • MaskRight
    • UrlDecode
    • UrlEncode
  • Various type conversion/type checking extensions
    • FormatToString
    • IsNotDefault
    • IsDefault
    • IsNotNull
    • IsNull
    • IsNotNullOrDBNull
    • IsNullOrDBNull
    • NullCheck
    • ThrowIfDefault
    • ThrowIfNullOrEmpty
    • ThrowIfNullOrDBNull
    • ToSQLDbType
    • ToDbType
    • ToType
    • TryTo
  • Various value type extensions
    • ToBool (int)
    • ToInt (bool)
    • ToBase64String (byte array)
    • ToEncodedString (byte array)
    • IsUnicode (byte array)
  • TimeSpan Extensions
    • Years
    • Months
    • DaysRemainder
  • DataTable Extensions
    • ToList
    • ToCSV
    • ToDelimitedFile
Utilities.Math.ExtensionMethods
  • Math extensions
    • Between
    • Clamp
    • Factorial
    • Max
    • Median
    • Min
    • Mode
    • Pow
    • Round
    • StandardDeviation
    • Sqrt
    • Variance
    • Permute
Utilities.SQL.ExtensionMethods
  • DbCommand extensions
    • AddParameter
    • BeginTransaction
    • ClearParameters
    • Close
    • Commit
    • ExecuteDataSet
    • ExecuteScalar
    • GetOutputParameter
    • Open
    • Rollback
  • DbDataReader extensions
    • GetParameter
Utilities.Compression.ExtensionMethods
  • Compress (both byte arrays and strings)
  • Decompress (both byte arrays and strings)
Utilities.Encryption.ExtensionMethods
  • Hash (Now handles all hash algorithms in one function for both byte arrays and strings)
  • Encrypt (Handles any symmetric encryption algorithm inside .Net)
  • Decrypt (Handles any symmetric encryption algorithm inside .Net)
Utilities.IO.ExtensionMethods
  • DirectoryInfo extensions
    • CopyTo
    • DeleteAll
    • DeleteFiles
    • DeleteFilesNewerThan
    • DeleteFilesOlderThan
    • Size
    • SetAttribute
    • DriveInfo
    • DeleteDirectoriesNewerThan
    • DeleteDirectoriesOlderThan
  • FileInfo extensions
    • Append
    • CompareTo
    • Read
    • ReadBinary
    • Save
    • SaveAsync
    • SetAttributes
    • DriveInfo
    • Execute
  • String extensions
    • RemoveIllegalDirectoryNameCharacters
    • RemoveIllegalFileNameCharacters
  • Serialization extensions
    • ToBinary
    • ToJSON
    • ToSOAP
    • ToXML
    • ToObject
    • JSONToObject
    • SOAPToObject
    • XMLToObject
  • Uri extensions
    • Read
    • ReadBinary
    • Execute
Utilities.Web.ExtensionMethods
  • Web related extensions
    • AbsoluteRoot
    • AddScriptFile
    • ContainsHTML
    • HTTPCompress
    • IsEncodingAccepted
    • RelativeRoot
    • RemoveURLIllegalCharacters
    • SetEncoding
    • StripHTML
  • IPAddress extensions
    • GetHostName
  • Minification
    • Combine (can be used for HTML,JavaScript, or CSS)
    • Minify (can be used for HTML, JavaScript, or CSS)
  • HttpRequest extensions
    • IsMobile
Utilities.Image.ExtensionMethods
  • All Bitmap functions were moved
    • Added ToBase64 extension method
    • Added DrawRoundedRectangle extension
  • Screen extensions
    • TakeScreenShot
Utilities.Error.ExtensionMethods
  • Various error related extensions
    • DumpApplicationState
    • DumpCache
    • DumpCookies
    • DumpRequestVariable
    • DumpResponseVariable
    • DumpServerVars
    • DumpSession
Utilities.Reflection.ExtensionMethods
  • Various reflection related extensions
    • CallMethod
    • CreateInstance
    • DumpProperties
    • GetAttribute
    • GetAttributes
    • GetName
    • GetObjects
    • GetProperty
    • GetPropertyGetter
    • GetPropertyName
    • GetPropertyType
    • GetPropertySetter
    • GetTypes
    • IsIEnumerable
    • IsOfType
    • Load
    • LoadAssemblies
    • MarkedWith
    • MakeShallowCopy
    • SetProperty
    • ToLongVersionString
    • ToShortVersionString
Utilities.Environment.ExtensionMethods
  • Process related extensions
    • KillProcessAsync
    • GetInformation

On top of that there are a number of helper classes for a number of various tasks including (note that there are actually more, this is what I can remember off the top of my head):
  • Email
    • Pop3 client (SSL capable)
    • MIME parser
    • SMTP email sending (SSL capable)
    • Exchange inbox email retrieval
  • Image manipulation (one of the larger collections of functions dealing in image manipulation out there)
    • Most image functions are multithreaded and thus act extremely quickly.
    • Cropping, resizing, rotating, flipping
    • To black and white or sepia tone
    • Threshold and edge detection (including Sobel and Laplace)
    • Text drawing, watermarks, object drawing helpers
    • Taking a screenshot which spans monitors
    • RGB Histograms
    • Various convolution filters such as sharpen, sobel emboss, etc. along with the ability to create your own easily.
    • Various other filters such as "jitter", pixelate, sin wave, median filter, and dilation, red/green/blue filters,
    • Multiple blurring techniques including box blur, Gaussian blur, Kuwahara, and Symmetric Nearest Neighbor blur
    • Bump map and Normal map helpers
    • ASCII art generator
    • Adjust brightness, gamma, and contrast
  • Active Directory querying
    • Includes functions for active users, all users, all groups, active members in groups, etc.
  • Exchange querying
    • Free/Busy data
    • Get next/previous available time for appointments
    • Get contacts
    • Get appointments/events
    • Get emails
    • Get the GAL
  • SQL query helper (which includes bulk copying functionality)
  • MicroORM
  • ORM (which includes lazy loading, etc.)
  • SQL Server structural analysis helpers
  • File formats/Microformats
    • XMDP
    • RSS (with iTunes/Zune information embedded for podcasts)
    • vCard/hCard
    • vCalendar/hCalendar
    • iCalendar (with email sending capabilities, cancellation, and automatically putting it in Exchange)
    • APML
    • OPML
    • XFN
    • CSV (really any delimited file) with functions to convert it to a list of objects or a DataTable
    • RSD
    • BlogML
    • INI
  • Cisco phone app helpers
  • WMI query helpers
  • Code to render a web page to BMP file
  • Icon extraction from a file
  • WebBrowser control cache clearing class
  • Helper classes for simplifying System.Reflection.Emit namespace
  • Randomization
    • Completely generic, using Next<T>() and NextClass<T>() extensions.
    • Has generators for all basic .Net data types (int, long, float, double, DateTime, TimeSpan, Color, etc.)
    • Multiple string generators (Ipsum Lorem, company name, male/female names, patterns, phone numbers, zip codes, city names, etc).
    • Includes thread safe randomization function.
  • Environment information
  • Process management
  • Error/Information gathering
  • Math related classes
    • Matrix
    • Vector3
    • Set
    • Factorial
    • Permutation
  • Data types
    • Vector
    • Bag
    • List
    • ListMapping
    • Priority Queue
    • BTree
    • DateSpan
  • Base classes for various patterns including
    • Singleton
    • Factory
  • OAuth helper class
  • Code for setting up an OpenID relay
  • REST helper class
  • Classes to help with various media services/websites including
    • Twitter
    • Hulu
    • Netflix
    • Craigslist
    • eBay
  • Naive Bayes classifier
  • Validation classes
  • Caching helper classes
  • Logging helper classes
  • Configuration helper classes
  • AOP helper classes

On top of that I add new code, bug fixes, etc. quite frequently through the code repository.

Last edited Sep 1, 2012 at 3:32 AM by JaCraig, version 5

Comments

reiniero Jan 8, 2012 at 8:20 AM 
Awesome list of features. Love the "off the top of my head" remark ;) I'll be sure to have a look whenever I need to code in .Net again...