CoreFlex.Module 0.1.4

dotnet add package CoreFlex.Module --version 0.1.4                
NuGet\Install-Package CoreFlex.Module -Version 0.1.4                
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="CoreFlex.Module" Version="0.1.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CoreFlex.Module --version 0.1.4                
#r "nuget: CoreFlex.Module, 0.1.4"                
#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.
// Install CoreFlex.Module as a Cake Addin
#addin nuget:?package=CoreFlex.Module&version=0.1.4

// Install CoreFlex.Module as a Cake Tool
#tool nuget:?package=CoreFlex.Module&version=0.1.4                

Core Flex模块

Core Flex的核心设计,Core Flex其他模块都是基于Core Flex的核心设计来实现的。 Core Flex模块提供了一些基础的功能,包括: - 模块化 - 自动依赖注入

简单使用

  1. 安装NuGet
<PackageReference Include="CoreFlex.Module" Version="模块版本" />
  1. 添加对应模块方法,比如项目名CoreFlex.Razor.JsInterop,那么模块名称则是CoreFlexRazorJsInteropModule,这样的好处就是可以通过模块名称来查找对应的模块,而不是通过文件夹名称来查找模块,这样可以避免文件夹名称和模块名称不一致的问题。
public class CoreFlexRazorJsInteropModule : CoreFlexModule
{
    public override void ConfigureServices(CoreFlexServiceContext services)
    {
    }

    public override void OnApplicationShutdown(CoreFlexBuilder app)
    {
    }
}

创建的模块必须继承CoreFlexModule,然后实现ConfigureServicesOnApplicationShutdown方法,这两个方法是模块的生命周期方法,ConfigureServices方法在模块加载时调用,OnApplicationShutdown方法在模块构建完成调用。 模块中也提供了Async结束的异步回调,以便于在模块加载完成后,可以执行一些异步操作,比如加载一些配置文件等。 当然,如果你的模块需要使用其他的模块,你可以在模块类的上面添加特性[DependsOn(typeof(CoreFlexRazorModule))],CoreFlexRazorModule则是你要依赖的模块,当然它也支持多个模块的依赖; 这样在加载模块时,会先加载CoreFlexRazorModule模块, 但是如果没有设置特定模块执行顺序,依赖模块将在当前模块的后面执行。

[DependsOn(typeof(CoreFlexRazorModule))]
public class CoreFlexRazorJsInteropModule : CoreFlexModule
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on CoreFlex.Module:

Package Downloads
CoreFlex.Razor.JsInterop

Package Description

CoreFlex.Event

Package Description

CoreFlex.Jwt

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.4 282 12/20/2023
0.1.3 196 12/17/2023
0.1.2 217 12/10/2023
0.1.1 188 12/10/2023
0.1.0 211 12/8/2023