public override void EvaluateForDependencyReference(IList references, FormulaEngine engine)
 {
     base.EvaluateForDependencyReference(references, engine);
     if (engine.FunctionLibrary.IsFunctionVolatile(_funcName))
     {
         var @ref = new VolatileFunctionReference();
         references.Add(@ref);
     }
 }
Example #2
0
        /// <summary>
        ///     Add any volatile functions to the roots of a calculation list
        /// </summary>
        private void AddVolatileReference(IList roots)
        {
            var @volatile = new VolatileFunctionReference();

            // Are there any formulas that have volatile functions?
            @volatile = _owner.ReferencePool.GetPooledReference(@volatile) as VolatileFunctionReference;
            if (@volatile != null)
            {
                roots.Add(@volatile);
            }
        }