本文整理汇总了C#中CarbonClient类的典型用法代码示例。如果您正苦于以下问题:C#CarbonClient类的具体用法?C#CarbonClient怎么用?C#CarbonClient使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:populateDates
privateasyncTaskpopulateDates(CarbonClientcc_)
{
varyesterday=awaitcc_.RollDateAsync(
date:DateTime.Today.ToNodaLocalDate(),
count:-1,
unit:Symmetry.Carbon.Model.DateUnit.Bd,
convention:Symmetry.Carbon.Model.BusinessDayConvention.Following,
calendar:Market.HolidayCode());
varspotSettle=awaitcc_.RollDateAsync(
date:DateTime.Today.ToNodaLocalDate(),
count:Market.DaysToSpot(),
unit:Symmetry.Carbon.Model.DateUnit.Bd,
convention:Symmetry.Carbon.Model.BusinessDayConvention.Following,
calendar:Market.HolidayCode());
varyesterdaySettle=awaitcc_.RollDateAsync(
date:yesterday,
count:Market.DaysToSpot(),
unit:Symmetry.Carbon.Model.DateUnit.Bd,
convention:Symmetry.Carbon.Model.BusinessDayConvention.Following,
calendar:Market.HolidayCode());
Today=newAsOfAndSpotSettle(DateTime.Today,spotSettle.ToDateTime());
Yesterday=newAsOfAndSpotSettle(yesterday.ToDateTime(),yesterdaySettle.ToDateTime());
}
原文链接:
http://www.jxszl.com/biancheng/C/556672.html