MeshWeaver.Connection.Notebook 2.5.0

dotnet add package MeshWeaver.Connection.Notebook --version 2.5.0
                    
NuGet\Install-Package MeshWeaver.Connection.Notebook -Version 2.5.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MeshWeaver.Connection.Notebook" Version="2.5.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MeshWeaver.Connection.Notebook" Version="2.5.0" />
                    
Directory.Packages.props
<PackageReference Include="MeshWeaver.Connection.Notebook" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MeshWeaver.Connection.Notebook --version 2.5.0
                    
#r "nuget: MeshWeaver.Connection.Notebook, 2.5.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MeshWeaver.Connection.Notebook@2.5.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MeshWeaver.Connection.Notebook&version=2.5.0
                    
Install as a Cake Addin
#tool nuget:?package=MeshWeaver.Connection.Notebook&version=2.5.0
                    
Install as a Cake Tool

MeshWeaver.Connection.Notebook

MeshWeaver.Connection.Notebook enables seamless integration between Polyglot Notebooks and MeshWeaver's kernel system through SignalR connections. This library allows notebooks to interact with MeshWeaver's distributed computation and visualization capabilities.

Overview

The library provides:

  • SignalR kernel connection for Polyglot Notebooks
  • Interactive code execution
  • Layout area rendering in notebooks
  • Real-time data visualization

Usage

Basic Connection

To connect your notebook to a MeshWeaver kernel:

// Connect to MeshWeaver kernel
#!connect mesh --url http://localhost/kernel --kernel-name mesh

// Test connection with hello world
#!mesh
Console.WriteLine("Hello World");

Layout Integration

Create and display MeshWeaver layout controls in your notebook:

#!mesh
// Create a markdown control
new MarkdownControl("Hello World")

// The output will be rendered as an iframe in the notebook
// <iframe id='...' src='http://localhost/area/kernel/{id}/{area}' ...></iframe>

Interactive Data Visualization

Work with MeshWeaver's visualization components:

#!mesh
// Create a data grid
var data = new[]
{
    new { Id = 1, Name = "Item 1" },
    new { Id = 2, Name = "Item 2" }
};

Controls.ToDataGrid(data, grid => grid
    .WithColumn(x => x.Id)
    .WithColumn(x => x.Name)
)

Architecture

Connection Flow

graph TD
    A[Notebook] -->|#!connect mesh| B[SignalR Connection]
    B -->|Establish| C[MeshWeaver Kernel]
    C -->|Execute| D[Code]
    C -->|Render| E[Layout Areas]
    E -->|Display| F[Notebook UI]

Features

  1. Kernel Integration

    • SignalR connection management
    • Code execution
    • Event handling
    • Result formatting
  2. Layout Support

    • Interactive controls
    • IFrame rendering
    • Real-time updates
    • Area management
  3. Data Visualization

    • Rich text display
    • Data grid support
    • Chart rendering
    • Interactive components
  4. Development Tools

    • Code completion
    • Error handling
    • Debug output
    • Command history

Configuration

Custom Formatters

Formatter.SetPreferredMimeTypesFor(
    typeof(TabularDataResource), 
    HtmlFormatter.MimeType, 
    CsvFormatter.MimeType
);

Best Practices

  1. Connection Management

    // Always use the connect directive at the start
    #!connect mesh --url http://localhost/kernel --kernel-name mesh
    
    // Verify connection
    #!mesh
    Console.WriteLine("Connected successfully");
    
  2. Layout Handling

    #!mesh
    // Create reusable layout components
    public static class MyLayouts
    {
        public static UiControl CreateDashboard() =>
            Controls.Stack
                .WithView(new MarkdownControl("Dashboard"))
                .WithView(CreateDataGrid());
    }
    
  • MeshWeaver.Kernel.Hub - Core kernel functionality
  • MeshWeaver.Layout - UI control system
  • MeshWeaver.Connection.SignalR - SignalR connection handling
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.5.0 208 11/3/2025
2.4.0 169 10/2/2025
2.3.0 221 8/4/2025
2.2.0 516 7/21/2025
2.1.0 189 4/6/2025
2.0.3 517 3/24/2025
2.0.2 498 3/24/2025
2.0.1 148 3/21/2025
2.0.0 179 3/20/2025
2.0.0-preview3 112 2/28/2025
2.0.0-Preview2 111 2/10/2025
2.0.0-preview1 129 1/6/2025