public static object GetSpecialDF([ExcelArgument(Description = "Name of discounting curve.")] String name, [ExcelArgument(Description = "date")] object[,] date) { try { IDiscountingSource discountCurve = PluginConnection.objectMap.GetObjectFromID <IDiscountingSource>(name); return(discountCurve.GetDF(ExcelUtilities.GetDate0D(date, "date"))); } catch (Exception e) { return(ExcelUtilities.Error0D(e)); } }
public static object CreateDiscount([ExcelArgument(Description = "Name of object")] String name, [ExcelArgument(Description = "")] object[,] anchorDate, [ExcelArgument(Description = "")] double rate) { try { PluginDiscount discount = new PluginDiscount(ExcelUtilities.GetDate0D(anchorDate, "anchorDate"), rate); return(PluginConnection.objectMap.AddObject(name, discount)); } catch (Exception e) { return(ExcelUtilities.Error0D(e)); } }