CP.Extensions.Hosting.WinForms 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.WinForms --version 2.0.5
NuGet\Install-Package CP.Extensions.Hosting.WinForms -Version 2.0.5
此命令旨在在 Visual Studio 的包管理器控制台中使用,因为它使用 NuGet 模块的 Install-Package 版本。
<PackageReference Include="CP.Extensions.Hosting.WinForms" Version="2.0.5" />
对于支持 PackageReference 的项目,将此 XML 节点复制到项目文件中以引用软件包。
paket add CP.Extensions.Hosting.WinForms --version 2.0.5
NuGet 团队不提供对客户端的支持。请联系 维护者 以获取支持。
#r "nuget: CP.Extensions.Hosting.WinForms, 2.0.5"
#r 指令可以用在 F# Interactive 和 Polyglot Notebooks 中。将其复制到交互式工具或脚本的源代码中以引用软件包。
// Install CP.Extensions.Hosting.WinForms as a Cake Addin #addin nuget:?package=CP.Extensions.Hosting.WinForms&version=2.0.5 // Install CP.Extensions.Hosting.WinForms as a Cake Tool #tool nuget:?package=CP.Extensions.Hosting.WinForms&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.MainUIThread (>= 2.0.5)
-
net6.0-windows7.0
- CP.Extensions.Hosting.MainUIThread (>= 2.0.5)
-
net8.0-windows7.0
- CP.Extensions.Hosting.MainUIThread (>= 2.0.5)
NuGet包 (1)
显示依赖于CP.Extensions.Hosting.WinForms的前1个NuGet包
包 | 下载 |
---|---|
CP.Extensions.Hosting.ReactiveUI.WinForms
此扩展为基于dotnet core 6.0 / 8.0 WinForms应用程序的泛型主机添加了ReactiveUI支持。使用此功能,您可以将UI增强到应用程序中,并使用泛型主机提供的服务,如DI、日志等,与该reactive MVVM框架一起使用。 |
GitHub仓库
此包没有被任何受欢迎的GitHub仓库使用。
版本 | 下载 | 最后更新 |
---|---|---|
2.0.5 | 89 | 5/18/2024 |
1.5.2 | 90 | 5/17/2024 |
1.4.2 | 102 | 5/5/2024 |
1.3.13 | 79 | 5/1/2024 |
1.3.2 | 105 | 4/11/2024 |
1.2.2 | 98 | 3/26/2024 |
1.1.90 | 100 | 3/19/2024 |
1.1.28 | 85 | 2/5/2024 |
1.1.18 | 150 | 1/4/2024 |
1.1.11 | 96 | 12/23/2023 |
1.1.10 | 95 | 12/23/2023 |
1.1.7 | 92 | 12/14/2023 |
1.1.5 | 128 | 11/23/2023 |
1.1.3 | 89 | 11/12/2023 |
1.0.61 | 92 | 11/6/2023 |
1.0.60 | 91 | 11/6/2023 |
1.0.58 | 114 | 10/27/2023 |
1.0.56 | 104 | 10/27/2023 |
1.0.55 | 99 | 10/27/2023 |
1.0.54 | 103 | 10/27/2023 |
1.0.52 | 97 | 10/17/2023 |
1.0.50 | 89 | 10/17/2023 |
1.0.48 | 95 | 10/16/2023 |
1.0.47 | 87 | 10/16/2023 |
1.0.46 | 88 | 10/16/2023 |
1.0.44 | 100 | 10/3/2023 |
1.0.43 | 98 | 10/2/2023 |
1.0.39 | 103 | 10/2/2023 |
1.0.37 | 110 | 9/30/2023 |
1.0.33 | 100 | 9/19/2023 |
1.0.31 | 88 | 9/19/2023 |
1.0.29 | 108 | 9/14/2023 |
1.0.17 | 108 | 8/31/2023 |
1.0.15 | 117 | 8/30/2023 |
1.0.13 | 115 | 8/30/2023 |
1.0.8 | 135 | 8/1/2023 |
1.0.7 | 124 | 8/1/2023 |
1.0.6 | 135 | 7/25/2023 |
1.0.4 | 138 | 7/25/2023 |
与Net 6 / 8和net462的兼容性