FastQuant.FileDataServer.DeleteDataSeries C# (CSharp) Method

DeleteDataSeries() public method

public DeleteDataSeries ( Instrument instrument, byte type, BarType barType = BarType.Time, long barSize = 60 ) : void
instrument Instrument
type byte
barType BarType
barSize long
return void
        public override void DeleteDataSeries(Instrument instrument, byte type, BarType barType = BarType.Time, long barSize = 60)
        {
            DataSeries dataSeries;
            if (type == DataObjectType.Bar)
            {
                var iId = instrument.Id;
                dataSeries = GetBarDataSeriesInCache(instrument, barType, barSize, false);
                if (barType == BarType.Time && barSize <= TimeSpan.TicksPerDay / TimeSpan.TicksPerSecond)
                {
                    this.byIId_BSize[iId][(int)barSize] = null;
                }
                else
                {
                    this.byType_IId_BSize[type] = this.byType_IId_BSize[type] ?? new IdArray<Dictionary<long, DataSeries>>();
                    this.byType_IId_BSize[type][iId] = this.byType_IId_BSize[type][iId] ?? new Dictionary<long, DataSeries>();
                    this.byType_IId_BSize[type][iId].Remove(barSize);
                }
                this.dataFile.Delete(DataSeriesNameHelper.GetName(instrument, barType, barSize));
            }
            else
            {
                dataSeries = this.byType[type][instrument.Id];
                if (dataSeries != null)
                    this.byType[type].Remove(instrument.Id);
                this.dataFile.Delete(DataSeriesNameHelper.GetName(instrument, type));
            }

        }

Same methods

FileDataServer::DeleteDataSeries ( string name ) : void