예제 #1
0
        public override void ExportToQueryableObject(QueryableObject queryableObject)
        {
            base.ExportToQueryableObject(queryableObject);
            QueryableMailboxDispatcher queryableMailboxDispatcher = queryableObject as QueryableMailboxDispatcher;

            if (queryableMailboxDispatcher != null)
            {
                queryableMailboxDispatcher.MailboxGuid               = this.MailboxGuid;
                queryableMailboxDispatcher.DecayedEventCounter       = this.decayedEventCounter;
                queryableMailboxDispatcher.NumberOfActiveDispatchers = this.numberOfActiveDispatchers;
                queryableMailboxDispatcher.IsMailboxDead             = this.IsMailboxDead;
                queryableMailboxDispatcher.IsIdle = this.IsIdle;
            }
        }
예제 #2
0
        private List <QueryableObject> QueryMailboxDispatcher(object[] parameters, QueryFilter filter)
        {
            List <QueryableObject> list            = new List <QueryableObject>();
            IList <OnlineDatabase> onlineDatabases = OnlineDiagnostics.Instance.databaseManager.GetOnlineDatabases((Guid?)parameters[0]);

            if (onlineDatabases == null || onlineDatabases.Count != 1)
            {
                throw new ArgumentException("Could not find the database specified by DatabaseGuid", "DatabaseGuid");
            }
            IList <MailboxDispatcher> mailboxDispatcher = ((EventControllerPrivate)onlineDatabases[0].EventController).GetMailboxDispatcher((Guid?)parameters[1]);

            foreach (MailboxDispatcher mailboxDispatcher2 in mailboxDispatcher)
            {
                QueryableMailboxDispatcher queryableMailboxDispatcher = new QueryableMailboxDispatcher();
                mailboxDispatcher2.ExportToQueryableObject(queryableMailboxDispatcher);
                if (filter == null || OpathFilterEvaluator.FilterMatches(filter, queryableMailboxDispatcher))
                {
                    list.Add(queryableMailboxDispatcher);
                }
            }
            return(list);
        }