FastQuant.SessionBarFactoryItem.OnData C# (CSharp) Method

OnData() protected method

protected OnData ( DataObject obj ) : void
obj DataObject
return void
        protected override void OnData(DataObject obj)
        {
            bool barOpen = this.bar == null;
            base.OnData(obj);
            if (barOpen)
            {
                if (!AddReminder(GetBarCloseDateTime(obj), this.type))
                {
                    if (!(obj is Tick))
                        Console.WriteLine($"SessionBarFactoryItem::OnData Can not add reminder. Object is not tick! Clock = {this.type} local datetime = {this.factory.Framework.Clock.DateTime} exchange datetime = {this.factory.Framework.ExchangeClock.DateTime} object = {obj} reminder datetime = {GetBarCloseDateTime(obj)}");
                    else
                        Console.WriteLine($"SessionBarFactoryItem::OnData Can not add reminder. Clock = {this.type} local datetime = {this.factory.Framework.Clock.DateTime} exchange dateTime = {this.factory.Framework.ExchangeClock.DateTime} object = {obj} object exchange datetime = {((Tick)obj).ExchangeDateTime} reminder datetime = {GetBarCloseDateTime(obj)}");
                }
            }

            //bool barOpen = this.bar == null;
            //base.OnData(obj);
            //if (!barOpen || AddReminder(GetBarCloseDateTime(obj), this.type))
            //    return;
            //if (!(obj is Tick))
            //    Console.WriteLine($"SessionBarFactoryItem::OnData Can not add reminder. Object is not tick! Clock = {this.type} local datetime = {this.factory.Framework.Clock.DateTime} exchange datetime = {this.factory.Framework.ExchangeClock.DateTime} object = {obj} reminder datetime = {GetBarCloseDateTime(obj)}");
            //else
            //    Console.WriteLine($"SessionBarFactoryItem::OnData Can not add reminder. Clock = {this.type} local datetime = {this.factory.Framework.Clock.DateTime} exchange dateTime = {this.factory.Framework.ExchangeClock.DateTime} object = {obj} object exchange datetime = {((Tick)obj).ExchangeDateTime} reminder datetime = {GetBarCloseDateTime(obj)}");
        }