-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First build after port from private repo.
- Loading branch information
Showing
14 changed files
with
3,990 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.pdf -text | ||
*.doc -text | ||
*.docx -text | ||
*.sh eol=lf | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Visual Studio | ||
src/**/bin/ | ||
src/**/obj/ | ||
src/packages/ | ||
*/.vs/ | ||
*.csproj.user | ||
|
||
# ReSharper | ||
*.DotSettings.user | ||
_ReSharper.*/ | ||
|
||
# Windows thumbnails | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
# cecil-xmldocnames | ||
From Mono.Cecil member references to names suitable for XML documentation and ReSharper external annotations. | ||
# Cecil.XmlDocNames | ||
Cecil.XmlDocNames is a small .NET Standard 2.0 library that generates XmlDoc-style names | ||
for Mono.Cecil member references. It has no dependencies apart from the .NET Standard library and Mono.Cecil. | ||
|
||
XmlDoc names are also used by [ReSharper](https://www.jetbrains.com/resharper/) in its | ||
[external annotations](https://www.jetbrains.com/help/resharper/Code_Analysis__External_Annotations.html) | ||
files, which is why I wrote this library in the first place. | ||
|
||
--- | ||
|
||
*Disclaimer:* The author of this library is in no way affiliated to [JetBrains s.r.o.](https://www.jetbrains.com/) | ||
(the makers of ReSharper) other than being a satisfied cutomer. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 15 | ||
VisualStudioVersion = 15.0.27130.2036 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cecil.XmlDocNames", "Cecil.XmlDocNames\Cecil.XmlDocNames.csproj", "{62CB2CBD-955F-4020-8CCE-4804D8BCBE30}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution items", "Solution items", "{8790FE96-7716-4B83-AEC2-6EBEDFC4419D}" | ||
ProjectSection(SolutionItems) = preProject | ||
..\LICENSE = ..\LICENSE | ||
..\README.md = ..\README.md | ||
EndProjectSection | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{62CB2CBD-955F-4020-8CCE-4804D8BCBE30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{62CB2CBD-955F-4020-8CCE-4804D8BCBE30}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{62CB2CBD-955F-4020-8CCE-4804D8BCBE30}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{62CB2CBD-955F-4020-8CCE-4804D8BCBE30}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {79026CCC-2B02-4EDF-90C7-E25646EF436E} | ||
EndGlobalSection | ||
EndGlobal |
Large diffs are not rendered by default.
Oops, something went wrong.
99 changes: 99 additions & 0 deletions
99
src/Cecil.XmlDocNames/Cecil.XmlDocNames.ExternalAnnotations.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<assembly name="Cecil.XmlDocNames"> | ||
<member name="M:Cecil.XmlDocNames.MemberReferenceExtensions.GetXmlDocName(Mono.Cecil.MemberReference)"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
<parameter name="this"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
</member> | ||
<member name="M:Cecil.XmlDocNames.StringBuilderExtensions.StripGenericArity(System.Text.StringBuilder)"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
<parameter name="sb"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
</member> | ||
<member name="M:Cecil.XmlDocNames.StringBuilderExtensions.AppendMemberName(System.Text.StringBuilder,Mono.Cecil.MemberReference)"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
<parameter name="sb"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
<parameter name="member"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
</member> | ||
<member name="M:Cecil.XmlDocNames.StringBuilderExtensions.AppendArrayDimension(System.Text.StringBuilder,Mono.Cecil.ArrayDimension)"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
<parameter name="sb"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
</member> | ||
<member name="M:Cecil.XmlDocNames.StringBuilderExtensions.AppendMethodSignature(System.Text.StringBuilder,Mono.Cecil.IMethodSignature)"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
<parameter name="sb"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
<parameter name="signature"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
</member> | ||
<member name="M:Cecil.XmlDocNames.StringBuilderExtensions.AppendDocNameCore(System.Text.StringBuilder,Mono.Cecil.TypeReference)"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
<parameter name="sb"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
<parameter name="type"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
</member> | ||
<member name="M:Cecil.XmlDocNames.StringBuilderExtensions.AppendDocNameCore(System.Text.StringBuilder,Mono.Cecil.MethodReference)"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
<parameter name="sb"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
<parameter name="method"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
</member> | ||
<member name="M:Cecil.XmlDocNames.StringBuilderExtensions.AppendDocNameCore(System.Text.StringBuilder,Mono.Cecil.PropertyReference)"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
<parameter name="sb"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
<parameter name="property"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
</member> | ||
<member name="M:Cecil.XmlDocNames.StringBuilderExtensions.AppendDocNameCore(System.Text.StringBuilder,Mono.Cecil.MemberReference)"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
<parameter name="sb"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
<parameter name="field"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
</member> | ||
<member name="M:Cecil.XmlDocNames.StringBuilderExtensions.AppendXmlDocName(System.Text.StringBuilder,Mono.Cecil.MemberReference)"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
<parameter name="this"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
<parameter name="member"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
</member> | ||
<member name="M:Cecil.XmlDocNames.StringBuilderExtensions.InvokeForEach``1(System.Text.StringBuilder,System.Collections.Generic.IEnumerable{``0},System.String,System.Func{System.Text.StringBuilder,``0,System.Text.StringBuilder})"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
<parameter name="sb"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
<parameter name="items"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
<parameter name="separator"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
<parameter name="func"> | ||
<attribute ctor="M:JetBrains.Annotations.NotNullAttribute.#ctor" /> | ||
</parameter> | ||
</member> | ||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<!-- Project / package metadata --> | ||
<PropertyGroup> | ||
<Product>Cecil.XmlDocNames</Product> | ||
<Version>1.0.0</Version> | ||
<Description>Generates XmlDoc-style names for Mono.Cecil member refeences.</Description> | ||
<Authors>rdeago</Authors> | ||
<Owners>rdeago</Owners> | ||
<Copyright>Copyright (c) 2018-2019 Riccardo De Agostini</Copyright> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<PackageTags>cecil;xmldoc</PackageTags> | ||
<PackageProjectUrl>https://github.com/rdeago/cecil-xmldocnames</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/rdeago/cecil-xmldocnames.git</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
</PropertyGroup> | ||
|
||
<!-- Build options --> | ||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.0</TargetFrameworks> | ||
<Deterministic>true</Deterministic> | ||
<LangVersion>7.3</LangVersion> | ||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile> | ||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild> | ||
</PropertyGroup> | ||
|
||
<!-- Symbols and SourceLink --> | ||
<PropertyGroup> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
<IncludeSymbols>true</IncludeSymbols> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19324-01"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<!-- Put .ExternalAnnotations.xml in package, alongside the compiled assembly --> | ||
<ItemGroup> | ||
<None Include="$(AssemblyName).ExternalAnnotations.xml" Pack="true" PackagePath="lib\netstandard2.0\$(AssemblyName).ExternalAnnotations.xml" /> | ||
</ItemGroup> | ||
|
||
<!-- Use JetBrains.Annotations as development dependency only. | ||
Don't include annotations in compiled assembly in Release. | ||
--> | ||
<ItemGroup Condition="'$(Configuration)' == 'Debug'"> | ||
<PackageReference Include="JetBrains.Annotations" Version="2019.1.1" /> | ||
</ItemGroup> | ||
<ItemGroup Condition="'$(Configuration)' != 'Debug'"> | ||
<PackageReference Include="JetBrains.Annotations" Version="2019.1.1" PrivateAssets="All" /> | ||
</ItemGroup> | ||
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> | ||
<DefineConstants Condition="'$(DefineConstants)' != ''">$(DefineConstants);</DefineConstants> | ||
<DefineConstants>$(DefineConstants)JETBRAINS_ANNOTATIONS</DefineConstants> | ||
</PropertyGroup> | ||
|
||
<!-- Dependencies --> | ||
<ItemGroup> | ||
<PackageReference Include="Mono.Cecil" Version="0.10.4" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using System; | ||
using System.Text; | ||
using JetBrains.Annotations; | ||
using Mono.Cecil; | ||
|
||
namespace Cecil.XmlDocNames | ||
{ | ||
/// <summary> | ||
/// Provides extension methods for <see cref="MemberReference">MemberReference</see>. | ||
/// </summary> | ||
public static class MemberReferenceExtensions | ||
{ | ||
#region Public API | ||
|
||
/// <summary> | ||
/// Gets the name of a <see cref="MemberReference">MemberReference</see> in the same format used by XML documentation. | ||
/// </summary> | ||
/// <param name="this">The <see cref="MemberReference">MemberReference</see> instance on which this method is called.</param> | ||
/// <returns>A <see cref="string">string</see> containing the member's name in the same format used by XML documentation.</returns> | ||
/// <exception cref="InvalidOperationException"> | ||
/// <para><paramref name="this"/> is not an instance of one of the following classes:</para> | ||
/// <list type="bullet"> | ||
/// <item> | ||
/// <term><see cref="TypeReference"/></term> | ||
/// <description>A type reference or definition.</description> | ||
/// </item> | ||
/// <item> | ||
/// <term><see cref="MethodReference"/></term> | ||
/// <description>A method reference or definition.</description> | ||
/// </item> | ||
/// <item> | ||
/// <term><see cref="PropertyReference"/></term> | ||
/// <description>A property reference or definition.</description> | ||
/// </item> | ||
/// <item> | ||
/// <term><see cref="FieldReference"/></term> | ||
/// <description>A field reference or definition.</description> | ||
/// </item> | ||
/// <item> | ||
/// <term><see cref="EventReference"/></term> | ||
/// <description>An event reference or definition.</description> | ||
/// </item> | ||
/// </list> | ||
/// </exception> | ||
/// <remarks> | ||
/// <para><paramref name="this"/> MUST NOT be <c>null</c>.</para> | ||
/// </remarks> | ||
[PublicAPI, NotNull] | ||
public static string GetXmlDocName([NotNull] this MemberReference @this) | ||
=> new StringBuilder().AppendXmlDocName(@this).ToString(); | ||
|
||
#endregion | ||
} | ||
} |
Oops, something went wrong.