Click here to Skip to main content
15,895,777 members
Articles / Programming Languages / C#

Zeta .NET Base Libraries

Rate me:
Please Sign up or sign in to vote.
4.41/5 (44 votes)
30 Mar 2007CPOL3 min read 152K   2.4K   147  
A small set of general-purpose classes for using in .NET applications
namespace ZetaLib.Core.Data
{
	#region Using directives.
	// ----------------------------------------------------------------------

	using System;
	using System.Collections;
	using System.Data;
	using System.Data.OleDb;
	using System.Diagnostics;
	using ZetaLib.Core.Common;
	using ZetaLib.Core.Caching;
	using ZetaLib.Core.Logging;

	// ----------------------------------------------------------------------
	#endregion

	/////////////////////////////////////////////////////////////////////////

	/// <summary>
	/// This class can be passed to various functions for controlling about
	/// how to deal with the cache.
	/// </summary>
	public class AdoNetCacheItemInformation :
		CacheItemInformation
	{
		#region Constructors.
		// ------------------------------------------------------------------

		/// <summary>
		/// Constructor.
		/// </summary>
		public AdoNetCacheItemInformation()
		{
		}

		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="usage">The usage.</param>
		public AdoNetCacheItemInformation(
			CacheUsage usage )
		{
			this.usage = usage;
		}

		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="usage">The usage.</param>
		/// <param name="groupName">Name of the group.</param>
		public AdoNetCacheItemInformation(
			CacheUsage usage,
			string groupName )
		{
			this.usage = usage;
			this.Group = new CacheItemGroup( groupName );
		}

		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="groupName">Name of the group.</param>
		public AdoNetCacheItemInformation(
			string groupName )
		{
			this.Group = new CacheItemGroup( groupName );
		}

		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="operation">The operation.</param>
		public AdoNetCacheItemInformation(
			AdoNetCacheDBOperation operation )
		{
			this.operation = operation;
		}

		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="operation">The operation.</param>
		/// <param name="usage">The usage.</param>
		public AdoNetCacheItemInformation(
			AdoNetCacheDBOperation operation,
			CacheUsage usage )
		{
			this.operation = operation;
			this.usage = usage;
		}

		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="operation">The operation.</param>
		/// <param name="usage">The usage.</param>
		/// <param name="groupName">Name of the group.</param>
		public AdoNetCacheItemInformation(
			AdoNetCacheDBOperation operation,
			CacheUsage usage,
			string groupName )
		{
			this.operation = operation;
			this.usage = usage;
			this.Group = new CacheItemGroup( groupName );
		}

		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="operation">The operation.</param>
		/// <param name="groupName">Name of the group.</param>
		public AdoNetCacheItemInformation(
			AdoNetCacheDBOperation operation,
			string groupName )
		{
			this.operation = operation;
			this.Group = new CacheItemGroup( groupName );
		}

		// ------------------------------------------------------------------
		#endregion

		#region Public properties.
		// ------------------------------------------------------------------

		/// <summary>
		/// Tell the caching routines when/whether to use the cache or to
		/// not use the cache.
		/// </summary>
		/// <value>The usage.</value>
		public CacheUsage Usage
		{
			get
			{
				return usage;
			}
			set
			{
				usage = value;
			}
		}

		/// <summary>
		/// Tells the cache what kind of operation was performed, to allow
		/// for decision about whether to clear the cache after the operation.
		/// </summary>
		/// <value>The operation.</value>
		public AdoNetCacheDBOperation Operation
		{
			get
			{
				return operation;
			}
			set
			{
				operation = value;
			}
		}

		// ------------------------------------------------------------------
		#endregion

		#region Private variables.
		// ------------------------------------------------------------------

		private CacheUsage usage =
			CacheUsage.Default;
		private AdoNetCacheDBOperation operation =
			AdoNetCacheDBOperation.Default;

		// ------------------------------------------------------------------
		#endregion
	}

	/////////////////////////////////////////////////////////////////////////
}

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
Chief Technology Officer Zeta Software GmbH
Germany Germany
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He has also teached programming to students at the local university.

➡️ Give me a tip 🙂

In his free time, he does climbing, running and mountain biking. In 2012 he became a father of a cute boy and in 2014 of an awesome girl.

Some cool, free software from us:

Windows 10 Ereignisanzeige  
German Developer Community  
Free Test Management Software - Intuitive, competitive, Test Plans.  
Homepage erstellen - Intuitive, very easy to use.  
Offline-Homepage-Baukasten

Comments and Discussions