DYH.Extensions.CAD 1.4.3

dotnet add package DYH.Extensions.CAD --version 1.4.3
                    
NuGet\Install-Package DYH.Extensions.CAD -Version 1.4.3
                    
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="DYH.Extensions.CAD" Version="1.4.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DYH.Extensions.CAD" Version="1.4.3" />
                    
Directory.Packages.props
<PackageReference Include="DYH.Extensions.CAD" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DYH.Extensions.CAD --version 1.4.3
                    
#r "nuget: DYH.Extensions.CAD, 1.4.3"
                    
#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.
#addin nuget:?package=DYH.Extensions.CAD&version=1.4.3
                    
Install DYH.Extensions.CAD as a Cake Addin
#tool nuget:?package=DYH.Extensions.CAD&version=1.4.3
                    
Install DYH.Extensions.CAD as a Cake Tool

DYH.CAD.Extensions

介绍

自用的库,省得每次给别人写东西时要复制来复制去

软件架构

依赖注入加补充工具类

使用说明
  1. 引用
  2. 在初始化时执行
DYH.CAD.Extensions.Initialize.Setup(cfg =>
{
    cfg.Assemblies = [Assembly.GetExecutingAssembly()];
    cfg.SettingsDir =
        Path.Combine(
            Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
            "DYHTest", "Settings");
});

其中SettingsDir是设置文件的目录,Assembies是需要扫描的程序集

  1. 服务注入 在服务上添加特性即可 [TransientDI][SingletonDI][ScopedDI] 服务有接口的,在后面添加接口类型参数,例如: [SingletonDI(typeof(IInterfaceType))]

  2. 用户设置 自己的用户设置类,在上面添加单例依赖注入[SingletonDI],并继承IUserSetting空接口 例如: [SingletonDI] public class DrawLineSettings : IUserSetting { ... } 使用IUserSettingService.Reload和Save函数即可读取和保存,并自动在多个CAD之间进行同步

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on DYH.Extensions.CAD:

Package Downloads
DYH.Extensions.CAD.Wpf

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.3 27 4/16/2025
1.4.2 122 4/10/2025
1.4.0 117 4/8/2025
1.3.0 125 4/8/2025
1.2.0 124 4/8/2025
1.1.9-preview 119 4/8/2025
1.1.8-preview 115 4/8/2025
1.1.7-preview 114 4/8/2025

修复用户设置服务的bug