private void Pin_ValueChanged(object sender, GpioPinValueChangedEventArgs e) { if (e.Edge == GpioPinEdge.RisingEdge) { Touched?.Invoke(); } else { Untouched?.Invoke(); } }
protected void handleFile(FileName sourceFile, FolderName currentTargetFolder) { var targetFile = currentTargetFolder + sourceFile; if (copyIfNeeded(sourceFile, targetFile).If(out var file, out var _exception)) { Success?.Invoke(this, new FileArgs(file, targetFile, $"{sourceFile} {(move ? "moved" : "copied")} to {targetFile}")); } else if (_exception.If(out var exception)) { Failure?.Invoke(this, new FailedFileArgs(sourceFile, targetFile, exception)); } else { Untouched?.Invoke(this, new FileArgs(sourceFile, targetFile, $"{sourceFile} not touched")); } }
protected void EmitUntouched() { Untouched?.Invoke(this, EventArgs.Empty); }