Skip to content

Commit a64d8f7

Browse files
Create IInputSource.cs
1 parent d48731c commit a64d8f7

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

src/InputSources/IInputSource.cs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// AzimuthConsole/InputSources/IInputSource.cs
2+
using AzimuthConsole.Commands;
3+
4+
namespace AzimuthConsole.InputSources
5+
{
6+
public class CommandReceivedEventArgs : EventArgs
7+
{
8+
public string Line { get; }
9+
public ICommandContext Context { get; }
10+
11+
public CommandReceivedEventArgs(string line, ICommandContext context)
12+
{
13+
Line = line;
14+
Context = context;
15+
}
16+
}
17+
18+
public interface IInputSource
19+
{
20+
string SourceId { get; }
21+
event EventHandler<CommandReceivedEventArgs>? CommandReceived;
22+
Task StartAsync();
23+
Task StopAsync();
24+
}
25+
}

0 commit comments

Comments
 (0)