-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle multiple #!set commands in sungle submission #2960
Conversation
colombod
commented
May 2, 2023
•
edited
Loading
edited
|
||
var valueProduced = events.SingleOrDefault(); | ||
var valueProduced = valueSource switch | ||
{ { Name: var sourceValueName, Kernel: var sourceKernelName } when !string.IsNullOrWhiteSpace(sourceKernelName) && !string.IsNullOrEmpty(sourceKernelName) && sourceKernelName != "input" => events.SingleOrDefault(e => e.Name == sourceValueName && e.Command.TargetKernelName == sourceKernelName), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to split the long line...
{ | ||
var valueOptionValue = argResult.Tokens.Single().Value; | ||
|
||
if (!valueOptionValue.StartsWith("@")) | ||
{ | ||
return valueOptionValue; | ||
return new ValueOptionResult( valueOptionValue, null,null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider using named params for the nulls
} | ||
} | ||
else | ||
{ | ||
context.Fail(context.Command, new CommandNotSupportedException(typeof(SendValue), kernel)); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: Remove blank lines