Пример #1
0
        public RiotSolution Load(string radsPath, RiotProjectType?projectTypeLimit = null)
        {
            var solution           = new RiotSolution(radsPath);
            var projectLoader      = new RiotProjectLoader();
            var projectsDirectory  = Path.Combine(radsPath, "projects");
            var projectDirectories = Directory.GetDirectories(projectsDirectory);

            foreach (var projectPath in projectDirectories)
            {
                var projectDirectoryInfo = new DirectoryInfo(projectPath);
                var projectName          = projectDirectoryInfo.Name;
                var projectType          = RiotProjectType.Unknown;
                if (projectName.Equals("lol_air_client", StringComparison.OrdinalIgnoreCase))
                {
                    projectType = RiotProjectType.AirClient;
                }
                else if (projectName.StartsWith("lol_air_client_config", StringComparison.OrdinalIgnoreCase))
                {
                    projectType = RiotProjectType.AirClientConfig;
                }
                else if (projectName.Equals("lol_game_client", StringComparison.OrdinalIgnoreCase))
                {
                    projectType = RiotProjectType.GameClient;
                }
                else if (projectName.StartsWith("lol_game_client_", StringComparison.OrdinalIgnoreCase))
                {
                    projectType = RiotProjectType.GameClientConfig;
                }
                else if (projectName.Equals("lol_launcher", StringComparison.OrdinalIgnoreCase))
                {
                    projectType = RiotProjectType.Launcher;
                }

                if (projectTypeLimit == null || projectTypeLimit.Value == projectType)
                {
                    solution.AddProject(projectLoader.LoadProject(projectType, projectPath, projectName));
                }
            }

            return(solution);
        }
Пример #2
0
        public void LoadGameProjectTest()
        {
            var stopwatch = new Stopwatch();

            stopwatch.Start();

            var projectLoader = new RiotProjectLoader(kRadsDirectory);

            Debug.WriteLine("Loaded Project Loader in: " + stopwatch.ElapsedMilliseconds);

            var project = projectLoader.LoadProject(RiotProjectType.GameClient);

            Debug.WriteLine("Loaded Project in: " + stopwatch.ElapsedMilliseconds);

            var manifest = project.ReleaseManifest;

            Debug.WriteLine("Loaded Manifest in: " + stopwatch.ElapsedMilliseconds);

            var tree = manifest.Root;

            Debug.WriteLine("Loaded Tree in: " + stopwatch.ElapsedMilliseconds);
        }