Developer Utility Library


These methods are somewhat self-explanatory. You'll find links to more detailed descriptions as we find the need to provide more information around those.

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.
Presentation Light weight helper library to easily incorporate common MVVM functionality into your WPF ViewModels including Command management, IDataErrorInfo, IPropertyChanged, and IDisposable. (ScrimpNet.Presentation.dll)
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
Security WCF Membership and Role Providers for ASP.Net and WinForms applications. Often used in multi-server environments (e.g. web farms) where system administrators do not want web servers accessing network resources
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 CreditCard
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 Sep 1, 2011 at 2:31 AM by DrIO, version 7


No comments yet.