New! Completely rewritten cryptography library that makes adding strong encryption to your applications extremely easy. see Cryptography for details

ScrimpNet.com Developer Utility Library

New WCF Membership Provider!

This library extension creates a WCF wrapper around your ASP.Net membership provider. You can use most any standard ASP.Net membership provider as your underlying security. You can use this provider to easily build out web farms using a common web services security end point. (This is a beta project seems to work, but we don't haven't deployed this into a production environment). See Security documentation for details.

Project Description

ScrimpNet.Core is a library of miscellaneous utilities we have found to be useful in our real applications. Of course we might have thrown in something cool just for fun. Most of these classes and functions are nothing new or reflect some radical new thought. They are just helper functions and libraries which we found helpful from time to time.

We have tried to organize the urchins in the same categories as the .Net System and Microsoft namespaces. Of course the squirrely things might end up anywhere. We didn't create and collect ScrimpNet.Core as some science experiment or a demo or some code mash thing. We are not in the business of building framework libraries or tools. This library is in actual production systems. Thus as we find bugs (and yes there are some) or we find ways to refactor, we'll fix, fold, spindle, remove, mutilate, morph, or simply change what we want to. You are free to use the library but by doing so, you acknowledge the fact that we don't owe anything to you.

You are looking at a library, not especially a framework. That means the classes and functions here were not necessarily built for extensibility. You might find places in the code where we think we might find it helpful to extend. So we don't forget where they were we marked those places with the //EXTENSION comment flag.

ScrimpNet.Core is currently targeted for .Net 3.5 or better. We have tried to keep the library as generic as possible but we do use Extensions and the newer thread locking mechanisms.

We hope you find these functions will help you handle some tedious tasks faster so you can focus on delivering excellent code and solving real problems.

Steve Powell
The ScrimpNet.com Team

Library Summary

NamespaceSummaryExamples and Notes
CollectionsHandles things like data structures and groups of objectsAsyncBuffer - 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
ConfigurationRetrieve strong typed values from .configRobust methods and patterns for grabbing and using values from configuration files
CryptographyEncode & decode objects using internal and external keysDecrypt, Encrypt,Hash (Rijndael with 256 bit key)
DiagnosticsA log wrapper to easily integrate logging and tracingA 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.
i18NUtilities around dealing with various kinds of spatial, globalization, and internationalizationCoordinate - mathematical, comparison, and ToString(). Culture Codes enumeration - RFC1766 collection. DistanceSpan - operations and conversions around distance. Supports both Metric and English systems.
IODeals with streams and file based operationsToBytes - 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
NetOperations relating to network protocolsMIME - 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.
ReflectionInterrogates runtime environmentAssemblyVersion - 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
PresentationLight weight helper library to easily incorporate common MVVM functionality into your WPF ViewModels including Command management, IDataErrorInfo, IPropertyChanged, and IDisposable. (ScrimpNet.Presentation.dll)
SerializationLightweight wrappers around common conversion patterns Supports JSON, SOAP and XML. Includes Extension overloads
ServiceModelPatterns around WCFSelf hosting library particularly useful for short console applications or exercising your services without IIS. Great for development and testing scenarios.
TextString construction and manipulationCode snippets for things such as Left, Right, MaskRight/MaskLeft (for partial masking such as SSN and CreditCard
WebWeb centric helper methodsRequestToString - 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).
ValidationMethods to validate data, particularly used in parameter validation areasGuard.* validates data and throws an exception if the validation fails. 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
TransformModeled after .Net Convert methodsUsed 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.DateA DateTime libraryManipulates 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.
ExtensionsWrappers 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 5, 2011 at 1:51 AM by DrIO, version 17