Feast.JsonComment 0.1.0

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

// Install Feast.JsonComment as a Cake Tool
#tool nuget:?package=Feast.JsonComment&version=0.1.0

JsonComment

能够通过注解自动生成文档注释的基于 .NET Standard 2.0 的代码分析器

🚧 🚧 施工中注意——仍有bug 🚧 🚧

Effect:

alternate text is missing from this package README image

Start

  • 引用程序集之后添加为

    OutputItemType="Analyzer"
    
    <ItemGroup>
        <ProjectReference Include="path\to\Feast.JsonComment.csproj" OutputItemType="Analyzer" />
    </ItemGroup>
    

    由于需要引用包中的内容,请忽略 ReferenceOutputAssembly 项或将其置为 true

    ReferenceOutputAssembly="true"
    
  • 在你需要生成注释的类型上添加 JsonComment

    using Feast.JsonComment;
    
    [JsonComment]
    public partial class MyModel{
        public int Id { get; init; } 
        public string Name { get; set; } 
    } 
    
    • ⚠️ 类型需要携带 partial 关键字
    • ⚠️ 类型的其他注释将会覆盖该注释
    • 👌 本程序集不会对任何类型进行增改
  • 在你的程序中调用 JsonComment.Generate()

    internal class Program
    {
        static void Main(string[] args)
        {
            JsonComment.Generate();
        }
    }
    

    文档将会生成在类型声明文件所在的目录下,目录下批量的源文件会整合到一个文档文件中

Preview

  • ❕ 泛型<>
  • 🚧 初始值项的设定
  • 🚧 如果尽可能的避免生成外部文档,但这会要求在分析时生成JSON数据,以及继承关系分析上的困难
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.0 163 3/26/2023