public GridClient()
{
#if USE_SMART_THREAD_POOL
ThreadPool = new SmartThreadPool(-1, 25);
#endif
// These are order-dependant
#if USE_SMART_THREAD_POOL
Network = new NetworkManager(this, ThreadPool);
#else
Network = new NetworkManager(this);
#endif
Settings = new Settings(this);
#if USE_SMART_THREAD_POOL
Parcels = new ParcelManager(this, ThreadPool);
#else
Parcels = new ParcelManager(this);
#endif
Self = new AgentManager(this);
Avatars = new AvatarManager(this);
Friends = new FriendsManager(this);
Grid = new GridManager(this);
Objects = new ObjectManager(this);
Groups = new GroupManager(this);
#if USE_SMART_THREAD_POOL
Assets = new AssetManager(this, ThreadPool);
#else
Assets = new AssetManager(this);
#endif
Appearance = new AppearanceManager(this, Assets);
Inventory = new InventoryManager(this);
Directory = new DirectoryManager(this);
Terrain = new TerrainManager(this);
Sound = new SoundManager(this);
Throttle = new AgentThrottle(this);
//if (Settings.ENABLE_INVENTORY_STORE)
// InventoryStore = new Inventory(Inventory);
//if (Settings.ENABLE_LIBRARY_STORE)
// LibraryStore = new Inventory(Inventory);
//Inventory.OnSkeletonsReceived +=
// delegate(InventoryManager manager)
// {
// if (Settings.ENABLE_INVENTORY_STORE)
// InventoryStore.InitializeFromSkeleton(Inventory.InventorySkeleton);
// if (Settings.ENABLE_LIBRARY_STORE)
// LibraryStore.InitializeFromSkeleton(Inventory.LibrarySkeleton);
// };
}