Our
RibotLib.dll file contains shared interfaces/classes for fellow programmers to reuse.
This thread is here to document them.
- IRibotModule
- IRibotInputModule
- InputEventArgs
- RibotModuleInfo
using System;
namespace RIBOT
{
/// <summary>
/// RIBOT module.
/// </summary>
public interface IRibotModule
{
/// <summary>
/// Gets the identifier.
/// </summary>
/// <value>The identifier.</value>
string Id { get; }
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
string Name { get; }
/// <summary>
/// Gets the description.
/// </summary>
/// <value>The description.</value>
string Description { get; }
/// <summary>
/// Gets the type.
/// </summary>
/// <value>The type.</value>
string Type { get; }
/// <summary>
/// Process the specified core string.
/// </summary>
/// <returns>The process.</returns>
/// <param name="coreString">Core string.</param>
string Process(string coreString);
}
}
using System;
namespace RIBOT
{
/// <summary>
/// RIBOT input module.
/// </summary>
public interface IRibotInputModule : IRibotModule
{
/// <summary>
/// Occurs when input is emitted to the core.
/// </summary>
event EventHandler<InputEventArgs> InputEmitted;
/// <summary>
/// Emits the input.
/// </summary>
/// <param name="e">E.</param>
void EmitInput(InputEventArgs e);
}
}
using System;
namespace RIBOT
{
public class InputEventArgs : EventArgs
{
/// <summary>
/// Gets or sets the input string.
/// </summary>
/// <value>The input string.</value>
public string InputString { get; set; }
}
}
using System;
namespace RIBOT
{
public class RibotModuleInfo
{
/// <summary>
/// Gets the identifier.
/// </summary>
/// <value>The identifier.</value>
public string Id { get; set; }
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets the description.
/// </summary>
/// <value>The description.</value>
public string Description { get; set; }
/// <summary>
/// Gets the type.
/// </summary>
/// <value>The type.</value>
public string Type { get; set; }
/// <summary>
/// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:RIBOT.RibotModuleInfo"/>.
/// </summary>
/// <returns>A <see cref="T:System.String"/> that represents the current <see cref="T:RIBOT.RibotModuleInfo"/>.</returns>
public override string ToString() { return Name; }
}
}