Exemplo n.º 1
0
 /// <summary>
 /// Constructs a new <see cref="MessageApplicationAbstraction"/> around an existing <see cref="Discord.MessageApplication"/>.
 /// </summary>
 /// <param name="messageApplication">The existing <see cref="Discord.MessageApplication"/> to be abstracted.</param>
 /// <exception cref="ArgumentNullException">Throws for <paramref name="messageApplication"/>.</exception>
 public MessageApplicationAbstraction(MessageApplication messageApplication)
 {
     MessageApplication = messageApplication ?? throw new ArgumentNullException(nameof(messageApplication));
 }
Exemplo n.º 2
0
 /// <inheritdoc cref="MessageApplication.ToString" />
 public override string ToString()
 => MessageApplication.ToString();
Exemplo n.º 3
0
 /// <summary>
 /// Converts an existing <see cref="MessageApplication"/> to an abstracted <see cref="IMessageApplication"/> value.
 /// </summary>
 /// <param name="messageApplication">The existing <see cref="MessageApplication"/> to be abstracted.</param>
 /// <exception cref="ArgumentNullException">Throws for <paramref name="messageApplication"/>.</exception>
 /// <returns>An <see cref="IMessageApplication"/> that abstracts <paramref name="messageApplication"/>.</returns>
 public static IMessageApplication Abstract(this MessageApplication messageApplication)
 => new MessageApplicationAbstraction(messageApplication);