/// <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)); }
/// <inheritdoc cref="MessageApplication.ToString" /> public override string ToString() => MessageApplication.ToString();
/// <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);