WebCab Probability and Statistics for .NET v3.3 Demo

ADOMediator.UnderlyingInstance Property

This property holds the instance of a Standard Probability Distributions class, used in Database computations.

public object UnderlyingInstance {get; set;}

Remarks

Initially, this property is not set, so the next step after constructing an instance of this class is setting this property to an instance of one of the classes in the Standard Probability Distributions namespace.

Exceptions

Exception TypeCondition
ADOMediatorExceptionThrown when trying to assign an instance of a class which is not part of the WebCab Standard Probability Distributions namespace.

Example

The following example creates and assigns an instance of the BinomialProbabilityDistribution class to an instance of the ADO Mediator class.

               // Create a new instance of this class.
               BinomialProbabilityDistribution instance = new BinomialProbabilityDistribution ();
               ...
               // Create an instance of the ADO Mediator class
               // (parameters omitted)
               ADOMediator ado = new ADOMediator (...);
               ...
               // Assign the BinomialProbabilityDistribution instance to the ADO Mediator
               ado.UnderlyingInstance = instance;
            
After the assignment has taken place, the ADOMediator will direct all method calls to the BinomialProbabilityDistribution instance. For example, if you wish to invoke a method belonging to the BinomialProbabilityDistribution class, with values taken from the database, using a SELECT statement, you would write something similar to:
               double result = ado.OneSelect ("NameOfMethodInBinomialProbabilityDistributionClass",
                    "SELECT DATE, OPEN, CLOSE FROM IBM");
            
The ado instance of the ADOMediator class will call the NameOfMethodInBinomialProbabilityDistributionClass method on the instance returned by this property.

See Also

ADOMediator Class | WebCab.Libraries.Statistics.PDistributions.ADO Namespace