From 2ff6d677cb8570cbfddc6cc79c6f82ca1737e39b Mon Sep 17 00:00:00 2001
From: Hsu Still <341464@gmail.com>
Date: Fri, 30 Mar 2018 15:59:57 +0800
Subject: [PATCH] Add Xmldocs
---
src/Discord.Net.Core/ConnectionState.cs | 8 ++---
.../Entities/Activities/ActivityType.cs | 8 ++---
.../Entities/Permissions/ChannelPermission.cs | 2 +-
src/Discord.Net.Core/Utils/Cacheable.cs | 32 ++++++-------------
.../Entities/Channels/ChannelType.cs | 10 +++---
5 files changed, 24 insertions(+), 36 deletions(-)
diff --git a/src/Discord.Net.Core/ConnectionState.cs b/src/Discord.Net.Core/ConnectionState.cs
index b240eb134..fadbc4065 100644
--- a/src/Discord.Net.Core/ConnectionState.cs
+++ b/src/Discord.Net.Core/ConnectionState.cs
@@ -3,13 +3,13 @@ namespace Discord
/// Specifies the connection state of a client.
public enum ConnectionState : byte
{
- /// Represents that the client has disconnected from the WebSocket.
+ /// The client has disconnected from Discord.
Disconnected,
- /// Represents that the client is connecting to the WebSocket.
+ /// The client is connecting to Discord.
Connecting,
- /// Represents that the client has established a connection to the WebSocket.
+ /// The client has established a connection to Discord.
Connected,
- /// Represents that the client is disconnecting from the WebSocket.
+ /// The client is disconnecting from Discord.
Disconnecting
}
}
diff --git a/src/Discord.Net.Core/Entities/Activities/ActivityType.cs b/src/Discord.Net.Core/Entities/Activities/ActivityType.cs
index 14281a329..62831f165 100644
--- a/src/Discord.Net.Core/Entities/Activities/ActivityType.cs
+++ b/src/Discord.Net.Core/Entities/Activities/ActivityType.cs
@@ -3,13 +3,13 @@ namespace Discord
/// Specifies a Discord user's activity type.
public enum ActivityType
{
- /// Represents that the user is playing a game.
+ /// The user is playing a game.
Playing = 0,
- /// Represents that the user is streaming online.
+ /// The user is streaming online.
Streaming = 1,
- /// Represents that the user is listening to a song.
+ /// The user is listening to a song.
Listening = 2,
- /// Represents that the user is watching a media.
+ /// The user is watching a media.
Watching = 3
}
}
diff --git a/src/Discord.Net.Core/Entities/Permissions/ChannelPermission.cs b/src/Discord.Net.Core/Entities/Permissions/ChannelPermission.cs
index 498aa5ef8..183945147 100644
--- a/src/Discord.Net.Core/Entities/Permissions/ChannelPermission.cs
+++ b/src/Discord.Net.Core/Entities/Permissions/ChannelPermission.cs
@@ -26,7 +26,7 @@ namespace Discord
SendTTSMessages = 0x00_00_10_00,
/// Allows for deletion of other users messages.
ManageMessages = 0x00_00_20_00,
- /// Links sent by users with this permission will be auto-embedded.
+ /// Allows links sent by users with this permission will be auto-embedded.
EmbedLinks = 0x00_00_40_00,
/// Allows for uploading images and files.
AttachFiles = 0x00_00_80_00,
diff --git a/src/Discord.Net.Core/Utils/Cacheable.cs b/src/Discord.Net.Core/Utils/Cacheable.cs
index f17aa8699..c2d83b04d 100644
--- a/src/Discord.Net.Core/Utils/Cacheable.cs
+++ b/src/Discord.Net.Core/Utils/Cacheable.cs
@@ -1,28 +1,20 @@
-using System;
+using System;
using System.Threading.Tasks;
namespace Discord
{
- ///
- /// Contains an entity that may be cached.
- ///
- /// The type of entity that is cached
- /// The type of this entity's ID
+ /// Contains an entity that may be cached.
+ /// The type of entity that is cached.
+ /// The type of this entity's ID.
public struct Cacheable
where TEntity : IEntity
where TId : IEquatable
{
- ///
- /// Is this entity cached?
- ///
+ /// Indicates whether this entity is cached.
public bool HasValue { get; }
- ///
- /// The ID of this entity.
- ///
+ /// Gets the ID of this entity.
public TId Id { get; }
- ///
- /// The entity, if it could be pulled from cache.
- ///
+ /// Gets the entity if it could be pulled from cache.
///
/// This value is not guaranteed to be set; in cases where the entity cannot be pulled from cache, it is null.
///
@@ -37,9 +29,7 @@ namespace Discord
DownloadFunc = downloadFunc;
}
- ///
- /// Downloads this entity to cache.
- ///
+ /// Downloads this entity to cache.
/// An awaitable Task containing the downloaded entity.
/// Thrown when used from a user account.
/// Thrown when the message is deleted.
@@ -48,12 +38,10 @@ namespace Discord
return await DownloadFunc();
}
- ///
- /// Returns the cached entity if it exists; otherwise downloads it.
- ///
+ /// Returns the cached entity if it exists; otherwise downloads it.
/// An awaitable Task containing a cached or downloaded entity.
/// Thrown when used from a user account.
/// Thrown when the message is deleted and is not in cache.
public async Task GetOrDownloadAsync() => HasValue ? Value : await DownloadAsync();
}
-}
\ No newline at end of file
+}
diff --git a/src/Discord.Net.Rest/Entities/Channels/ChannelType.cs b/src/Discord.Net.Rest/Entities/Channels/ChannelType.cs
index c1fdc5af5..7759622c2 100644
--- a/src/Discord.Net.Rest/Entities/Channels/ChannelType.cs
+++ b/src/Discord.Net.Rest/Entities/Channels/ChannelType.cs
@@ -3,15 +3,15 @@ namespace Discord
/// Defines the types of channels.
public enum ChannelType
{
- /// Represents a text channel.
+ /// The channel is a text channel.
Text = 0,
- /// Represents a Direct Message channel.
+ /// The channel is a Direct Message channel.
DM = 1,
- /// Represents a voice channel.
+ /// The channel is a voice channel.
Voice = 2,
- /// Represents a group channel.
+ /// The channel is a group channel.
Group = 3,
- /// Represents a category channel.
+ /// The channel is a category channel.
Category = 4
}
}