using System.Collections.Generic;

namespace QC.CTDS.DM.DataStructures.PluginDataStructure;

public class PluginMessage
{
	private PluginMessageTypes messageType;

	private object data;

	private Dictionary<string, object> arguments;

	public PluginMessageTypes MessageType
	{
		get
		{
			return messageType;
		}
		set
		{
			messageType = value;
		}
	}

	public object Data
	{
		protected get
		{
			return data;
		}
		set
		{
			data = value;
		}
	}

	public Dictionary<string, object> Arguments
	{
		get
		{
			if (arguments == null)
			{
				arguments = new Dictionary<string, object>();
			}
			return arguments;
		}
		set
		{
			arguments = value;
		}
	}

	public T GetDataInType<T>() where T : class
	{
		return data as T;
	}

	public bool IsDataNull()
	{
		return data == null;
	}
}
