generate all xml docs and pack them #148

after we split the solution into multiple projects the xml doc comments were no longer packed in the generated nuget package. in addition they were only generated for the net standard 2.0 target framework.

this change generates comments for all target frameworks and makes sure they're included in the generated package. it also adds missing doc comments where they weren't included on the public api and clears up a couple of minor formatting issues in the affected files.
This commit is contained in:
Eliot Jones 2020-03-08 13:44:09 +00:00
parent 24c5cbea4b
commit 8df2f9cf6b
10 changed files with 21 additions and 14 deletions

View File

@ -5,12 +5,12 @@
<LangVersion>latest</LangVersion>
<Version>0.1.0</Version>
<IsTestProject>False</IsTestProject>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<DocumentationFile>obj\Debug\netstandard2.0\UglyToad.PdfPig.Core.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net45' OR '$(TargetFramework)'=='net451' OR '$(TargetFramework)'=='net452' OR '$(TargetFramework)'=='net46' OR '$(TargetFramework)'=='net461' OR '$(TargetFramework)'=='net462' OR '$(TargetFramework)'=='net47'">

View File

@ -5,12 +5,12 @@
<LangVersion>latest</LangVersion>
<Version>0.1.0</Version>
<IsTestProject>False</IsTestProject>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<DocumentationFile>obj\Debug\netstandard2.0\UglyToad.PdfPig.DocumentLayoutAnalysis.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net45' OR '$(TargetFramework)'=='net451' OR '$(TargetFramework)'=='net452' OR '$(TargetFramework)'=='net46' OR '$(TargetFramework)'=='net461' OR '$(TargetFramework)'=='net462' OR '$(TargetFramework)'=='net47'">

View File

@ -5,10 +5,10 @@
<LangVersion>latest</LangVersion>
<Version>0.1.0</Version>
<IsTestProject>False</IsTestProject>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
<DocumentationFile>obj\Debug\netstandard2.0\UglyToad.PdfPig.Fonts.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
</PropertyGroup>

View File

@ -5,12 +5,12 @@
<LangVersion>latest</LangVersion>
<Version>0.1.0</Version>
<IsTestProject>False</IsTestProject>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<DocumentationFile>obj\Debug\netstandard2.0\UglyToad.PdfPig.Core.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net45' OR '$(TargetFramework)'=='net451' OR '$(TargetFramework)'=='net452' OR '$(TargetFramework)'=='net46' OR '$(TargetFramework)'=='net461' OR '$(TargetFramework)'=='net462' OR '$(TargetFramework)'=='net47'">

View File

@ -5,12 +5,12 @@
<LangVersion>latest</LangVersion>
<Version>0.1.0</Version>
<IsTestProject>False</IsTestProject>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<DocumentationFile>obj\Debug\netstandard2.0\UglyToad.PdfPig.Tokens.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net45' OR '$(TargetFramework)'=='net451' OR '$(TargetFramework)'=='net452' OR '$(TargetFramework)'=='net46' OR '$(TargetFramework)'=='net461' OR '$(TargetFramework)'=='net462' OR '$(TargetFramework)'=='net47'">

View File

@ -77,6 +77,9 @@
/// </summary>
public string ExpandedForm { get; }
/// <summary>
/// Create a new <see cref="MarkedContentElement"/>.
/// </summary>
public MarkedContentElement(int markedContentIdentifier, NameToken tag, DictionaryToken properties,
string language,
string actualText,

View File

@ -587,6 +587,10 @@
return tx >= 0 && (tx - 1) <= epsilon;
}
/// <summary>
/// Whether the line formed by <paramref name="p11"/> and <paramref name="p12"/>
/// intersects the line formed by <paramref name="p21"/> and <paramref name="p22"/>.
/// </summary>
public static bool IntersectsWith(PdfPoint p11, PdfPoint p12, PdfPoint p21, PdfPoint p22)
{
return (ccw(p11, p12, p21) != ccw(p11, p12, p22)) &&
@ -780,8 +784,8 @@
}
#endregion
private static readonly double oneThird = 0.333333333333333333333;
private static readonly double sqrtOfThree = 1.73205080756888;
private const double OneThird = 0.333333333333333333333;
private const double SqrtOfThree = 1.73205080756888;
private static (double Slope, double Intercept) GetSlopeIntercept(PdfPoint point1, PdfPoint point2)
{
@ -800,8 +804,8 @@
private static double CubicRoot(double d)
{
if (d < 0.0) return -Math.Pow(-d, oneThird);
return Math.Pow(d, oneThird);
if (d < 0.0) return -Math.Pow(-d, OneThird);
return Math.Pow(d, OneThird);
}
/// <summary>
@ -854,7 +858,7 @@
x1 = SPlusT - bOver3a; // real root
// Complex roots
double complexPart = sqrtOfThree / 2.0 * (S - T); // complex part of complex root
double complexPart = SqrtOfThree / 2.0 * (S - T); // complex part of complex root
if (Math.Abs(complexPart) <= epsilon) // if complex part == 0
{
// complex roots only have real part
@ -866,7 +870,7 @@
{
// François Viète's formula
Func<double, double, double, double> vietTrigonometricSolution = (p_, q_, k) => 2.0 * Math.Sqrt(-p_ / 3.0)
* Math.Cos(oneThird * Math.Acos((3.0 * q_) / (2.0 * p_) * Math.Sqrt(-3.0 / p_)) - (2.0 * Math.PI * k) / 3.0);
* Math.Cos(OneThird * Math.Acos((3.0 * q_) / (2.0 * p_) * Math.Sqrt(-3.0 / p_)) - (2.0 * Math.PI * k) / 3.0);
double p = Q * 3.0; // (3.0 * a * c - b * b) / (3.0 * aSquared);
double q = -R * 2.0; // (2.0 * bCubed - 9.0 * abc + 27.0 * aSquared * d) / (27.0 * aCubed);

View File

@ -5,6 +5,7 @@
<LangVersion>latest</LangVersion>
<Version>0.1.0</Version>
<IsTestProject>False</IsTestProject>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">

View File

@ -30,8 +30,7 @@
new PngPredictor(), Log);
/// <summary>
/// Merge two PDF documents together with the pages from <see cref="file1"/>
/// followed by <see cref="file2"/>.
/// Merge two PDF documents together with the pages from <paramref name="file1"/> followed by <paramref name="file2"/>.
/// </summary>
public static byte[] Merge(string file1, string file2)
{

View File

@ -21,7 +21,7 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<LangVersion>latest</LangVersion>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb;.xml</AllowedOutputExtensionsInPackageBuildOutputFolder>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
</PropertyGroup>