Dupire.DupireProcess.RetrieveCurve C# (CSharp) Метод

RetrieveCurve() приватный Метод

Retrieves zr and dy curve from the model.
private RetrieveCurve ( IProject p_Context, bool errors ) : bool
p_Context IProject The parameter is not used.
errors bool /// The current status of errors, if errors happened previously to this call. ///
Результат bool
        private bool RetrieveCurve(IProject p_Context, bool errors)
        {
            // check the presence of a zero rate curve
            object zrref = Engine.Parser.EvaluateAsReference(this.r.Expression);
            if (!Engine.Parser.GetParserError())
            {
                this.zrCurve = zrref as Function;
                if (this.zrCurve == null)
                {
                    errors = true;
                    p_Context.AddError("Cannot find the zero rate curve " +
                                       this.r.Expression);
                }
            }
            else
                errors = true;

            // check the presence of a dividend yield curve
            object dyref = Engine.Parser.EvaluateAsReference(this.q.Expression);
            if (!Engine.Parser.GetParserError())
            {
                this.dyCurve = dyref as Function;
                if (this.dyCurve == null)
                {
                    errors = true;
                    p_Context.AddError("Cannot find the dividend yield curve " +
                                       this.q.Expression);
                }
            }
            else
                errors = true;

            return errors;
        }