{ "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": [], "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": [ "## 测试" ] }, { "cell_type": "code", "execution_count": 38, "metadata": { "polyglot_notebook": { "kernelName": "pwsh" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Description:\n", " .NET 的交互式编程。\n", "\n", "Usage:\n", " dotnet-interactive [command] [options]\n", "\n", "Options:\n", " --log-path 启用文档日志到指定目录\n", " --verbose 启用详细记录至控制台\n", " --version Show version information\n", " -?, -h, --help Show help and usage information\n", "\n", "Commands:\n", " jupyter 启动 dotnet-interactive 作为 Jupyter 内核\n", " stdio 使用通过标准 I/O 公开的内核功能启动 dotnet 交互\n", " notebook-parser 启动分析和序列化笔记本的进程。\n", "\n" ] } ], "source": [ "dotnet interactive --help" ] }, { "cell_type": "code", "execution_count": 39, "metadata": { "polyglot_notebook": { "kernelName": "pwsh" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1.0.522904+cdfa48b2ea1a27dfe0f545c42a34fd3ec7119074\r\n" ] } ], "source": [ "dotnet interactive --version\n" ] } ], "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 }