Ejemplo n.º 1
0
 /// <summary>
 /// Convert this instance to a CSV file
 /// </summary>
 /// <returns>string as CSV</returns>
 public string ToCsv()
 {
     return(string.Join(",",
                        EndTime.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        LastUpdate.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        Ticker,
                        Actual.ToStringInvariant(),
                        CalendarId,
                        Category,
                        Country,
                        (int)DataType,
                        DateSpan,
                        $"\"{EventRaw}\"",
                        Forecast.ToStringInvariant(),
                        (int)Importance,
                        IsPercentage.ToStringInvariant().ToLowerInvariant(),
                        OCategory,
                        OCountry,
                        Previous.ToStringInvariant(),
                        $"\"{Reference}\"",
                        Revised.ToStringInvariant(),
                        $"\"{Source}\"",
                        TESymbol,
                        TradingEconomicsForecast.ToStringInvariant()
                        ));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Converts the data to TSV
 /// </summary>
 /// <returns>String of TSV</returns>
 /// <remarks>Parsable by the constructor should you need to recreate the object from TSV</remarks>
 public override string ToLine()
 {
     return(string.Join("\t",
                        TimeProcessedUtc?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        TransactionID,
                        EventType == null ? null : JsonConvert.SerializeObject(EventType).Replace("\"", ""),
                        LastUpdate.ToStringInvariant("yyyyMMdd"),
                        LastIDsUpdate?.ToStringInvariant("yyyyMMdd"),
                        ISIN,
                        USDMarketCap,
                        CompanyID,
                        ICBIndustry,
                        ICBSuperSector,
                        ICBSector,
                        ICBSubSector,
                        ICBCode,
                        CompanyName,
                        PreviousResultsAnnouncementDate?.ToStringInvariant("yyyyMMdd"),
                        NextResultsAnnouncementsDate?.ToStringInvariant("yyyyMMdd"),
                        NextCloseBegin?.ToStringInvariant("yyyyMMdd"),
                        LastCloseEnded?.ToStringInvariant("yyyyMMdd"),
                        SecurityDescription,
                        TickerCountry,
                        TickerSymbol,
                        AnnouncementDate?.ToStringInvariant("yyyyMMdd"),
                        TimeReleased?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        TimeProcessed?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        TimeReleasedUtc?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        AnnouncedIn,
                        BuybackDate?.ToStringInvariant("yyyyMMdd"),
                        Execution == null ? null : JsonConvert.SerializeObject(Execution).Replace("\"", ""),
                        ExecutionEntity == null ? null : JsonConvert.SerializeObject(ExecutionEntity).Replace("\"", ""),
                        ExecutionHolding == null ? null : JsonConvert.SerializeObject(ExecutionHolding).Replace("\"", ""),
                        Currency,
                        ExecutionPrice,
                        Amount,
                        GBPValue,
                        EURValue,
                        USDValue,
                        NoteText,
                        BuybackPercentage,
                        VolumePercentage,
                        ConversionRate,
                        AmountAdjustedFactor,
                        PriceAdjustedFactor,
                        TreasuryHolding));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Converts the data to CSV
 /// </summary>
 /// <returns>String of CSV</returns>
 /// <remarks>Parsable by the constructor should you need to recreate the object from CSV</remarks>
 public override string ToLine()
 {
     return(string.Join("\t",
                        TransactionID,
                        BuybackType,
                        LastUpdate.ToStringInvariant("yyyyMMdd"),
                        LastIDsUpdate?.ToStringInvariant("yyyyMMdd"),
                        ISIN,
                        USDMarketCap,
                        CompanyID,
                        ICBIndustry,
                        ICBSuperSector,
                        ICBSector,
                        ICBSubSector,
                        ICBCode,
                        CompanyName,
                        PreviousResultsAnnouncementDate?.ToStringInvariant("yyyyMMdd"),
                        NextResultsAnnouncementsDate?.ToStringInvariant("yyyyMMdd"),
                        NextCloseBegin?.ToStringInvariant("yyyyMMdd"),
                        LastCloseEnded?.ToStringInvariant("yyyyMMdd"),
                        SecurityDescription,
                        TickerCountry,
                        TickerSymbol,
                        AnnouncementDate?.ToStringInvariant("yyyyMMdd"),
                        TimeReleased?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        TimeProcessed?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        TimeReleasedUtc?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        TimeProcessedUtc?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        AnnouncedIn,
                        BuybackDate?.ToStringInvariant("yyyyMMdd"),
                        BuybackVia,
                        BuybackBy,
                        HoldingType,
                        Currency,
                        Price,
                        TransactionAmount,
                        GBPValue,
                        EURValue,
                        USDValue,
                        NoteText,
                        BuybackPercentage,
                        VolumePercentage,
                        ConversionRate,
                        AmountAdjustedFactor,
                        PriceAdjustedFactor,
                        TreasuryHolding));
 }
 /// <summary>
 /// Converts the data to TSV
 /// </summary>
 /// <returns>String of TSV</returns>
 /// <remarks>Parsable by the constructor should you need to recreate the object from TSV</remarks>
 public override string ToLine()
 {
     return(string.Join("\t",
                        TimeProcessedUtc?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        TransactionID,
                        JsonConvert.SerializeObject(EventType).Replace("\"", ""),
                        LastUpdate.ToStringInvariant("yyyyMMdd"),
                        LastIDsUpdate?.ToStringInvariant("yyyyMMdd"),
                        ISIN,
                        USDMarketCap,
                        CompanyID,
                        ICBIndustry,
                        ICBSuperSector,
                        ICBSector,
                        ICBSubSector,
                        ICBCode,
                        CompanyName,
                        PreviousResultsAnnouncementDate?.ToStringInvariant("yyyyMMdd"),
                        NextResultsAnnouncementsDate?.ToStringInvariant("yyyyMMdd"),
                        NextCloseBegin?.ToStringInvariant("yyyyMMdd"),
                        LastCloseEnded?.ToStringInvariant("yyyyMMdd"),
                        SecurityDescription,
                        TickerCountry,
                        TickerSymbol,
                        AnnouncementDate?.ToStringInvariant("yyyyMMdd"),
                        TimeReleased?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        TimeProcessed?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        TimeReleasedUtc?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        AnnouncedIn,
                        JsonConvert.SerializeObject(Execution).Replace("\"", ""),
                        JsonConvert.SerializeObject(ExecutionEntity).Replace("\"", ""),
                        JsonConvert.SerializeObject(ExecutionHolding).Replace("\"", ""),
                        Amount,
                        ValueCurrency,
                        AmountValue,
                        Percentage,
                        AuthorizationStartDate?.ToStringInvariant("yyyyMMdd"),
                        AuthorizationEndDate?.ToStringInvariant("yyyyMMdd"),
                        PriceCurrency,
                        MinimumPrice,
                        MaximumPrice,
                        NoteText));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Converts the data to CSV
 /// </summary>
 /// <returns>String of CSV</returns>
 /// <remarks>Parsable by the constructor should you need to recreate the object from CSV</remarks>
 public override string ToLine()
 {
     return(string.Join("\t",
                        TransactionID,
                        BuybackType,
                        LastUpdate.ToStringInvariant("yyyyMMdd"),
                        LastIDsUpdate?.ToStringInvariant("yyyyMMdd"),
                        ISIN,
                        USDMarketCap,
                        CompanyID,
                        ICBIndustry,
                        ICBSuperSector,
                        ICBSector,
                        ICBSubSector,
                        ICBCode,
                        CompanyName,
                        PreviousResultsAnnouncementDate?.ToStringInvariant("yyyyMMdd"),
                        NextResultsAnnouncementsDate?.ToStringInvariant("yyyyMMdd"),
                        NextCloseBegin?.ToStringInvariant("yyyyMMdd"),
                        LastCloseEnded?.ToStringInvariant("yyyyMMdd"),
                        SecurityDescription,
                        TickerCountry,
                        TickerSymbol,
                        AnnouncementDate?.ToStringInvariant("yyyyMMdd"),
                        TimeReleased?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        TimeProcessed?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        TimeReleasedUtc?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        TimeProcessedUtc?.ToStringInvariant("yyyyMMdd HH:mm:ss"),
                        AnnouncedIn,
                        IntentionVia,
                        IntentionBy,
                        BuybackIntentionHoldingType,
                        IntentionAmount,
                        ValueCurrency,
                        IntentionValue,
                        IntentionPercentage,
                        IntentionAuthorisationStartDate?.ToStringInvariant("yyyyMMdd"),
                        IntentionAuthorisationEndDate?.ToStringInvariant("yyyyMMdd"),
                        PriceCurrency,
                        MinimumPrice,
                        MaximumPrice,
                        BuybackIntentionNoteText));
 }