예제 #1
0
 public void SetUp()
 {
     _customer1 = new Customer("bamboo");
     _customer2 = new Customer("prevalence");
     _list      = new ReaderWriterList();
     _list.Add(_customer1);
     _list.Add(_customer2);
 }
예제 #2
0
        public void TestMapEnumerable()
        {
            ReaderWriterList list = new ReaderWriterList();

            list.Add(new Customer("bamboo"));
            list.Add(new Customer("prevalence"));
            list.Map(_list);
            AssertSame(_customer1, list[0]);
            AssertSame(_customer2, list[1]);
        }
예제 #3
0
파일: Region.cs 프로젝트: mynew4/DAoC
        /// <summary>
        /// Constructs a new empty Region
        /// </summary>
        /// <param name="time">The time manager for this region</param>
        /// <param name="data">The region data</param>
        public Region(GameTimer.TimeManager time, RegionData data)
        {
            m_regionData = data;
            m_objects = new GameObject[0];
            m_objectsInRegion = 0;
            m_nextObjectSlot = 0;
            m_objectsAllocatedSlots = new uint[0];

            m_graveStones = new Hashtable();

            m_zones = new ReaderWriterList<Zone>(1);
            m_ZoneAreas = new ushort[64][];
            m_ZoneAreasCount = new ushort[64];
            for (int i = 0; i < 64; i++)
            {
                m_ZoneAreas[i] = new ushort[AbstractArea.MAX_AREAS_PER_ZONE];
            }

            m_Areas = new Dictionary<ushort, IArea>();

            m_timeManager = time;

            List<string> list = null;

            if (ServerProperties.Properties.DEBUG_LOAD_REGIONS != string.Empty)
                list = ServerProperties.Properties.DEBUG_LOAD_REGIONS.SplitCSV(true);

            if (list != null && list.Count > 0)
            {
                m_loadObjects = false;

                foreach (string region in list)
                {
                    if (region.ToString() == ID.ToString())
                    {
                        m_loadObjects = true;
                        break;
                    }
                }
            }

            list = ServerProperties.Properties.DISABLED_REGIONS.SplitCSV(true);
            foreach (string region in list)
            {
                if (region.ToString() == ID.ToString())
                {
                    m_isDisabled = true;
                    break;
                }
            }

            list = ServerProperties.Properties.DISABLED_EXPANSIONS.SplitCSV(true);
            foreach (string expansion in list)
            {
                if (expansion.ToString() == m_regionData.Expansion.ToString())
                {
                    m_isDisabled = true;
                    break;
                }
            }
        }
예제 #4
0
파일: Group.cs 프로젝트: mynew4/DOLSharp
		/// <summary>
		/// Default Constructor with GameLiving Leader.
		/// </summary>
		/// <param name="leader"></param>
		public Group(GameLiving leader)
		{
			LivingLeader = leader;
			m_groupMembers = new ReaderWriterList<GameLiving>(ServerProperties.Properties.GROUP_MAX_MEMBER);
		}