mirror of
https://github.com/MoleskiCoder/EightBitNet.git
synced 2026-01-22 16:16:17 +00:00
Correct style issues
This commit is contained in:
@@ -8,8 +8,8 @@ namespace EightBit
|
||||
|
||||
public sealed class InputOutput
|
||||
{
|
||||
private readonly byte[] input = new byte[0x100];
|
||||
private readonly byte[] output = new byte[0x100];
|
||||
private readonly byte[] _input = new byte[0x100];
|
||||
private readonly byte[] _output = new byte[0x100];
|
||||
|
||||
public event EventHandler<PortEventArgs>? ReadingPort;
|
||||
|
||||
@@ -19,35 +19,35 @@ namespace EightBit
|
||||
|
||||
public event EventHandler<PortEventArgs>? WrittenPort;
|
||||
|
||||
public byte Read(byte port) => this.ReadInputPort(port);
|
||||
public byte Read(byte port) => ReadInputPort(port);
|
||||
|
||||
public void Write(byte port, byte value) => this.WriteOutputPort(port, value);
|
||||
public void Write(byte port, byte value) => WriteOutputPort(port, value);
|
||||
|
||||
public byte ReadInputPort(byte port)
|
||||
{
|
||||
this.OnReadingPort(port);
|
||||
var value = this.input[port];
|
||||
this.OnReadPort(port);
|
||||
OnReadingPort(port);
|
||||
var value = _input[port];
|
||||
OnReadPort(port);
|
||||
return value;
|
||||
}
|
||||
|
||||
public void WriteInputPort(byte port, byte value) => this.input[port] = value;
|
||||
public void WriteInputPort(byte port, byte value) => _input[port] = value;
|
||||
|
||||
public byte ReadOutputPort(byte port) => this.output[port];
|
||||
public byte ReadOutputPort(byte port) => _output[port];
|
||||
|
||||
public void WriteOutputPort(byte port, byte value)
|
||||
{
|
||||
this.OnWritingPort(port);
|
||||
this.output[port] = value;
|
||||
this.OnWrittenPort(port);
|
||||
OnWritingPort(port);
|
||||
_output[port] = value;
|
||||
OnWrittenPort(port);
|
||||
}
|
||||
|
||||
private void OnReadingPort(byte port) => this.ReadingPort?.Invoke(this, new PortEventArgs(port));
|
||||
private void OnReadingPort(byte port) => ReadingPort?.Invoke(this, new PortEventArgs(port));
|
||||
|
||||
private void OnReadPort(byte port) => this.ReadPort?.Invoke(this, new PortEventArgs(port));
|
||||
private void OnReadPort(byte port) => ReadPort?.Invoke(this, new PortEventArgs(port));
|
||||
|
||||
private void OnWritingPort(byte port) => this.WritingPort?.Invoke(this, new PortEventArgs(port));
|
||||
private void OnWritingPort(byte port) => WritingPort?.Invoke(this, new PortEventArgs(port));
|
||||
|
||||
private void OnWrittenPort(byte port) => this.WrittenPort?.Invoke(this, new PortEventArgs(port));
|
||||
private void OnWrittenPort(byte port) => WrittenPort?.Invoke(this, new PortEventArgs(port));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user