예제 #1
0
        // Token: 0x060001C2 RID: 450 RVA: 0x0000B6B8 File Offset: 0x000098B8
        internal void LogQueueInfo(AmDbOperation operation)
        {
            string name     = operation.GetType().Name;
            string uniqueId = operation.UniqueId;
            string text     = operation.ToString();
            int    count    = this.m_queue.Count;
            string text2    = "<none>";
            string text3    = "<none>";
            string text4    = "<none>";

            if (this.m_operationServiced != null)
            {
                text2 = this.m_operationServiced.GetType().Name;
                text3 = this.m_operationServiced.UniqueId;
                text4 = this.m_operationServiced.ToString();
            }
            string        text5         = "<none>";
            string        text6         = "<none>";
            string        text7         = "<none>";
            AmDbOperation amDbOperation = this.m_queue.FirstOrDefault <AmDbOperation>();

            if (amDbOperation != null)
            {
                text5 = amDbOperation.GetType().Name;
                text6 = amDbOperation.UniqueId;
                text7 = amDbOperation.ToString();
            }
            ReplayCrimsonEvents.DatabaseOperationSkippedSinceAlreadyActionsQueued.Log <Guid, int, string, string, string, string, string, string, string, string, string>(this.databaseGuid, count, name, uniqueId, text, text2, text3, text4, text5, text6, text7);
        }
예제 #2
0
        // Token: 0x060001C1 RID: 449 RVA: 0x0000B5DC File Offset: 0x000097DC
        internal bool Add(AmDbOperation op, bool checkIfQueueIdle)
        {
            bool flag = false;

            if (!this.IsEnabled)
            {
                op.Cancel();
                return(false);
            }
            lock (this.m_locker)
            {
                if (!checkIfQueueIdle || this.IsIdle)
                {
                    AmTrace.Debug("AmDatabaseOperationQueue: Add operation {0} into the queue. checkIfQueueIdle:{1}, IsIdle:{2}", new object[]
                    {
                        op.ToString(),
                        checkIfQueueIdle,
                        this.IsIdle
                    });
                    this.AddNoLock(op);
                    flag = true;
                }
                else
                {
                    AmTrace.Debug("AmDatabaseOperationQueue: Skip operation {0}. checkIfQueueIdle:{1}, IsIdle:{2}", new object[]
                    {
                        op.ToString(),
                        checkIfQueueIdle,
                        this.IsIdle
                    });
                    this.LogQueueInfo(op);
                }
                if (!flag)
                {
                    op.Cancel();
                }
            }
            return(flag);
        }