// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using Microsoft.JSInterop; namespace Microsoft.AspNetCore.Blazor.Server.Circuits { /// /// Represents an active connection between a Blazor server and a client. /// public class Circuit { /// /// Gets the current . /// public static Circuit Current => CircuitHost.Current?.Circuit; internal Circuit(CircuitHost circuitHost) { JSRuntime = circuitHost.JSRuntime; Services = circuitHost.Services; } /// /// Gets the associated with this circuit. /// public IJSRuntime JSRuntime { get; } /// /// Gets the associated with this circuit. /// public IServiceProvider Services { get; } } }