Click here to Skip to main content
15,892,809 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 112.3K   2.7K   93  
A Rules Engine class library with source code and documentation
<html dir="LTR">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
    <title>RulesEngine Methods</title>
    <xml>
    </xml>
    <link rel="stylesheet" type="text/css" href="MSDN.css" />
  </head>
  <body id="bodyID" class="dtBODY">
    <div id="nsbanner">
      <div id="bannerrow1">
        <table class="bannerparthead" cellspacing="0">
          <tr id="hdr">
            <td class="runninghead">Rules Processing Library by Jaxlab</td>
            <td class="product">
            </td>
          </tr>
        </table>
      </div>
      <div id="TitleRow">
        <h1 class="dtH1">RulesEngine�Methods</h1>
      </div>
    </div>
    <div id="nstext">
      <p>The methods of the <b>RulesEngine</b> class are listed below. For a complete list of <b>RulesEngine</b> class members, see the <a href="Jaxlab.Rules.RulesEngineMembers.html">RulesEngine Members</a> topic.</p>
      <h4 class="dtH4">Public Instance Methods</h4>
      <div class="tablediv">
        <table class="dtTABLE" cellspacing="0">
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.Add.html">Add</a></td><td width="50%"> Adds a RuleObject to the RulesEngine </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.AddAll.html">AddAll</a></td><td width="50%"> Adds and Array of RuleObjects to the RulesEngine. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.AddTrigger_overloads.html">AddTrigger</a></td><td width="50%">Overloaded.  Adds a Trigger object to the internal Trigger collection </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.AddVariable.html">AddVariable</a></td><td width="50%"> Adds a Variable to the internal Variable Engine and publishs the VariableAdded event </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassClearTopic.htm">Clear</a> (inherited from <b>CollectionBase</b>)</td><td width="50%">
        Removes all objects from the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassTopic.htm">CollectionBase</a> instance.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.Contains.html">Contains</a></td><td width="50%"> Determines if a RuleObject exists </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.CopyTo.html">CopyTo</a></td><td width="50%"> Copies the Array to the RuleObject List </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassEqualsTopic.htm">Equals</a> (inherited from <b>Object</b>)</td><td width="50%">
        Determines whether the specified <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">Object</a> is equal to the current <b>Object</b>.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.Find.html">Find</a></td><td width="50%"> Finds the RuleObject by its ID </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.FindIndexOf.html">FindIndexOf</a></td><td width="50%"> Return the Index of a RuleObject whose ID matches the string Target </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.GetDeveloperInfo.html">GetDeveloperInfo</a></td><td width="50%"> Return the developer contact information </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassGetEnumeratorTopic.htm">GetEnumerator</a> (inherited from <b>CollectionBase</b>)</td><td width="50%">
        Returns an enumerator that can iterate through the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassTopic.htm">CollectionBase</a> instance.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassGetHashCodeTopic.htm">GetHashCode</a> (inherited from <b>Object</b>)</td><td width="50%">
        Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.GetRule.html">GetRule</a></td><td width="50%"> Returns Rule from ID </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.GetTrigger_overloads.html">GetTrigger</a></td><td width="50%">Overloaded.  Gets trigger at index </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.GetTriggerCount.html">GetTriggerCount</a></td><td width="50%"> Gets the number of Triggers </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassGetTypeTopic.htm">GetType</a> (inherited from <b>Object</b>)</td><td width="50%">
        Gets the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemTypeClassTopic.htm">Type</a> of the current instance.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.GetVariable_overloads.html">GetVariable</a></td><td width="50%">Overloaded.  Gets a Variable by its ID. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.GetVariableCount.html">GetVariableCount</a></td><td width="50%"> Gets the number of Variables in the Collection. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.IndexOf.html">IndexOf</a></td><td width="50%"> Gets the Index of a RuleObject </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.Insert.html">Insert</a></td><td width="50%"> Inserts a RuleObject at the Index </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.Remove.html">Remove</a></td><td width="50%"> Removes RuleObject </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassRemoveAtTopic.htm">RemoveAt</a> (inherited from <b>CollectionBase</b>)</td><td width="50%">
        Removes the element at the specified index of the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassTopic.htm">CollectionBase</a> instance.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.ReSort.html">ReSort</a></td><td width="50%"> Re-Sorts Rule Collection </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.RunExpression_overloads.html">RunExpression</a></td><td width="50%">Overloaded.  Runs and Expression and if it is true returns the true Variable and if False returns the false Variable </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.RunInferencing.html">RunInferencing</a></td><td width="50%"> Runs all rules affected by a change of the Variable. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.RunRule_overloads.html">RunRule</a></td><td width="50%">Overloaded.  "Runs" and RuleObject indentified by the ID supplied. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.SetVariableValue_overloads.html">SetVariableValue</a></td><td width="50%">Overloaded.  Sets the Variable whose ID is found to the value and publishs events for VariableChanging and VariableChanged. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassToStringTopic.htm">ToString</a> (inherited from <b>Object</b>)</td><td width="50%">
        Returns a <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemStringClassTopic.htm">String</a> that represents the current <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">Object</a>.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.VariableExists.html">VariableExists</a></td><td width="50%"> Determines if the Variable exists in the internal VariableEngine. </td></tr></table>
      </div>
      <h4 class="dtH4">Protected Instance Methods</h4>
      <div class="tablediv">
        <table class="dtTABLE" cellspacing="0">
