Exemplo n.º 1
0
        public void OutStats(ILogContext context)
        {
            Hashtable createdItemsHash  = new Hashtable();
            Hashtable disposedItemsHash = new Hashtable();

            lock (createdSync)
            {
                createdItemsHash = this.createdItems.toHash <ItemType, int>();
            }
            lock (disposedSync)
            {
                disposedItemsHash = this.disposedItems.toHash <ItemType, int>();
            }

            Hashtable resultInfo = new Hashtable
            {
                { "Created Items", createdItemsHash },
                { "Disposed Items", disposedItemsHash },
                { "Worlds", MmoWorldCache.Instance(m_App).GetStats() }
            };

            var builder = resultInfo.ToStringBuilder();

            context.Log(LogFilter.STATS, builder.ToString());
        }