using System;
namespace Artemis.Core.Services
{
///
/// Represents an interface for an input provider that provides and implementation for sending and receiving device
/// input
///
public abstract class InputProvider : IDisposable
{
///
/// Occurs when the input provided has received keyboard data
///
public event EventHandler? KeyboardDataReceived;
///
/// Invokes the event
///
protected virtual void OnKeyboardDataReceived(InputProviderKeyboardEventArgs e)
{
KeyboardDataReceived?.Invoke(this, e);
}
#region IDisposable
///
/// Releases the unmanaged resources used by the object and optionally releases the managed resources.
///
///
/// to release both managed and unmanaged resources;
/// to release only unmanaged resources.
///
protected virtual void Dispose(bool disposing)
{
if (disposing)
{
}
}
///
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
#endregion
}
}