using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;

namespace QC.QSPRSchedulerWrapper;

[ClassInterface(ClassInterfaceType.None)]
[ComVisible(true)]
[ProgId("QSPR.TestMessage")]
public class QSPRTestMessage : ITestMessage
{
	private Dictionary<string, string> messageItems = new Dictionary<string, string>();

	[ComVisible(false)]
	public Dictionary<string, string> MessageItems
	{
		get
		{
			return messageItems;
		}
		set
		{
			messageItems = value;
		}
	}

	public string[] GetItemNames()
	{
		return messageItems.Keys.ToArray();
	}

	public string GetValue(string name)
	{
		if (messageItems.ContainsKey(name))
		{
			return messageItems[name];
		}
		return null;
	}
}
