Abstractions Features
The key features for .net 2.0:
- Bootstrapper with start up and shutdown tasks behaviour, stopwatch task
- Caching:
- Cache startup task
- Cache helper that simplifies get and store code
- DataKey/LazyDataKey
- LinkedCacheDependency,
- Decorated, CacheInstrumentation (performance counters), CacheRetryClient, Proxy and Null cache
- AbstractCaching implements default algorithm for Increment operation
- Cryptography:
- Symmetric algorithms key vector providers and helpers, FNV32/64, FNV32a, FNVModified hash algorithms
- SymmetricAlgorithmContext, SynchronizedSymmetricAlgorithmContext, SymmetricAlgorithmContextPool
- CryptoTransformHelper
- Helpers:
- Assembly helper (version string format in short and long version),
- CollectionHelper, DictionaryHelper (TryGetValue, UniqueueValues), EnumerableHelper (ForEach, Count, ToDictionary, ToNameValueCollection, Translate), ListHelper (AddRange), NameValueCollectionHelper (HasKey, AllPairs, ConvertToInt32, ConvertToBoolean,... handles required values)
- DateTimeHelper, Decimal to bytes and back converter
- EnumHelper (HasAll / HasAny flags)
- ExceptionHelper (list all inner exceptions), GuidHelper (IsEmpty, Shrink to a compact string of length 22)
- IpNumberHelper (ToIpNumber from string, ToIpString, ToIpLong)
- PasswordHelper (generate a random password for a given character groups)
- ObjectHelper (PropertiesToNameValueCollection)
- RandomHelper (Seed, NextChar, NextString, NextWord, Next<T> from a sequence of T, NextSentence, NextSentences, NextDate, NextSubstring, NextStartsWith, NextBoolean, FirstRandom from a sequence, TimesRandom, Shuffle sequence, NextSequence based of Func<T>)
- UriHelper, parse/build uri query string
- RetryHelper, executes a given function Func2<bool> until succeed or the following reached: MaxRetryCount or RetryTimeout. There is a delay between retries (RetryDelay). TimeoutException is thrown in case of RetryFails is true. Uses RetryOptions.
- BitConverterHelper, get bytes from a string encoded with BitConverter.GetString.
- StringHelper (NullSafe, NullEmpty, WrapAt, AllOf, StripHtml, StipNewLine, StripWhitespace, Capitalize, Contains, Left, Right, Repeat, Join, ParseOptions, Hash)
- IO:
- IBinaryWriter, IBinaryReader and implementation for Stream
- BinaryReaderHelper (ReadTo byte buffer, ReadToken based on predicate)
- DecoratedStream
- IoC
- Dependency resolver (IoC)
- Various model abstractions:
- Buffer (with EnsureMore) and BufferHive (a pool of buffers)
- ByteArrayComparer
- ValueObject, LazyObject and LazyPrincipal, Disposable, IValidationState, Pair, Range
- Paged List and settings
- Encoding: IEncoder, Base64Encoder, HashEncoder, TextEncoder
- Pooling:
- DecoratedPool, EagerPool, LazyPool, ManagedPool, PooledPool, StackPool
- IdleTimeoutPool
- KetamaPool (and SynchronizedKetamaPool)
- SynchronizedPool, WaitPool
- Topic, invoke strategies: publisher, thread pool, synchronization context
- Key (an easy way to get a string key out from model to be used as a key for cache), IKeyProvider
- Net:
- Client (abstraction that relates to client in client-server interaction scenario), Distributed (a pool of Clients), ConnectionOptions, DistributedOptions
- ClientFactory
- BigEndianConverter
- Dns Helper (a timed query for dns information)
- SocketHelper (a timed connect)
- TcpClientConnection (to be used by Client for client-server network communication)
- HttpClient (GET/POST/HEAD form submitting)
- Repository pattern:
- IRetrieveRepository and IRetrieveMultipleRepository, DbConnectionStringProvider
- Serialization:
- Object state
- Formatters:
- Decorated, Array, Null, Simple (Int32, Boolean, etc), Runtime
- Compressed (deflate)
- Encrypted (symmetric)
- Protobuffers (comming soon)
- Services:
- ApplicatService acting as a bridge between the client code and Repository, includes validation, error handling policy
- MailService
- TopicCatalog
- UnitOfWork pattern
- RunOnceService (ensures that give operation is executed only once utilizing a counter in memcached)
- Threading:
- Abstract background task, plus bootstrapper start all / shutdown all background tasks
- LockScope, MonitorLockScope, Reader/Upgrade/Writer LockScope
- WaitAsyncResult
- AsyncHelper implementing FireAndForget pattern using ThreadPool
- Tracing (helpers to System.Diagnostics)
- Exception trace policies:
- ErrorFormatter
- Loaded Assemblies
- EventLog
- Machine/Process information
- Mail see sample here
- Ignore (exclude certain exceptions from error reports)
- Performance Counter (queries system performance counters)
- TransferExceptionHandler
- PerformanceCounter
- Console trace listener
- TraceHelper
- WorkItem: a background processing unit with rules sequential workflow