protected override void AddAdditionalVideos()
        {
            if (SubscriptionIds != null)
            {
                videosToDelete.AddRange(dataContext.Videos.AsQueryable()
                                        .Where(x => SubscriptionIds.Contains(x.SubscriptionId))
                                        .Where(x => x.DownloadedPath != null));
            }

            base.AddAdditionalVideos();
        }
 protected override void LogBegin()
 {
     log.LogInformation("Delete files job started for subscriptions {0}, will {1}delete subscriptions.",
                        SubscriptionIds.Humanize(), DeleteSubscriptions ? "" : "not ");
 }
Пример #3
0
        /// <summary>
        /// Create a copy of <see cref="ExecutionMessage"/>.
        /// </summary>
        /// <returns>Copy.</returns>
        public override Message Clone()
        {
            var clone = new ExecutionMessage
            {
                Balance       = Balance,
                Comment       = Comment,
                Condition     = Condition?.Clone(),
                ClientCode    = ClientCode,
                BrokerCode    = BrokerCode,
                Currency      = Currency,
                ServerTime    = ServerTime,
                DepoName      = DepoName,
                Error         = Error,
                ExpiryDate    = ExpiryDate,
                IsSystem      = IsSystem,
                OpenInterest  = OpenInterest,
                OrderId       = OrderId,
                OrderStringId = OrderStringId,
                OrderBoardId  = OrderBoardId,
                ExecutionType = ExecutionType,
                IsCancelled   = IsCancelled,
                //Action = Action,
                OrderState    = OrderState,
                OrderStatus   = OrderStatus,
                OrderType     = OrderType,
                OriginSide    = OriginSide,
                PortfolioName = PortfolioName,
                OrderPrice    = OrderPrice,
                SecurityId    = SecurityId,
                Side          = Side,
                SystemComment = SystemComment,
                TimeInForce   = TimeInForce,
                TradeId       = TradeId,
                TradeStringId = TradeStringId,
                TradePrice    = TradePrice,
                TradeStatus   = TradeStatus,
                TransactionId = TransactionId,
                OrderVolume   = OrderVolume,
                TradeVolume   = TradeVolume,
                //IsFinished = IsFinished,
                VisibleVolume = VisibleVolume,
                IsUpTick      = IsUpTick,
                Commission    = Commission,
                Latency       = Latency,
                Slippage      = Slippage,
                UserOrderId   = UserOrderId,

                //DerivedOrderId = DerivedOrderId,
                //DerivedOrderStringId = DerivedOrderStringId,

                PnL      = PnL,
                Position = Position,

                HasTradeInfo = HasTradeInfo,
                HasOrderInfo = HasOrderInfo,

                IsMarketMaker = IsMarketMaker,
                IsMargin      = IsMargin,
                IsManual      = IsManual,

                CommissionCurrency = CommissionCurrency,

                AveragePrice = AveragePrice,
                Yield        = Yield,
                MinVolume    = MinVolume,

                SubscriptionId  = SubscriptionId,
                SubscriptionIds = SubscriptionIds?.ToArray()
            };

            CopyTo(clone);

            return(clone);
        }