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;
}