public async Task HandleAsync(SubmitCode command, KernelInvocationContext context) { var parseResult = command.KernelNameDirectiveNode.GetDirectiveParseResult(); var value = command.LanguageNode.Text.Trim(); var options = ValueDirectiveOptions.Create(parseResult); if (options.FromFile is {})
protected override async Task Handle(KernelInvocationContext kernelInvocationContext, InvocationContext commandLineInvocationContext) { var options = ValueDirectiveOptions.Create(commandLineInvocationContext.ParseResult); if (options.FromFile is {} fromFile) { var value = File.ReadAllText(fromFile.FullName); await _kernel.StoreValueAsync(value, options, kernelInvocationContext); }