Beispiel #1
0
        /// <summary>
        /// Find world by ID
        /// </summary>
        /// <param name="worldID">World ID to be found</param>
        /// <returns>World info or null if not found</returns>
        public WorldDocument GetWorld(string worldID)
        {
            lock (sync) {
                //search world by id query
                var query = Query <WorldDocument> .EQ(world => world.info.worldID, worldID);

                var result = Worlds.FindOne(query);
                if (result == null)
                {
                    return(null);
                }
                return(result);
            }
        }