private bool IsValidDataStreamRicCreationInfo(DataStreamRicCreationEntity dsInfo) { try { bool result = true; if (dsInfo == null) { result = false; } if (dsInfo.fileName.StartsWith("EM") && !dsInfo.ExchangeCode.Equals("NZC")) { result = false; } if (dsInfo.ThomsonReutersClassificationScheme.Trim().Equals("RTS")) { result = false; } return(result); } catch (Exception ex) { string msg = string.Format("\r\n ClassName: {0}\r\n MethodName: {1}\r\n Message: {2}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message); Logger.Log(msg, Logger.LogType.Error); return(false); } }
private List <DataStreamRicCreationEntity> FormatRecords(List <string> listExtractedRecords) { List <DataStreamRicCreationEntity> list = new List <DataStreamRicCreationEntity>(); try { if (listExtractedRecords == null || listExtractedRecords.Count == 0) { return(null); } foreach (var record in listExtractedRecords) { DataStreamRicCreationEntity dsInfo = new DataStreamRicCreationEntity(record); if (IsValidDataStreamRicCreationInfo(dsInfo)) { list.Add(dsInfo); } } return(list); } catch (Exception ex) { string msg = string.Format("\r\n ClassName: {0}\r\n MethodName: {1}\r\n Message: {2}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message); Logger.Log(msg, Logger.LogType.Error); return(null); } }
private bool IsValidNewZealandTemplate(DataStreamRicCreationEntity item) { bool result = true; try { if ((item.ExchangeCode + "").Trim().Equals("RTS")) { result = false; } return(result); } catch (Exception ex) { string msg = string.Format("\r\n ClassName: {0}\r\n MethodName: {1}\r\n Message: {2}", System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message); Logger.Log(msg, Logger.LogType.Error); return(false); } }
public NewZealandTemplate(DataStreamRicCreationEntity dsInfo) { //Mnem if ((dsInfo.Ticker + "").Trim().Length > 3) { this.Mnem = "Z:" + dsInfo.Ticker.Substring(0, 4); } else { this.Mnem = "Z:" + dsInfo.Ticker + "Z"; } //Sedol //website+sedol //Name1 //company + assert+security //Name2 //company + assert+security //Bdate this.Bdate = " "; //DefMkt this.DefMkt = "WL"; //Mnem2 this.Mnem2 = " "; //Isin if ((dsInfo.Isin + "").Trim().Length > 0) { this.Isin = dsInfo.Isin; } else { this.Isin = " "; } //Cname //Company Name + Asset Category (Trunc) //Geog this.Geog = "011"; //Dcur this.Dcur = "005"; //Remk this.Remk = " "; //Secty //Grpi if ((dsInfo.ThomsonReutersClassificationScheme + "").Trim().Equals("ETF")) { this.Secty = "ET"; this.Grpi = "159"; } else { this.Secty = "EQ"; this.Grpi = "116"; } //Fname1 //not clear //Mic this.Mic = "NZE"; //Fname2 //not cleat //Cusip this.Cusip = ("Z:" + dsInfo.Ticker).PadRight(12, ' '); //Qci if (dsInfo.CompanyName.Contains("ADR")) { this.Qci = "22"; } else if (dsInfo.CompanyName.Contains("GDR")) { this.Qci = "D5"; } else { this.Qci = " "; } //ParentRic if (dsInfo.RIC.Trim().Equals(dsInfo.ReutersEditorialRIC.Trim())) { this.ParentRic = ""; } else { this.ParentRic = dsInfo.ReutersEditorialRIC; } }
public LaosTemplate(DataStreamRicCreationEntity dsInfo) { //Mnem this.Mnem = "LA:" + dsInfo.Ticker.Substring(0, 3); //Sedol //Name1 //Name2 //Bdate this.Bdate = " "; //DefMkt this.DefMkt = "LO"; //Mnem2 this.Mnem2 = " "; //Isin if ((dsInfo.Isin + "").Trim().Length > 0) { this.Isin = dsInfo.Isin; } else { this.Isin = " "; } //Cname //Geog this.Geog = "161"; //Dcur this.Dcur = "167"; //Remk this.Remk = " "; //Secty this.Secty = "EQ"; //Grpi this.Grpi = "116"; //Fname1 this.Fname1 = " ";//19 spaces //Mic this.Mic = " ";//3 spaces //Fname2 this.Fname2 = " ";//24 spaces //Cusip this.Cusip = " ";//12 spaces //Qci this.Qci = " ";//2 spaces //ParentRic if (dsInfo.RIC.Trim().Equals(dsInfo.ReutersEditorialRIC.Trim())) { this.ParentRic = ""; } else { this.ParentRic = dsInfo.ReutersEditorialRIC; } }