Browse Source

Cleaned up TODOs

tags/1.0-rc
RogueException 8 years ago
parent
commit
6bdc0c09ca
7 changed files with 9 additions and 13 deletions
  1. +0
    -2
      src/Discord.Net.Core/IDiscordClient.cs
  2. +0
    -2
      src/Discord.Net.Core/Net/Queue/Requests/IQueuedRequest.cs
  3. +0
    -1
      src/Discord.Net.Core/Net/Rest/IRestClient.cs
  4. +3
    -1
      src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs
  5. +4
    -4
      src/Discord.Net.Rest/Entities/Channels/RestGuildChannel.cs
  6. +0
    -1
      src/Discord.Net.Rest/Entities/Channels/RestVirtualMessageChannel.cs
  7. +2
    -2
      src/Discord.Net.WebSocket/Entities/Channels/SocketGuildChannel.cs

+ 0
- 2
src/Discord.Net.Core/IDiscordClient.cs View File

@@ -6,8 +6,6 @@ using System.Threading.Tasks;


namespace Discord namespace Discord
{ {
//TODO: Add docstrings
//TODO: Docstrings should explain when REST requests are sent and how many
public interface IDiscordClient : IDisposable public interface IDiscordClient : IDisposable
{ {
ConnectionState ConnectionState { get; } ConnectionState ConnectionState { get; }


+ 0
- 2
src/Discord.Net.Core/Net/Queue/Requests/IQueuedRequest.cs View File

@@ -4,8 +4,6 @@ using System.Threading.Tasks;


namespace Discord.Net.Queue namespace Discord.Net.Queue
{ {
//TODO: Allow user-supplied canceltoken
//TODO: Allow specifying timeout via DiscordApiClient
public interface IQueuedRequest public interface IQueuedRequest
{ {
CancellationToken CancelToken { get; } CancellationToken CancelToken { get; }


+ 0
- 1
src/Discord.Net.Core/Net/Rest/IRestClient.cs View File

@@ -5,7 +5,6 @@ using System.Threading.Tasks;


namespace Discord.Net.Rest namespace Discord.Net.Rest
{ {
//TODO: Add docstrings
public interface IRestClient public interface IRestClient
{ {
void SetHeader(string key, string value); void SetHeader(string key, string value);


+ 3
- 1
src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs View File

@@ -71,7 +71,9 @@ namespace Discord.Rest
public static IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(IChannel channel, BaseDiscordClient client, public static IAsyncEnumerable<IReadOnlyCollection<RestMessage>> GetMessagesAsync(IChannel channel, BaseDiscordClient client,
ulong? fromMessageId, Direction dir, int limit, IGuild guild, RequestOptions options) ulong? fromMessageId, Direction dir, int limit, IGuild guild, RequestOptions options)
{ {
//TODO: Test this with Around direction
if (dir == Direction.Around)
throw new NotImplementedException(); //TODO: Impl

return new PagedAsyncEnumerable<RestMessage>( return new PagedAsyncEnumerable<RestMessage>(
DiscordConfig.MaxMessagesPerBatch, DiscordConfig.MaxMessagesPerBatch,
async (info, ct) => async (info, ct) =>


+ 4
- 4
src/Discord.Net.Rest/Entities/Channels/RestGuildChannel.cs View File

@@ -144,14 +144,14 @@ namespace Discord.Rest
=> await RemovePermissionOverwriteAsync(user, options).ConfigureAwait(false); => await RemovePermissionOverwriteAsync(user, options).ConfigureAwait(false);
IAsyncEnumerable<IReadOnlyCollection<IGuildUser>> IGuildChannel.GetUsersAsync(CacheMode mode, RequestOptions options) IAsyncEnumerable<IReadOnlyCollection<IGuildUser>> IGuildChannel.GetUsersAsync(CacheMode mode, RequestOptions options)
=> AsyncEnumerable.Empty<IReadOnlyCollection<IGuildUser>>(); //Overriden //Overriden in Text/Voice //TODO: Does this actually override?
=> AsyncEnumerable.Empty<IReadOnlyCollection<IGuildUser>>(); //Overriden //Overriden in Text/Voice
Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) Task<IGuildUser> IGuildChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
=> Task.FromResult<IGuildUser>(null); //Overriden in Text/Voice //TODO: Does this actually override?
=> Task.FromResult<IGuildUser>(null); //Overriden in Text/Voice


//IChannel //IChannel
IAsyncEnumerable<IReadOnlyCollection<IUser>> IChannel.GetUsersAsync(CacheMode mode, RequestOptions options) IAsyncEnumerable<IReadOnlyCollection<IUser>> IChannel.GetUsersAsync(CacheMode mode, RequestOptions options)
=> AsyncEnumerable.Empty<IReadOnlyCollection<IUser>>(); //Overriden in Text/Voice //TODO: Does this actually override?
=> AsyncEnumerable.Empty<IReadOnlyCollection<IUser>>(); //Overriden in Text/Voice
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
=> Task.FromResult<IUser>(null); //Overriden in Text/Voice //TODO: Does this actually override?
=> Task.FromResult<IUser>(null); //Overriden in Text/Voice
} }
} }

+ 0
- 1
src/Discord.Net.Rest/Entities/Channels/RestVirtualMessageChannel.cs View File

@@ -7,7 +7,6 @@ using System.Threading.Tasks;


namespace Discord.Rest namespace Discord.Rest
{ {
//TODO: Review this class
[DebuggerDisplay(@"{DebuggerDisplay,nq}")] [DebuggerDisplay(@"{DebuggerDisplay,nq}")]
internal class RestVirtualMessageChannel : RestEntity<ulong>, IMessageChannel internal class RestVirtualMessageChannel : RestEntity<ulong>, IMessageChannel
{ {


+ 2
- 2
src/Discord.Net.WebSocket/Entities/Channels/SocketGuildChannel.cs View File

@@ -153,8 +153,8 @@ namespace Discord.WebSocket


//IChannel //IChannel
IAsyncEnumerable<IReadOnlyCollection<IUser>> IChannel.GetUsersAsync(CacheMode mode, RequestOptions options) IAsyncEnumerable<IReadOnlyCollection<IUser>> IChannel.GetUsersAsync(CacheMode mode, RequestOptions options)
=> ImmutableArray.Create<IReadOnlyCollection<IUser>>(Users).ToAsyncEnumerable(); //Overriden in Text/Voice //TODO: Does this actually override?
=> ImmutableArray.Create<IReadOnlyCollection<IUser>>(Users).ToAsyncEnumerable(); //Overriden in Text/Voice
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
=> Task.FromResult<IUser>(GetUser(id)); //Overriden in Text/Voice //TODO: Does this actually override?
=> Task.FromResult<IUser>(GetUser(id)); //Overriden in Text/Voice
} }
} }

Loading…
Cancel
Save