# SomeAttributeSourceGenerator **Repository Path**: Perkins_Yang/SomeAttributeSourceGenerator ## Basic Information - **Project Name**: SomeAttributeSourceGenerator - **Description**: 基于自定义特性的自动代码生成项目 - **Primary Language**: C# - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-03 - **Last Updated**: 2024-11-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SomeAttributeSourceGenerator #### 介绍 基于自定义特性或基类的源代码生成器项目 #### 软件架构 1. C#源代码生成,使用自定义特性来实现单例,减少重复性代码 #### 安装教程 1. 需要先安装Nuget包 SomeSourceGeneratorHelper,该项目中有需要使用的特性和基类 2. 再安装Nuget包 SomeAttributeSourceGenerator #### 使用说明 1. 在需要使用的类上面使用特性[SingletonBase]或继承基类SingletonBase 2. 在私有构造函数上使用特性[SingletonConstructor]即可生成单例,或使用特性[SingletonConstructorLazy]可实现线程安全的单例 #### 参与贡献 1. 代码仓库地址:https://gitee.com/Perkins_Yang/SomeAttributeSourceGenerator.git