Click here to Skip to main content
15,881,821 members
Articles / Programming Languages / C#

Design and Implementation of an Attribute-Driven, Caching Data Abstraction Layer

Rate me:
Please Sign up or sign in to vote.
4.98/5 (25 votes)
21 Jul 2008CPOL30 min read 68.3K   595   103  
An easy-to-use, attribute-driven data abstraction layer with multi-database support, intelligent caching, transparent encryption, multi-property sorting, property change tracking, etc.
using System;
using System.ComponentModel;

namespace BrainTechLLC.ThreadSafeObjects
{
    public enum LogSeverity
    {        
        DebugInformation= 0,
        DebugWarning = 1,
        DebugError = 2,
        DebugCritical = 3,
        Information = 4,
        Warning = 5,
        Error = 6,
        Critical = 7,
        Max = 8
    }

   [Browsable(true), TypeConverter(typeof(ExpandableObjectConverter))]
   public interface ILogger
   {
       bool AddLogListener(ILogListener listener);
       bool RemoveLogListener(ILogListener listener);
       void Log(string messageType, string message, LogSeverity severity);
       void Log(Exception ex, LogSeverity severity, bool verbose);
       void Log(Exception ex, string message, LogSeverity severity, bool verbose);
       void SetFilter(LogSeverity severity, bool logThisSeverityLevel);

       string FileNameBase { get; set; }
       bool WantExit { get; set; }
       void BeginLogging();
       bool[] LogFilter { get; }       
   }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Troppus Software
United States United States
Currently working as a Senior Silverlight Developer with Troppus Software in Superior, CO. I enjoy statistics, programming, new technology, playing the cello, and reading codeproject articles. Smile | :)

Comments and Discussions