-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update packages * basic Markdown kernel, no rendering
- Loading branch information
1 parent
789a369
commit 82d7df4
Showing
19 changed files
with
204 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,77 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "csharp" | ||
} | ||
}, | ||
"outputs": [ | ||
"cells": [ | ||
{ | ||
"data": { | ||
"text/plain": "Hello from C#" | ||
}, | ||
"output_type": "unknown" | ||
} | ||
], | ||
"source": [ | ||
"Console.Write(\"Hello from C#\");" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "fsharp" | ||
} | ||
}, | ||
"outputs": [ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Here is a Markdown heading\n", | ||
"\n", | ||
"And here is some text." | ||
] | ||
}, | ||
{ | ||
"data": { | ||
"text/plain": "Hello from F#" | ||
}, | ||
"output_type": "unknown" | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "csharp" | ||
}, | ||
"vscode": { | ||
"languageId": "dotnet-interactive.csharp" | ||
} | ||
}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Hello from C#" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"Console.Write(\"Hello from C#\");" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"dotnet_interactive": { | ||
"language": "fsharp" | ||
}, | ||
"vscode": { | ||
"languageId": "dotnet-interactive.fsharp" | ||
} | ||
}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"Hello from F#" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"\"Hello from F#\" |> Console.Write" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": ".NET (C#)", | ||
"language": "C#", | ||
"name": ".net-csharp" | ||
}, | ||
"language_info": { | ||
"file_extension": ".cs", | ||
"mimetype": "text/x-csharp", | ||
"name": "C#", | ||
"pygments_lexer": "csharp", | ||
"version": "8.0" | ||
} | ||
], | ||
"source": [ | ||
"\"Hello from F#\" |> Console.Write" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": ".NET (C#)", | ||
"language": "C#", | ||
"name": ".net-csharp" | ||
}, | ||
"language_info": { | ||
"file_extension": ".cs", | ||
"mimetype": "text/x-csharp", | ||
"name": "C#", | ||
"pygments_lexer": "csharp", | ||
"version": "9.0" | ||
}, | ||
"orig_nbformat": 2 | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.CommandLine.Binding; | ||
|
||
namespace dotnet_repl; | ||
|
||
internal static class Bind | ||
{ | ||
public static ServiceProviderBinder<T> FromServiceProvider<T>() => ServiceProviderBinder<T>.Instance; | ||
|
||
internal class ServiceProviderBinder<T> : BinderBase<T> | ||
{ | ||
public static ServiceProviderBinder<T> Instance { get; } = new(); | ||
|
||
protected override T GetBoundValue(BindingContext bindingContext) => (T)bindingContext.GetService(typeof(T)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.