NotifierCore.Notifier.HotItemController.Export C# (CSharp) Method

Export() public method

public Export ( string filePath ) : void
filePath string
return void
        public void Export(string filePath)
        {
            try
            {
                String[] columns = new string[]{
                "data_id", "name", "rarity", "restriction_level", "img", "type_id", "sub_type_id", "price_last_changed", "max_offer_unit_price", "min_sale_unit_price", "offer_availability",
                "sale_availability", "gw2db_external_id", "sale_price_change_last_hour", "offer_price_change_last_hour"
            };

                Object[][] rows = new object[Queue.Count][];

                for (int i = 0; i < rows.Length; i++)
                {
                    rows[i] = new object[columns.Length];

                    HotItem item = Queue[i];

                    rows[i][0] = item.DataId;
                    rows[i][1] = item.Name;
                    rows[i][2] = "";
                    rows[i][3] = "";
                    rows[i][4] = "";
                    rows[i][5] = "";
                    rows[i][6] = "";
                    rows[i][7] = "";
                    rows[i][8] = item.BuyPrice;
                    rows[i][9] = item.SellPrice;
                    rows[i][10] = item.BuyVolume;
                    rows[i][11] = item.SaleVolume;
                    rows[i][12] = "";
                    rows[i][13] = "";
                    rows[i][14] = "";
                }

                CsvHelper.WriteCsv(filePath, columns, rows, ",");
            }
            catch
            {

            }
        }