Skip to content

Latest commit

 

History

History
69 lines (49 loc) · 2.54 KB

File metadata and controls

69 lines (49 loc) · 2.54 KB

CSharpUtilities

Copyright 2011-2013 Ardan Studios. All rights reserved.
Use of this source code is governed by a BSD-style license that can be found in the LICENSE handle.

This project contains base utility classes required for most application.

CacheManager
This class provides a inproc caching system. You can store any data with a ket and set the time to expire.

CryptoProvider
Provides crypto support for all the common protocols

Impersonate
Used to allow your application to impersonate a user

LogManager (Sample Code Provided)
The Log Manager has been built for heavy use in all types of applications.

Key Features

  1. Write to multiple files using the log key
  2. Uses TLS to help writing to log keys deep within libraries without the need to pass the log key
  3. If HTTP Session exists, it will create log files for each unique session
  4. Can handle high capacity log writes
  5. Monitors open files and closes files not written to after 2 minutes
  6. Maintains directories for each day and will clean up old folders
  7. Email notification for exceptions or events. Will provide session state and url to log file

Directory Structure
C:\Logs\Test\06-27-2013\0000\0000\00000000Global

Sample Log

A B C D E F
06-27-2013 09:11:34.352 0.49 10 THREAD UNKNOWN : Starting test application

A: Date the log write was issued
B: Time the log write was issued
C: The duration in milliseconds between the log write request and actual write
D: Thread Id
E: Thread Name
F: The messages

MessagingClient A generic socket based message client and server endpoint

NamedPipes Basic named pipes support

PerformanceCounters Collection performance counters for your running application

Serialize Serial C# objects to JSON. Use JSON.net instead

SynchronousTimer A timer that fires based on a set interval. The time will not fire again while executing work

UtilSockets A fully functional implementation for socket clients and servers.

UtilThreading (Sample Code Provided)
Thread Pooling using the IOCP framework. Create multiple thread pools for your application

The ThreadPool using IOCP underneath to provide concurrency controlled thread pools.

The .NET Thread Pool also uses IOCP underneath but each application is only given a single thead pool.
To learn more please read: http://www.theukwebdesigncompany.com/articles/iocp-thread-pooling.php