Ejemplo n.º 1
0
        public ZoneGeometryChooser(ClientDataWrapper client)
        {
            m_zoneDict = client.ClientFiles.Where(f => Regex.IsMatch(f.Directory.Name, string.Format("^{0}{1}$", ZonePrefix, ZoneRegEx), RegexOptions.IgnoreCase))
                         .GroupBy(f => f.Directory.Name)
                         .ToDictionary(k => Convert.ToInt32(new string(k.Key.Skip(ZonePrefix.Length).ToArray())), k => k.ToArray());

            m_zoneTypeDict = client.ZonesData.ToDictionary(k => (int)k.ID, v => (ZoneType)v.Type);
        }
        public ZoneGeometryChooser(ClientDataWrapper client)
        {
            m_zoneDict = client.ClientFiles.Where(f => Regex.IsMatch(f.Directory.Name, string.Format("^{0}{1}$", ZonePrefix, ZoneRegEx), RegexOptions.IgnoreCase))
                .GroupBy(f => f.Directory.Name)
                .ToDictionary(k => Convert.ToInt32(new string(k.Key.Skip(ZonePrefix.Length).ToArray())), k => k.ToArray());

            m_zoneTypeDict = client.ZonesData.ToDictionary(k => (int)k.ID, v => (ZoneType)v.Type);
        }
Ejemplo n.º 3
0
 public void Init()
 {
     client = new ClientDataWrapper(loc);
     extract = new DirectoryInfo(@"D:\extract\");
 }
 public void TestWrongPathRootLoading()
 {
     var test = new ClientDataWrapper(WrongClientRoot);
 }
 public void TestWrongPathDirectoryLoading()
 {
     var test = new ClientDataWrapper(WrongClientPath);
 }
 public void TestWrongDirectoryLoading()
 {
     string str = null;
     var test = new ClientDataWrapper(str);
 }
        public void TestValidPathRootLoading()
        {
            var test = new ClientDataWrapper(TemporaryPath);

            Assert.IsTrue(test.ClientFiles.Any(f => f.Name.Equals("camelot.exe", StringComparison.OrdinalIgnoreCase)));
            Assert.IsTrue(test.ClientFiles.Any(f => f.Name.Equals("game.dll", StringComparison.OrdinalIgnoreCase)));
        }