Exemplo n.º 1
0
        public void ParseFiles(int gameAreaChangeCount)
        {
            if (AllFiles != null)
            {
                LoadedInThisArea = new Dictionary <string, FileInformation>(1024);

                foreach (var file in AllFiles)
                {
                    if (file.Value.ChangeCount == gameAreaChangeCount)
                    {
                        LoadedInThisArea[file.Key] = file.Value;
                    }

                    if (file.Key[0] == 'M' && file.Key[8] == '/')
                    {
                        Metadata[file.Key] = file.Value;
                    }
                    else if (file.Key[0] == 'D' && file.Key[4] == '/' && file.Key.EndsWith(".dat"))
                    {
                        Data[file.Key] = file.Value;
                    }
                    else
                    {
                        OtherFiles[file.Key] = file.Value;
                    }
                }

                LoadedFiles?.Invoke(this, LoadedInThisArea);
            }
        }
Exemplo n.º 2
0
        public void ParseFiles(int gameAreaChangeCount)
        {
            if (AllFiles != null)
            {
                LoadedInThisArea = new Dictionary <string, FileInformation>(1024);

                foreach (var file in AllFiles)
                {
                    if (file.Value.ChangeCount == gameAreaChangeCount)
                    {
                        LoadedInThisArea[file.Key] = file.Value;
                    }

                    if (file.Key[0] == 'M' && file.Key[8] == '/')
                    {
                        Metadata[file.Key] = file.Value;
                    }
                    else if (file.Key[0] == 'D' && file.Key[4] == '/' && file.Key.EndsWith(".dat"))
                    {
                        Data[file.Key] = file.Value;
                    }
                    else
                    {
                        OtherFiles[file.Key] = file.Value;
                    }
                }

                /*Task.Run(() =>
                 * {
                 *      GroupedByTest2 = Files.GroupBy(x => x.Value.Test2).OrderBy(x=>x.Key).ToDictionary(z => z.Key, w => w.ToList());
                 *       GroupedByChangeAction = Files.GroupBy(x => x.Value.ChangeCount ).OrderBy(x=>x.Key).ToDictionary(z => z.Key, w => w.ToList());
                 * });
                 */

                LoadedFiles?.Invoke(this, LoadedInThisArea);
            }
        }