Ejemplo n.º 1
0
        public MVersionCollection GetVersionMetadatas()
        {
            var localVersionLoader  = new LocalVersionLoader(MinecraftPath);
            var mojangVersionLoader = new MojangVersionLoader();

            var mojangVersions = mojangVersionLoader.GetVersionMetadatas();
            var localVersions  = localVersionLoader.GetVersionMetadatas();

            localVersions.Merge(mojangVersions);
            return(localVersions);
        }
Ejemplo n.º 2
0
        public async Task <MVersionCollection> GetVersionMetadatasAsync()
        {
            var localVersionLoader  = new LocalVersionLoader(MinecraftPath);
            var mojangVersionLoader = new MojangVersionLoader();

            var mojangVersions = await mojangVersionLoader.GetVersionMetadatasAsync()
                                 .ConfigureAwait(false);

            var localVersions = await localVersionLoader.GetVersionMetadatasAsync()
                                .ConfigureAwait(false);

            localVersions.Merge(mojangVersions);
            return(localVersions);
        }