<tr VALIGN="top"><td width="50%"><img src="protmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassFinalizeTopic.htm">Finalize</a> (inherited from <b>Object</b>)</td><td width="50%">
        Allows an <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">Object</a> to attempt to free resources and perform other cleanup operations before the <b>Object</b> is reclaimed by garbage collection.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="protmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassMemberwiseCloneTopic.htm">MemberwiseClone</a> (inherited from <b>Object</b>)</td><td width="50%">
        Creates a shallow copy of the current <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemObjectClassTopic.htm">Object</a>.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="protmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassOnClearTopic.htm">OnClear</a> (inherited from <b>CollectionBase</b>)</td><td width="50%">
        Performs additional custom processes when clearing the contents of the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassTopic.htm">CollectionBase</a> instance.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="protmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassOnClearCompleteTopic.htm">OnClearComplete</a> (inherited from <b>CollectionBase</b>)</td><td width="50%">
        Performs additional custom processes after clearing the contents of the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassTopic.htm">CollectionBase</a> instance.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="protmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassOnInsertTopic.htm">OnInsert</a> (inherited from <b>CollectionBase</b>)</td><td width="50%">
         Performs additional custom processes before inserting a new element into the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassTopic.htm">CollectionBase</a> instance.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="protmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassOnInsertCompleteTopic.htm">OnInsertComplete</a> (inherited from <b>CollectionBase</b>)</td><td width="50%">
        Performs additional custom processes after inserting a new element into the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassTopic.htm">CollectionBase</a> instance.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="protmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassOnRemoveTopic.htm">OnRemove</a> (inherited from <b>CollectionBase</b>)</td><td width="50%">
        Performs additional custom processes when removing an element from the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassTopic.htm">CollectionBase</a> instance.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="protmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassOnRemoveCompleteTopic.htm">OnRemoveComplete</a> (inherited from <b>CollectionBase</b>)</td><td width="50%">
        Performs additional custom processes after removing an element from the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassTopic.htm">CollectionBase</a> instance.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="protmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassOnSetTopic.htm">OnSet</a> (inherited from <b>CollectionBase</b>)</td><td width="50%">
         Performs additional custom processes before setting a value in the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassTopic.htm">CollectionBase</a> instance.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="protmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassOnSetCompleteTopic.htm">OnSetComplete</a> (inherited from <b>CollectionBase</b>)</td><td width="50%">
         Performs additional custom processes after setting a value in the <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassTopic.htm">CollectionBase</a> instance.
      </td></tr>
<tr VALIGN="top"><td width="50%"><img src="protmethod.gif"></img><a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemCollectionsCollectionBaseClassOnValidateTopic.htm">OnValidate</a> (inherited from <b>CollectionBase</b>)</td><td width="50%">
        Performs additional custom processes when validating a value.
      </td></tr></table>
      </div>
      <h4 class="dtH4">Private Instance Methods</h4>
      <div class="tablediv">
        <table class="dtTABLE" cellspacing="0">
<tr VALIGN="top"><td width="50%"><img src="privmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.AddInference_overloads.html">AddInference</a></td><td width="50%">Overloaded.  Examines the Rule and adds inferencing using the Variable Ids in the Rule </td></tr>
<tr VALIGN="top"><td width="50%"><img src="privmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.CheckTrigger.html">CheckTrigger</a></td><td width="50%"> Runs the Rule associated with the Variable Id </td></tr>
<tr VALIGN="top"><td width="50%"><img src="privmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.GetVarIDs.html">GetVarIDs</a></td><td width="50%"> Gets an array of VariableIDs from and expression. This method is used to Add inferencing by Rule reference. </td></tr>
<tr VALIGN="top"><td width="50%"><img src="privmethod.gif"></img><a href="Jaxlab.Rules.RulesEngine.RunRule_overload_3.html">RunRule</a></td><td width="50%">Overloaded.  "Runs" the RuleObject and Checks the Actions for a match. Then "Runs" the SubRule list. </td></tr></table>
      </div>
      <h4 class="dtH4">See Also</h4>
      <p>
        <a href="Jaxlab.Rules.RulesEngine.html">RulesEngine Class</a> | <a href="Jaxlab.Rules.html">Jaxlab.Rules Namespace</a></p>
      <object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;">
        <param name="Keyword" value="RulesEngine class, methods">
        </param>
      </object>
      <hr />
      <div id="footer">
        <p>
          <a href="mailto:jeff_bramlett@hotmail.com?subject=Rules%20Processing%20Library%20by%20Jaxlab%20Documentation%20Feedback:%20RulesEngine�Methods">Send comments on this topic.</a>
        </p>
        <p>
          <a href="http://www.jaxlab.com">Copyright by Jeff Bramlett 2005</a>
        </p>
        <p>Generated from assembly JaxlabRulesEngine [1.0.2431.14881]</p>
      </div>
    </div>
  </body>
</html>

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