Example #1
0
 private static int A(ArchiveManager.ClassB b, ArchiveManager.ClassB b2)
 {
     if (b.LoadingPriority > b2.LoadingPriority)
     {
         return(-1);
     }
     if (b.LoadingPriority < b2.LoadingPriority)
     {
         return(1);
     }
     return(0);
 }
Example #2
0
        private List <ArchiveManager.ClassB> C()
        {
            List <ArchiveManager.ClassB> list = new List <ArchiveManager.ClassB>();

            foreach (ArchiveFactory current in this.S)
            {
                string[] files = Directory.GetFiles(VirtualFileSystem.ResourceDirectoryPath, "*." + current.FileExtension, SearchOption.AllDirectories);
                string[] array = files;
                for (int i = 0; i < array.Length; i++)
                {
                    string text = array[i];
                    string path = Path.ChangeExtension(text, ".archive");
                    if (File.Exists(path))
                    {
                        TextBlock textBlock = TextBlockUtils.LoadFromRealFile(path);
                        if (textBlock != null)
                        {
                            ArchiveManager.ClassB b = new ArchiveManager.ClassB();
                            b.Factory            = current;
                            b.SourceRealFileName = text;
                            if (textBlock.IsAttributeExist("loadingPriority"))
                            {
                                b.LoadingPriority = float.Parse(textBlock.GetAttribute("loadingPriority"));
                            }
                            list.Add(b);
                        }
                    }
                }
            }
            List <ArchiveManager.ClassB> arg_FA_0 = list;

            if (ArchiveManager.U == null)
            {
                ArchiveManager.U = new Comparison <ArchiveManager.ClassB>(ArchiveManager.A);
            }
            ArchiveManager.A <ArchiveManager.ClassB>(arg_FA_0, ArchiveManager.U);
            return(list);
        }