Browse Source

Add XMLDocs

+ GameAsset
+ GameTimestamps
+ Format
pull/988/head
Hsu Still 7 years ago
parent
commit
b4f9860319
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
3 changed files with 11 additions and 5 deletions
  1. +6
    -2
      src/Discord.Net.Core/Entities/Activities/GameAsset.cs
  2. +3
    -2
      src/Discord.Net.Core/Entities/Activities/GameTimestamps.cs
  3. +2
    -1
      src/Discord.Net.Core/Format.cs

+ 6
- 2
src/Discord.Net.Core/Entities/Activities/GameAsset.cs View File

@@ -1,14 +1,18 @@
namespace Discord namespace Discord
{ {
/// <summary> The asset for a <see cref="RichGame"/> object. </summary>
public class GameAsset public class GameAsset
{ {
internal GameAsset() { } internal GameAsset() { }


internal ulong? ApplicationId { get; set; } internal ulong? ApplicationId { get; set; }

/// <summary> The description of the asset. </summary>
public string Text { get; internal set; } public string Text { get; internal set; }
/// <summary> The image ID of the asset. </summary>
public string ImageId { get; internal set; } public string ImageId { get; internal set; }

/// <summary> The image URL of the asset; may return null when the application ID does not exist.</summary>
public string GetImageUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128) public string GetImageUrl(ImageFormat format = ImageFormat.Auto, ushort size = 128)
=> ApplicationId.HasValue ? CDN.GetRichAssetUrl(ApplicationId.Value, ImageId, size, format) : null; => ApplicationId.HasValue ? CDN.GetRichAssetUrl(ApplicationId.Value, ImageId, size, format) : null;
} }


+ 3
- 2
src/Discord.Net.Core/Entities/Activities/GameTimestamps.cs View File

@@ -1,7 +1,8 @@
using System;
using System;


namespace Discord namespace Discord
{ {
/// <summary> The timestamps for a <see cref="RichGame"/> object. </summary>
public class GameTimestamps public class GameTimestamps
{ {
public DateTimeOffset? Start { get; } public DateTimeOffset? Start { get; }
@@ -13,4 +14,4 @@ namespace Discord
End = end; End = end;
} }
} }
}
}

+ 2
- 1
src/Discord.Net.Core/Format.cs View File

@@ -1,5 +1,6 @@
namespace Discord
namespace Discord
{ {
/// <summary> A helper class for formatting characters. </summary>
public static class Format public static class Format
{ {
// Characters which need escaping // Characters which need escaping


Loading…
Cancel
Save