Z.Module 1.0.4

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

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

🎨模块化类库,参照AbpVnext实现,现已正常使用

  • Z.Module1.0.3

    • 添加autofac禁止注入特性
      namespace Z.Module.Modules;
      
      [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)]
      public class DisablePropertyInjectionAttribute : Attribute
      {
      
      }
      
      
    • 添加Module获取所有Assemblies,Helper类ZModuleHelper
      public static Assembly[] GetAllAssemblies(Type moduleType)
      {
          var assemblies = new List<Assembly>();
      
          var additionalAssemblyDescriptors = moduleType
              .GetCustomAttributes()
              .OfType<IAdditionalModuleAssemblyProvider>();
      
          foreach (var descriptor in additionalAssemblyDescriptors)
          {
              foreach (var assembly in descriptor.GetAssemblies())
              {
                  assemblies.AddIfNotContains(assembly);
              }
          }
      
          assemblies.Add(moduleType.Assembly);
      
          return assemblies.ToArray();
      }
      
      
  • Z.Module1.0.2

    • 添加异步管道加载
    var app = builder.Build();
    
    await app.InitApplicationAsync();
    
    app.Run();
    
    
    • 重写OnInitApplicationAsync PostInitApplicationAsync
    public virtual Task OnInitApplicationAsync(InitApplicationContext context)
    {
        return Task.CompletedTask;
    }
    
    public virtual Task PostInitApplicationAsync(InitApplicationContext context)
    {
        return Task.CompletedTask;
    }
    
    • 之前的同步管道加载
    var app = builder.Build();
    
    await app.InitApplication();
    
    app.Run();
    
    
  • abp vnext 模块依赖(已完成)

    • namespace Z.SunBlog.Host;
      
      [DependOn(typeof(SunBlogApplicationModule),
          typeof(SunBlogEntityFrameworkCoreModule))]
      public class SunBlogHostModule : ZModule
      {
          /// <summary>
          /// 服务配置
          /// </summary>
          /// <param name="context"></param>
          public override void ConfigureServices(ServiceConfigerContext context)
          {
              configuration = context.GetConfiguration();
              //....
          }
      
          /// <summary>
          /// 初始化应用
          /// </summary>
          /// <param name="context"></param>
          public override void OnInitApplication(InitApplicationContext context)
          {
              var app = context.GetApplicationBuilder();
          }
      }
      
      
      
  • 自动注册(已完成)

    • ITransientDependency(瞬时)

      • public class JwtTokenProvider : IJwtTokenProvider , ITransientDependency
        {
        
        public interface IJwtTokenProvider
        {
        }
        
        
    • ISingletonDependency(单例)

      • public class JwtTokenProvider : IJwtTokenProvider , ISingletonDependency
        {
        
        public interface IJwtTokenProvider
        {
        }
        
        
    • IScopedDependency(作用域)

      • public class JwtTokenProvider : IJwtTokenProvider , IScopedDependency
        {
        
        public interface IJwtTokenProvider
        {
        }
        
Product Compatible and additional computed target framework versions.
.NET 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 (2)

Showing the top 2 NuGet packages that depend on Z.Module:

Package Downloads
Z.Foundation.Core

Package Description

Z.DynamicProxy

动态API

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.4 371 12/27/2023
1.0.3 129 12/11/2023
1.0.2 138 12/7/2023
1.0.1 149 12/5/2023
1.0.0 160 12/5/2023