Click here to Skip to main content
15,885,757 members
Articles / Programming Languages / C#

Use Rules In Your Applications

Rate me:
Please Sign up or sign in to vote.
4.84/5 (19 votes)
29 Aug 2006CPOL2 min read 111.7K   2.7K   93  
A Rules Engine class library with source code and documentation
//===============================================================================
// Jaxlab Rules Engine - A library for utilizing Rules in .Net
// Copyright (C) 2005  Jeff Bramlett - www.jaxlab.com
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
//================================================================================
using System;

namespace Jaxlab.Rules
{
	/// <summary>
	/// Summary description for InferenceNotFoundException.
	/// </summary>
	public class InferenceNotFoundException: System.Exception
	{
		#region Instance data members
		/// <summary>
		/// Id of variable in Inference
		/// </summary>
		string m_sVarId = "";
		#endregion

		#region Ctors
		/// <summary>
		/// Parameterless constructor
		/// </summary>
		public InferenceNotFoundException()
		{
		}

		/// <summary>
		/// Default constructor
		/// </summary>
		/// <param name="sVariableID"></param>
		public InferenceNotFoundException(string sVariableID)
		{
			m_sVarId = sVariableID;
		}
		#endregion

		#region Overrides
		/// <summary>
		/// Override of Exception Message
		/// </summary>
		public override string Message
		{
			get
			{
				if(m_sVarId == "")
				{
					return "Inference was not found.";
				}
				else
				{
					return "Inference for Variable " + m_sVarId + " was not found.";
				}
			}
		}
		#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
Software Developer (Senior)
United States United States
Website: http://www.somedeveloper.us

Comments and Discussions