BizHawk/BizHawk.Emulation.Common/CoreComms.cs

36 lines
1.2 KiB
C#
Raw Normal View History

using System;
namespace BizHawk.Emulation.Common
{
2016-12-12 19:14:01 +00:00
/// <summary>
/// This object facilitates communications between client and core
2016-12-12 19:14:01 +00:00
/// The primary use is to provide a client => core communication, such as providing client-side callbacks for a core to use
2017-04-27 16:43:19 +00:00
/// Any communications that can be described as purely a Core -> Client system, should be provided as an <seealso cref="IEmulatorService"/> instead
/// It is important that by design this class stay immutable
2016-12-12 19:14:01 +00:00
/// </summary>
public class CoreComm
{
public CoreComm(
Action<string> showMessage,
Action<string> notifyMessage,
ICoreFileProvider coreFileProvider)
{
2016-02-28 18:35:41 +00:00
ShowMessage = showMessage;
2017-04-24 12:41:55 +00:00
Notify = notifyMessage;
CoreFileProvider = coreFileProvider;
}
public ICoreFileProvider CoreFileProvider { get; }
/// <summary>
2017-04-27 16:43:19 +00:00
/// Gets a message to show. reasonably annoying (dialog box), shouldn't be used most of the time
/// </summary>
public Action<string> ShowMessage { get; }
2014-03-18 03:03:53 +00:00
/// <summary>
2017-04-27 16:43:19 +00:00
/// Gets a message to show. less annoying (OSD message). Should be used for ignorable helpful messages
2014-03-18 03:03:53 +00:00
/// </summary>
public Action<string> Notify { get; }
}
}