NOTE:  This project has been moved to the HashTag.Core Project on GitHub.  Code here is for reference purposes only.

 

HashTag .Net Developer Utility Library

Library Summary

Namespace Summary Examples and Notes
Collections Handles things like data structures and groups of objects AsyncBuffer - a multi-threaded FIFO buffer. Used in our logging subsystem but can be used anytime you need out of band buffering. Tree - supports traditional tree operations
Configuration Retrieve strong typed values from .config Robust methods and patterns for grabbing and using values from configuration files
Cryptography Encode & decode objects using internal and external keys Decrypt, Encrypt,Hash (Rijndael with 256 bit key)
Diagnostics A log wrapper to easily integrate logging and tracing A zero-config (no configuration necessary), out-of-band, high speed rolling file name logging facade. Stand-alone or integrates with log4Net, EntLib.Logging, .Net tracing, and NLog.
i18N Utilities around dealing with various kinds of spatial, globalization, and internationalization Coordinate - mathematical, comparison, and ToString(). Culture Codes enumeration - RFC1766 collection. DistanceSpan - operations and conversions around distance. Supports both Metric and English systems.
IO Deals with streams and file based operations ToBytes - convert an object into byte array. CleanFileName - remove operating system invalid characters from a string. StreamToBytes - convert any stream into byte array. BytesToStream - convert array of bytes to stream
Net Operations relating to network protocols MIME - supports MIME types, determining MIME types from file extensions, getting an icon for a particular MIME type, etc. Very helpful when we were receiving files from callers or streaming a requested file back to a caller.
   
Reflection Interrogates runtime environment AssemblyVersion - retrieves values stored typically stored in the AssemblyInfo.cs file of projects. ProviderFactory - load and instantiate classes from file system. Resources - open/read files embedded in an assembly
     
Serialization Lightweight wrappers around common conversion patterns Supports JSON, SOAP and XML. Includes Extension overloads
ServiceModel Patterns around WCF Self hosting library particularly useful for short console applications or exercising your services without IIS. Great for development and testing scenarios.
Text String construction and manipulation Code snippets for things such as Left, Right, MaskRight/MaskLeft (for partial masking such as SSN and CreditCards)
Web Web centric helper methods RequestToString - build a string of the complete HTTP Request. Used especially for logging and debugging.
(core) Contains functionality that doesn't fall within other namespaces. Also contains all extension classes (thus if you are using down level frameworks you can exclude all extensions easily).
Validation Methods to validate data, particularly used in parameter validation areas Guard.* validates data and throws an exception. Check.* validates data and returns boolean. Especially helpful when validating DateTime and floating point (single, double, float) values. These classes are modeled after .Net and NUnit assertions and are heavily overloaded while supporting .Net native types. Some sample validations are: LessThan/GreaterThan, Between/NotBetween, MatchesPattern/MatchesWildCard, Equal/NotEqual, Null/NotNull, EmptyGuid/NotEmptyGuid, EMailValid
Transform Modeled after .Net Convert methods Used often in configuration and ADO operations. Supports default values on conversion failure. Cool feature is that it supports Boolean couplets of {Yes,No},{ On, Off}, {true, false}, and {0,1} which makes our configurations less fragile. Often includes more detailed conversion error information than .Net.
Utils.Date A DateTime library Manipulates days (e.g. DayBegin, DayEnd) weeks, months, quarters, fiscal (e.g. Quarter, MonthNumber) and calendar years. Key function is SqlDate that coverts .Net Datetime value into something safe for Microsoft SQLServer.
Extensions Wrappers around existing library methods. Commonly used ones are:<StringBuilder>.AppendLine,<Exception>.Expand,<IDataRecord>.GetValue,<DateTime>.SqlDate,object>.ConvertTo
CoreConfig   All configuration that is specific to the ScrimpNet.Core classes

Last edited Oct 26, 2014 at 5:43 AM by HashtagDotNet, version 9