Skip to content

Commit 3abae3f

Browse files
committed
WebApi v1.1.2 优化文档提取正则表达式
1 parent 27b13f5 commit 3abae3f

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

src/Senparc.CO2NET.WebApi/Senparc.CO2NET.WebApi.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<TargetFrameworks>netstandard2.1;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
4-
<Version>1.1.1</Version>
4+
<Version>1.1.2</Version>
55
<LangVersion>latest</LangVersion>
66
<AssemblyName>Senparc.CO2NET.WebApi</AssemblyName>
77
<RootNamespace>Senparc.CO2NET.WebApi</RootNamespace>
@@ -31,6 +31,7 @@
3131
v0.2.6 添加 WebApiEngineOptions
3232
v0.2.8 提供 .NET Standard 2.1 版本
3333
v1.1 提供参数属性同步复制到动态 Api 的能力
34+
v1.1.2 优化文档提取正则表达式
3435
</PackageReleaseNotes>
3536
</PropertyGroup>
3637
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

src/Senparc.CO2NET.WebApi/WebApiEngines/WebApiEngine.Doc.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
using Senparc.CO2NET.Cache;
1+
/*----------------------------------------------------------------
2+
Copyright (C) 2021 Senparc
3+
4+
文件名:WebApiEngine.Doc.cs
5+
文件功能描述:WebApi 自动生成引擎 - 文档相关
6+
7+
8+
创建标识:Senparc - 20210627
9+
10+
修改标识:Senparc - 20211122
11+
修改描述:v1.1.2 优化文档提取正则表达式
12+
13+
----------------------------------------------------------------*/
14+
15+
using Senparc.CO2NET.Cache;
216
using System;
317
using System.Collections.Concurrent;
418
using System.Collections.Generic;
@@ -43,7 +57,7 @@ internal void TryCreateDir(string appDataPath)
4357
/// <summary>
4458
/// 从 xml 中获取方法名和参数的正则
4559
/// </summary>
46-
private static Regex regexForDoc = new Regex(@"(M\:)(?<docName>[^(]+)(?<paramsPart>\({1}.+\){1})", RegexOptions.Compiled);
60+
private static Regex regexForDoc = new Regex(@"(M\:)(?<docName>[^(""]+)(?<paramsPart>\({1}.+\){1})", RegexOptions.Compiled);
4761

4862
/// <summary>
4963
/// 获取 DocName

0 commit comments

Comments
 (0)