singrdk/base/Libraries/Policy/Area.cs

36 lines
1.1 KiB
C#
Raw Normal View History

2008-03-05 09:52:00 -05:00
///////////////////////////////////////////////////////////////////////////////
//
// Microsoft Research Singularity
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
///////////////////////////////////////////////////////////////////////////////
using System.Collections;
namespace Microsoft.Singularity.Policy.Engine {
// An Area is a contiguous region of objects, indexed by uints.
// The contents of an Area are held in a Hashtable.
// An optimization would use an object[] array.
internal class Area {
Hashtable _contents;
string _name;
internal readonly uint _order;
internal object this[
uint i
] { get { return _contents[i]; } set { _contents[i] = value; } }
internal Area(string name, uint order) {
_contents = new Hashtable();
_name = name;
_order = order;
}
internal Area(string name, Area area) {
_contents = area._contents;
_name = name;
_order = area._order;
}
public override string ToString() { return _name; }
}
}