Files
libremetaverse/libsecondlife/examples/TestClient/Commands/PrimCountCommand.cs
bushing 6d289162a8 more eol-style fixes
git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1161 52acb1d6-8a22-11de-b505-999d5b087335
2007-04-28 20:54:02 +00:00

33 lines
736 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using libsecondlife.Packets;
namespace libsecondlife.TestClient
{
public class PrimCountCommand: Command
{
public PrimCountCommand(TestClient testClient)
{
Name = "primcount";
Description = "Shows the number of prims that have been received.";
}
public override string Execute(string[] args, LLUUID fromAgentID)
{
int count = 0;
lock (Client.SimPrims)
{
foreach (Dictionary<uint, Primitive> prims in Client.SimPrims.Values)
{
count += prims.Count;
}
}
return count.ToString();
}
}
}