using System;

namespace Decal.Adapter.Messages;

/// <summary>
/// Defines a response to a message request
/// </summary>
[CLSCompliant(true)]
public class AdapterMessageResponseEventArgs : EventArgs
{
	private bool success;

	private bool complete;

	/// <summary>
	/// Whether or not the actions take due to the message succeeded
	/// </summary>
	public bool Succeeded => success;

	/// <summary>
	/// Whether or not all handlers have completed processing
	/// </summary>
	public bool Complete
	{
		get
		{
			return complete;
		}
		internal set
		{
			complete = value;
		}
	}

	/// <summary>
	/// Create a new AdapterMessageResponse
	/// </summary>
	/// <param name="success">Did these actions succeed?</param>
	protected AdapterMessageResponseEventArgs(bool success)
	{
		this.success = success;
	}
}
