Browse Source

Restore xml docs and change obsolete message

pull/1639/head
Paulo 4 years ago
parent
commit
d6675f12e7
4 changed files with 12 additions and 8 deletions
  1. +7
    -3
      src/Discord.Net.Core/Entities/Invites/IInviteMetadata.cs
  2. +0
    -2
      src/Discord.Net.Rest/API/Common/InviteMetadata.cs
  3. +2
    -1
      src/Discord.Net.Rest/Entities/Invites/RestInviteMetadata.cs
  4. +3
    -2
      src/Discord.Net.WebSocket/Entities/Invites/SocketInvite.cs

+ 7
- 3
src/Discord.Net.Core/Entities/Invites/IInviteMetadata.cs View File

@@ -15,10 +15,14 @@ namespace Discord
/// <c>false</c>.
/// </returns>
bool IsTemporary { get; }

[Obsolete("This will always return false. If an invite is revoked, it will not be found and the invite will be null.")]
/// <summary>
/// Gets a value that indicates whether the invite has been revoked.
/// </summary>
/// <returns>
/// <c>true</c> if this invite was revoked; otherwise <c>false</c>.
/// </returns>
[Obsolete("This property doesn't exist anymore and shouldn't be used.")]
bool IsRevoked { get; }

/// <summary>
/// Gets the time (in seconds) until the invite expires.
/// </summary>


+ 0
- 2
src/Discord.Net.Rest/API/Common/InviteMetadata.cs View File

@@ -16,7 +16,5 @@ namespace Discord.API
public bool Temporary { get; set; }
[JsonProperty("created_at")]
public DateTimeOffset CreatedAt { get; set; }
[Obsolete("This will always return false. If an invite is revoked, it will not be found and the invite will be null.")]
public bool Revoked { get; set; }
}
}

+ 2
- 1
src/Discord.Net.Rest/Entities/Invites/RestInviteMetadata.cs View File

@@ -8,7 +8,8 @@ namespace Discord.Rest
{
private long _createdAtTicks;

[Obsolete("This will always return false. If an invite is revoked, it will not be found and the invite will be null.")]
/// <inheritdoc />
[Obsolete("This property doesn't exist anymore and shouldn't be used.")]
public bool IsRevoked { get; private set; }
/// <inheritdoc />
public bool IsTemporary { get; private set; }


+ 3
- 2
src/Discord.Net.WebSocket/Entities/Invites/SocketInvite.cs View File

@@ -48,8 +48,9 @@ namespace Discord.WebSocket
int? IInvite.PresenceCount => throw new NotImplementedException();
/// <inheritdoc />
int? IInvite.MemberCount => throw new NotImplementedException();
[Obsolete("This will always return false. If an invite is revoked, it will not be found and the invite will be null.")]
bool IInviteMetadata.IsRevoked => false;
/// <inheritdoc />
[Obsolete("This property doesn't exist anymore and shouldn't be used.")]
bool IInviteMetadata.IsRevoked => throw new NotImplementedException();
/// <inheritdoc />
public bool IsTemporary { get; private set; }
/// <inheritdoc />


Loading…
Cancel
Save