Пример #1
0
        // WorldsByName

        public Task <DatabaseWorld[]> GetWorldsByNameAsync(string name, int limit = int.MaxValue)
        {
            return(DatabaseUtils.RecursiveLoadRangeAsync(this.Client, "Worlds", "name", null, name, name, limit, dbo => dbo.GetString("name"))
                   .Then(t => t.Result.Select(DatabaseWorld.FromDatabaseObject).ToArray())
                   .ToSafeTask());
        }
Пример #2
0
        // WorldsByPlays

        public Task <DatabaseWorld[]> GetWorldsByPlaysAsync(int minPlays, int maxPlays, int limit = int.MaxValue)
        {
            return(DatabaseUtils.RecursiveLoadRangeAsync(this.Client, "Worlds", "plays", null, maxPlays, minPlays, limit, dbo => dbo.GetString("plays"))
                   .Then(t => t.Result.Select(DatabaseWorld.FromDatabaseObject).ToArray())
                   .ToSafeTask());
        }
Пример #3
0
        // WorldsByCrew

        public Task <DatabaseWorld[]> GetWorldsByCrewAsync(Crew crew, int limit = int.MaxValue)
        {
            return(DatabaseUtils.RecursiveLoadRangeAsync(this.Client, "Worlds", "ByCrew", null, crew.Id, crew.Id, limit, dbo => dbo.GetString("Crew"))
                   .Then(t => t.Result.Select(DatabaseWorld.FromDatabaseObject).ToArray())
                   .ToSafeTask());
        }