CP.Extensions.Hosting.PluginService 2.0.5
.NET 6.0 此包针对 .NET 6.0。此包与此框架兼容,或更高版本。 .NET Framework 4.6.2 此包针对 .NET Framework 4.6.2。此包与此框架兼容,或更高版本。
dotnet add package CP.Extensions.Hosting.PluginService --version 2.0.5
NuGet\Install-Package CP.Extensions.Hosting.PluginService -Version 2.0.5
此命令旨在在 Visual Studio 的包管理器控制台中使用,因为它使用了 NuGet 模块的 Install-Package 版本。
<PackageReference Include="CP.Extensions.Hosting.PluginService" Version="2.0.5" />
对于支持 PackageReference 的项目,将此 XML 节点复制到项目文件中以引用该包。
paket add CP.Extensions.Hosting.PluginService --version 2.0.5
NuGet 团队不提供对该客户端的支持。请联系其 管理员 获取支持。
#r "nuget: CP.Extensions.Hosting.PluginService, 2.0.5"
#r 指令可用于 F# Interactive 和 Polyglot Notebooks。将其复制到交互式工具或脚本的源代码中以引用该包。
// Install CP.Extensions.Hosting.PluginService as a Cake Addin #addin nuget:?package=CP.Extensions.Hosting.PluginService&version=2.0.5 // Install CP.Extensions.Hosting.PluginService as a Cake Tool #tool nuget:?package=CP.Extensions.Hosting.PluginService&version=2.0.5
NuGet 团队不提供对该客户端的支持。请联系其 管理员 获取支持。
注意:命名空间已更改为 ReactiveMarbles.Extensions.Hosting。请更新对新命名空间的引用。
ReactiveMarbles.Extensions.Hosting
Microsoft.Extensions.Hosting 库的扩展,旨在允许 Windows 应用程序使用托管基础知识。
ReactiveMarbles.Extensions.Hosting.Identity.EntityFrameworkCore.Sqlite
.UseWebHostServices((whb, services) =>
{
services.UseEntityFrameworkCoreSqlite<DBContext, IdentityUser, IdentityRole>(whb, "DefaultConnection")
.Configure<IdentityOptions>(options =>
{
// Configure options
});
})
ReactiveMarbles.Extensions.Hosting.Identity.EntityFrameworkCore.SqlServer
.UseWebHostServices((whb, services) =>
{
services.UseEntityFrameworkCoreSqlServer<DBContext, IdentityUser, IdentityRole>(whb, "DefaultConnection")
.Configure<IdentityOptions>(options =>
{
// Configure options
});
})
ReactiveMarbles.Extensions.Hosting.MainUIThread
用于在 Wpf / WinUI / WinForms 应用程序中运行主 UI 线程。
ReactiveMarbles.Extensions.Hosting.Plugins
.ConfigurePlugins(pluginBuilder =>
{
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("Running using dotNet {0}", Environment.Version);
//// Specify the location from where the Dll's are "globbed"
var process = Process.GetCurrentProcess();
var fullPath = process.MainModule?.FileName?.Replace(process.MainModule.ModuleName!, string.Empty);
Console.WriteLine("Add Scan Directories: {0}", fullPath);
pluginBuilder?.AddScanDirectories(fullPath!);
//// Add the framework libraries which can be found with the specified globs
pluginBuilder?.IncludeFrameworks(@"\netstandard2.0\*.FrameworkLib.dll");
//// Add the plugins which can be found with the specified globs
var runtime = targetRuntime ?? Path.GetFileName(executableLocation);
Console.WriteLine(@"Include Plugins from: \Plugins\{0}\{1}*.dll", runtime, nameSpace);
pluginBuilder?.IncludePlugins(@$"\Plugins\{runtime}\{##YourPluginNameSpace##}*.dll");
Console.ResetColor();
})
/// <summary>
/// This plug-in configures the HostBuilderContext to have the hosted services
/// </summary>
public class Plugin : PluginBase<FirstService, SecondService, ThirdService>
{
}
ReactiveMarbles.Extensions.Hosting.PluginService
await ServiceHost.Create(
typeof(Program),
args,
hb => hb, // Configure the HostBuilder
host => {}, // Configure the Host
nameSpace: "ReactiveMarbles.Plugin").ConfigureAwait(false);
ReactiveMarbles.Extensions.Hosting.ReactiveUI.WinForms
.ConfigureSplatForMicrosoftDependencyResolver()
.ConfigureWinForms<MainForm>()
.UseWinFormsLifetime()
ReactiveMarbles.Extensions.Hosting.ReactiveUI.WinUI
.ConfigureSplatForMicrosoftDependencyResolver()
.ConfigureWinUI<MainWindow>()
.UseWpfLifetime()
ReactiveMarbles.Extensions.Hosting.ReactiveUI.Wpf
.ConfigureSplatForMicrosoftDependencyResolver()
.ConfigureWpf<MainWindow>()
.UseWpfLifetime()
ReactiveMarbles.Extensions.Hosting.SingleInstance
.ConfigureSingleInstance(builder =>
{
builder.MutexId = "{ea031523-3a63-45e5-85f2-6fa75fbf37ed}";
builder.WhenNotFirstInstance = (hostingEnvironment, logger) =>
{
// Application already started, this is another instance
logger.LogWarning("Application {0} already running.", hostingEnvironment.ApplicationName);
};
})
ReactiveMarbles.Extensions.Hosting.WinForms
.ConfigureWinForms<MainForm>()
.UseWinFormsLifetime()
ReactiveMarbles.Extensions.Hosting.WinUI
.ConfigureWinUI<MainWindow>()
.UseWpfLifetime()
ReactiveMarbles.Extensions.Hosting.Wpf
.ConfigureWpf<MainWindow>()
.UseWpfLifetime()
产品 | 版本 兼容和附加计算的目标框架版本。 |
---|---|
.NET | net6.0-windows7.0 兼容。 net7.0-windows 已计算。 net8.0-windows 已计算。 net8.0-windows7.0 兼容。 |
.NET Framework | net462 兼容。 net463 已计算。 net47 已计算。 net471 已计算。 net472 已计算。 net48 已计算。 net481 已计算。 |
-
.NETFramework 4.6.2
- CP.Extensions.Hosting.Plugins (>= 2.0.5)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Microsoft.Extensions.Logging.Configuration (>= 8.0.0)
- Microsoft.Extensions.Logging.Log4Net.AspNetCore (>= 8.0.0)
- Microsoft.Extensions.Logging.TraceSource (>= 8.0.0)
- System.ServiceProcess.ServiceController (>= 8.0.0)
-
net6.0-windows7.0
- CP.Extensions.Hosting.Plugins (>= 2.0.5)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Microsoft.Extensions.Logging.Configuration (>= 8.0.0)
- Microsoft.Extensions.Logging.Log4Net.AspNetCore (>= 8.0.0)
- Microsoft.Extensions.Logging.TraceSource (>= 8.0.0)
- System.ServiceProcess.ServiceController (>= 8.0.0)
-
net8.0-windows7.0
- CP.Extensions.Hosting.Plugins (>= 2.0.5)
- Microsoft.Extensions.Configuration.Json (>= 8.0.0)
- Microsoft.Extensions.Logging.Configuration (>= 8.0.0)
- Microsoft.Extensions.Logging.Log4Net.AspNetCore (>= 8.0.0)
- Microsoft.Extensions.Logging.TraceSource (>= 8.0.0)
- System.ServiceProcess.ServiceController (>= 8.0.0)
NuGet 包
该包没有被任何 NuGet 包使用。
GitHub 仓库
该包没有被任何流行的 GitHub 仓库使用。
版本 | 下载 | 最后更新 |
---|---|---|
2.0.5 | 97 | 5/18/2024 |
1.5.2 | 86 | 5/17/2024 |
1.4.2 | 102 | 5/5/2024 |
1.3.13 | 80 | 5/1/2024 |
1.3.2 | 117 | 4/11/2024 |
1.2.2 | 100 | 3/26/2024 |
1.1.90 | 98 | 3/19/2024 |
1.1.28 | 100 | 2/5/2024 |
1.1.18 | 153 | 1/4/2024 |
1.1.11 | 116 | 12/23/2023 |
1.1.10 | 99 | 12/23/2023 |
1.1.7 | 84 | 12/14/2023 |
1.1.5 | 107 | 11/23/2023 |
1.1.3 | 77 | 11/12/2023 |
1.0.61 | 108 | 11/6/2023 |
1.0.60 | 95 | 11/6/2023 |
1.0.58 | 124 | 10/27/2023 |
1.0.56 | 105 | 10/27/2023 |
1.0.55 | 115 | 10/27/2023 |
1.0.54 | 102 | 10/27/2023 |
1.0.52 | 130 | 10/17/2023 |
1.0.50 | 102 | 10/17/2023 |
1.0.48 | 106 | 10/16/2023 |
1.0.47 | 117 | 10/16/2023 |
1.0.46 | 112 | 10/16/2023 |
1.0.44 | 101 | 10/3/2023 |
1.0.43 | 111 | 10/2/2023 |
1.0.39 | 114 | 10/2/2023 |
1.0.37 | 125 | 9/30/2023 |
1.0.33 | 112 | 9/19/2023 |
1.0.31 | 83 | 9/19/2023 |
1.0.29 | 120 | 9/14/2023 |
1.0.17 | 130 | 8/31/2023 |
1.0.15 | 135 | 8/30/2023 |
1.0.13 | 124 | 8/30/2023 |
1.0.8 | 149 | 8/1/2023 |
与 Net 6 / 8 和 net462 的兼容性