SomeAttributeSourceGenerator 1.0.5
dotnet add package SomeAttributeSourceGenerator --version 1.0.5
NuGet\Install-Package SomeAttributeSourceGenerator -Version 1.0.5
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="SomeAttributeSourceGenerator" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SomeAttributeSourceGenerator" Version="1.0.5" />
<PackageReference Include="SomeAttributeSourceGenerator" />
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 SomeAttributeSourceGenerator --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SomeAttributeSourceGenerator, 1.0.5"
#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.
#:package SomeAttributeSourceGenerator@1.0.5
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SomeAttributeSourceGenerator&version=1.0.5
#tool nuget:?package=SomeAttributeSourceGenerator&version=1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SomeAttributeSourceGenerator
介绍
基于自定义特性或基类的源代码生成器项目
软件架构
- C#源代码生成,使用自定义特性来实现单例,减少重复性代码
安装教程
- 需要先安装Nuget包 SomeSourceGeneratorHelper,该项目中有需要使用的特性和基类
- 再安装Nuget包 SomeAttributeSourceGenerator
使用说明
- 在需要使用的类上面使用特性[SingletonBase]或继承基类SingletonBase
- 在私有构造函数上使用特性[SingletonConstructor]即可生成单例,或使用特性[SingletonConstructorLazy]可实现线程安全的单例
参与贡献
- 代码仓库地址:https://gitee.com/Perkins_Yang/SomeAttributeSourceGenerator.git
There are no supported framework assets in this package.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- SomeSourceGeneratorHelper (>= 1.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
降低依赖库版本