You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
167 lines
4.9 KiB
Plaintext
167 lines
4.9 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"attachments": {},
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"# 测试使用"
|
|
]
|
|
},
|
|
{
|
|
"attachments": {},
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## 全局引用"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {
|
|
"dotnet_interactive": {
|
|
"language": "csharp"
|
|
},
|
|
"polyglot_notebook": {
|
|
"kernelName": "csharp"
|
|
}
|
|
},
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<div><div><strong>Restore sources</strong><ul><li><span>https://api.nuget.org/v3/index.json</span></li></ul></div><div></div><div><strong>Installed Packages</strong><ul><li><span>microsoft.dotNet.interactive.aspnetcore, 1.0.0-beta.25177.1</span></li><li><span>Microsoft.DotNet.Interactive.ExtensionLab, 1.0.0-beta.25177.1</span></li></ul></div></div>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"Loading extensions from `C:\\Users\\ruyu\\.nuget\\packages\\microsoft.data.analysis\\0.22.0\\interactive-extensions\\dotnet\\Microsoft.Data.Analysis.Interactive.dll`"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"Loading extension script from `C:\\Users\\ruyu\\.nuget\\packages\\microsoft.dotnet.interactive.aspnetcore\\1.0.0-beta.25177.1\\interactive-extensions\\dotnet\\extension.dib`"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
"Loading extension script from `C:\\Users\\ruyu\\.nuget\\packages\\microsoft.dotnet.interactive.extensionlab\\1.0.0-beta.25177.1\\interactive-extensions\\dotnet\\extension.dib`"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<details><summary>Create strongly-typed dataframes using<code>#!linqify</code>.</summary>\r\n",
|
|
" <p>The <code>#!linqify</code> magic command replaces a <a href=\"https://www.nuget.org/packages/Microsoft.Data.Analysis/\"><code>Microsoft.Data.Analysis.DataFrame</code></a> variable with a generated, strongly-typed data frame, allowing the use of LINQ operations over the contained data.</p>\r\n",
|
|
" </details>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<details><summary>ExplainCode</summary>\r\n",
|
|
" <p>This extension generates Sequence diagrams from csharp code using Mermaid kernel.</p>\r\n",
|
|
" </details>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<details><summary>Inspect code compilation details using the <code>#!inspect</code> magic command.</summary>\r\n",
|
|
" <p>The <code>#!inspect</code> magic command allows you to see the C# decompilation, IL, and JIT Asm for the code in a C# cell.</p>\r\n",
|
|
" <img src=\"https://user-images.githubusercontent.com/547415/109560515-d5749a00-7a90-11eb-9fa3-51b737345bb4.png\" width=\"75%\" />\r\n",
|
|
" </details>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
},
|
|
{
|
|
"data": {
|
|
"text/html": [
|
|
"<details><summary>Use the <code>#!record</code> magic command to keep a transcript of the code you run.</summary>\r\n",
|
|
" <p>Once you enable transcripts using <code>#!record</code>, each code submission (including re-running cells) is recorded in the specified file. The JSON format used is the same format recognized by the .NET Interactive <code>stdio</code> and <code>http</code> APIs and can be used to replay an interactive session via automation.</p>\r\n",
|
|
" <img src=\"https://user-images.githubusercontent.com/547415/109562409-343b1300-7a93-11eb-8ebf-79bb6af028cf.png\" width=\"75%\" />\r\n",
|
|
" </details>"
|
|
]
|
|
},
|
|
"metadata": {},
|
|
"output_type": "display_data"
|
|
}
|
|
],
|
|
"source": [
|
|
"// 默认包源\n",
|
|
"#i \"nuget:https://api.nuget.org/v3/index.json\"\n",
|
|
"\n",
|
|
"//添加 Nuget 包\n",
|
|
"#r \"nuget: microsoft.dotNet.interactive.aspnetcore,*-*\"\n",
|
|
"#r \"nuget: Microsoft.DotNet.Interactive.ExtensionLab,*-*\"\n",
|
|
"\n",
|
|
"//全局引用\n",
|
|
"\n",
|
|
"//全局对象\n",
|
|
"\n",
|
|
"//全局变量"
|
|
]
|
|
},
|
|
{
|
|
"attachments": {},
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## 测试"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": ".NET (C#)",
|
|
"language": "C#",
|
|
"name": ".net-csharp"
|
|
},
|
|
"language_info": {
|
|
"name": "polyglot-notebook"
|
|
},
|
|
"orig_nbformat": 4,
|
|
"polyglot_notebook": {
|
|
"kernelInfo": {
|
|
"defaultKernelName": "csharp",
|
|
"items": [
|
|
{
|
|
"aliases": [],
|
|
"name": "csharp"
|
|
},
|
|
{
|
|
"aliases": [],
|
|
"name": "razor"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|