コード例 #1
0
 /// <inheritdoc cref="MessageActivity.ToString()" />
 public override string ToString()
 => MessageActivity.ToString();
コード例 #2
0
 /// <summary>
 /// Converts an existing <see cref="MessageActivity"/> to an abstracted <see cref="IMessageActivity"/> value.
 /// </summary>
 /// <param name="messageActivity">The existing <see cref="MessageActivity"/> to be abstracted.</param>
 /// <exception cref="ArgumentNullException">Throws for <paramref name="messageActivity"/>.</exception>
 /// <returns>An <see cref="IMessageActivity"/> that abstracts <paramref name="messageActivity"/>.</returns>
 public static IMessageActivity Abstract(this MessageActivity messageActivity)
 => new MessageActivityAbstraction(messageActivity);
コード例 #3
0
 /// <summary>
 /// Constructs a new <see cref="MessageActivityAbstraction"/> around an existing <see cref="Discord.MessageActivity"/>.
 /// </summary>
 /// <param name="messageActivity">The existing <see cref="Discord.MessageActivity"/> to be abstracted.</param>
 /// <exception cref="ArgumentNullException">Throws for <paramref name="messageActivity"/>.</exception>
 public MessageActivityAbstraction(MessageActivity messageActivity)
 {
     MessageActivity = messageActivity ?? throw new ArgumentNullException(nameof(messageActivity));
 }