本文整理汇总了C#中Element.GetElementAsFloat64方法的典型用法代码示例。如果您正苦于以下问题:C# Element.GetElementAsFloat64方法的具体用法?C# Element.GetElementAsFloat64怎么用?C# Element.GetElementAsFloat64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Element
的用法示例。
在下文中一共展示了Element.GetElementAsFloat64方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ParseEquity
public void ParseEquity(Element fieldData)
{
string tenor = fieldData.GetElementAsString("ID_BB_SEC_NUM_DES");
double px_mid = fieldData.GetElementAsFloat64("PRIOR_CLOSE_MID");
tenor = tenor.Replace(isin,"");
pointsCourbe.Add(TenorToDate(tenor), px_mid);
}
示例2: InsertData
private static void InsertData(Element fieldData, String ticker)
{
if (IsValid(fieldData))
{
using (var context = new EFMMDataClassesDataContext())
{
context.insertBloombergDownload(fieldData.GetElementAsDate(DATE).ToDateId()
, (decimal)fieldData.GetElementAsFloat64(PX_LAST)
, fieldData.GetElementAsInt64(VWAP_VOLUME)
, fieldData.GetElementAsInt64(VWAP_LIT_VOLUME)
, ticker);
context.SubmitChanges();
}
}
else
{
Logger.WarnFormat("At least one field missing for [{0}]", ticker);
}
}
示例3: ParseGovt
private static void ParseGovt(Element fieldData, string security)
{
Govt govt;
try
{
string country = fieldData.GetElementAsString("COUNTRY_ISO");
double px_last = fieldData.GetElementAsFloat64("PX_LAST");
string currency = fieldData.GetElementAsString("DDIS_CURRENCY");
string name = fieldData.GetElementAsString("NAME");
int id_Mcorp = fieldData.GetElementAsInt32("ID_BB_ULTIMATE_PARENT_CO");
string name_Mcorp = fieldData.GetElementAsString("ID_BB_ULTIMATE_PARENT_CO_NAME");
double duration = fieldData.GetElementAsFloat64("YAS_MOD_DUR");
string maturity = fieldData.GetElementAsString("MATURITY");
string date_cpn = fieldData.GetElementAsString("NXT_CPN_DT");
int nb_day_nxt_cpn = fieldData.GetElementAsInt32("DAYS_TO_NEXT_COUPON");
double cpn = fieldData.GetElementAsFloat64("CPN");
int cpn_freq = fieldData.GetElementAsInt32("CPN_FREQ");
int rating = Rating.GetQuality(fieldData);
govt = new Govt(security, d_title[security].Item1, country, currency, name, px_last, id_Mcorp, name_Mcorp, rating, d_title[security].Item2,date_cpn, maturity, duration, cpn, cpn_freq, nb_day_nxt_cpn);
}
catch (NotFoundException e)
{
govt = new Govt(security, d_title[security].Item1, d_title[security].Item2, e.Description());
}
l_title.Add(govt);
}
示例4: ParseEquity
private static void ParseEquity(Element fieldData, string security)
{
Equity equit;
try
{
string country = fieldData.GetElementAsString("COUNTRY_ISO");
double px_last = fieldData.GetElementAsFloat64("PX_LAST");
string currency = fieldData.GetElementAsString("DDIS_CURRENCY");
string name = fieldData.GetElementAsString("NAME");
int id_Mcorp = fieldData.GetElementAsInt32("ID_BB_ULTIMATE_PARENT_CO");
string name_Mcorp = fieldData.GetElementAsString("ID_BB_ULTIMATE_PARENT_CO_NAME");
int rating = Rating.GetQuality(fieldData);
equit = new Equity(security, d_title[security].Item1, country, currency, name, px_last, id_Mcorp, name_Mcorp,rating);
}
catch (NotFoundException e)
{
equit = new Equity(security, d_title[security].Item1, e.Description());
}
l_title.Add(equit);
}
示例5: ParseGovt
private static void ParseGovt(Element fieldData, string security)
{
/*valeur actuel = qt* nominale*/
Govt govt;
string name = "";
try
{
name = fieldData.GetElementAsString("NAME");
string maturity = fieldData.GetElementAsString("MATURITY");
if (Convert.ToDateTime(maturity) > DateTime.Now)
{
string country = fieldData.GetElementAsString("COUNTRY_ISO");
double px_last = fieldData.GetElementAsFloat64("PX_LAST");
string currency = fieldData.GetElementAsString("DDIS_CURRENCY");
int id_Mcorp = fieldData.GetElementAsInt32("ID_BB_ULTIMATE_PARENT_CO");
string name_Mcorp = fieldData.GetElementAsString("ID_BB_ULTIMATE_PARENT_CO_NAME");
double duration = fieldData.GetElementAsFloat64("YAS_MOD_DUR");
string date_cpn = fieldData.GetElementAsString("NXT_CPN_DT");
int nb_day_nxt_cpn = fieldData.GetElementAsInt32("DAYS_TO_NEXT_COUPON");
double cpn = fieldData.GetElementAsFloat64("CPN");
int cpn_freq = fieldData.GetElementAsInt32("CPN_FREQ");
double px_emit = fieldData.GetElementAsFloat64("WORKOUT_PX_BID");
int rating = Rating.GetQuality(fieldData);
govt = new Govt(security, d_title[security].Item1, country, currency, name, px_last, id_Mcorp, name_Mcorp, rating, d_title[security].Item2, date_cpn, maturity, duration, cpn, cpn_freq, nb_day_nxt_cpn, px_emit);
l_title.Add(govt);
}
else
{
govt = new Govt(security,name, d_title[security].Item1, d_title[security].Item2, "Obligation ECHU, maturity : " + maturity);
l_err.Add(govt);
}
}
catch (NotFoundException e)
{
govt = new Govt(security,name, d_title[security].Item1, d_title[security].Item2, e.Description());
l_err.Add(govt);
}
}
示例6: ParseChange
private static void ParseChange(Element fieldData, string security)
{
security = security.Replace(" CURNCY","");
security = security.Replace(devise,"");
d_change.Add(security,fieldData.GetElementAsFloat64("PX_LAST"));
}
示例7: ParseEquity
private static void ParseEquity(Element fieldData, string security)
{
string country = fieldData.GetElementAsString("COUNTRY_ISO");
double px_last = fieldData.GetElementAsFloat64("PX_LAST");
string currency = fieldData.GetElementAsString("CRNCY");
string name = fieldData.GetElementAsString("NAME");
Equity equit = new Equity(security, d_title[security].Item1, country, currency, name, px_last);
l_title.Add(equit);
}