Skip to content

API XML Documentation#53

Merged
SkyeHoefling merged 4 commits intomainfrom
feature/documentation-of-api
Jan 6, 2022
Merged

API XML Documentation#53
SkyeHoefling merged 4 commits intomainfrom
feature/documentation-of-api

Conversation

@kenny-sellers
Copy link
Collaborator

Fixes: #22

Description

Adding XML Documentation to the APIs

Merge Checklist

  • Added unit or integration tests (if not explain)
  • Benchmarks are equivalent or faster

@kenny-sellers
Copy link
Collaborator Author

@ahoefling take a look at this and let me know what changes you would like made!

@FileOnQ FileOnQ deleted a comment from github-actions bot Jan 6, 2022
Copy link
Contributor

@SkyeHoefling SkyeHoefling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, I have a few notes that I would like you to review. We don't need to add all of these changes, but take a look and we can go from there.

/// </returns>
/// <exception cref="HeifException">
/// If an error occurs during retrieving the embedded thumbnail, an exception will be
/// thrown which contains an error code explaining the problem.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use <see cref="" /> to link to the error code object

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahoefling I THINK the code I have SHOULD work per MS. BUT I can change it if desired: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/recommended-tags#exception

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh 🤦‍♂️ I wasn't clear I what I wanted. The <exception> tag is correct and looks good to me. I want you to look at changing line 19 to something like this

Suggested change
/// thrown which contains an error code explaining the problem.
/// thrown which contains a <see cref="HeifException.Error" /> explaining the problem.

/// </returns>
/// <exception cref="HeifException">
/// If an error occurs during retrieving the image, an exception will be
/// thrown which contains an error code explaining the problem.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use to link to the error code object

@FileOnQ FileOnQ deleted a comment from github-actions bot Jan 6, 2022
Changing wording to better reflect what the interface represents.
Updating documentation to have a see link
@github-actions
Copy link

github-actions bot commented Jan 6, 2022

Benchmark Comparison

Benchmarking comparison between this Pull Request and the comitted values at benchmarks/results

thumbnail

 
Welcome to .NET 5.0!
---------------------
SDK Version: 5.0.404

Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
No differences found between the benchmark results with threshold 10%.
 

primary

 No differences found between the benchmark results with threshold 10%.
 

Benchmark Results

thumbnail

BenchmarkDotNet=v0.13.0, OS=Windows 10.0.17763.2366 (1809/October2018Update/Redstone5)
Intel Xeon Platinum 8272CL CPU 2.60GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK=5.0.404
 [Host]     : .NET 5.0.13 (5.0.1321.56516), X64 RyuJIT
 Job-PTEBQM : .NET 5.0.13 (5.0.1321.56516), X64 RyuJIT

Runtime=.NET 5.0  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated Allocated native memory Native memory leak
Thumbnail_Write 49.83 ms 0.620 ms 0.550 ms - - - 288 B 5,125,137 B -
Thumbnail_ToArray 49.32 ms 0.650 ms 0.543 ms - - - 66,408 B 5,124,581 B -
Thumbnail_ToSpan 49.51 ms 0.508 ms 0.475 ms - - - 120 B 5,124,325 B -
Thumbnail_ToStream 50.38 ms 0.985 ms 1.349 ms - - - 66,472 B 5,124,581 B -

primary

BenchmarkDotNet=v0.13.0, OS=Windows 10.0.17763.2366 (1809/October2018Update/Redstone5)
Intel Xeon CPU E5-2673 v4 2.30GHz, 1 CPU, 2 logical and 2 physical cores
.NET SDK=5.0.404
 [Host]     : .NET 5.0.13 (5.0.1321.56516), X64 RyuJIT
 Job-MASDTQ : .NET 5.0.13 (5.0.1321.56516), X64 RyuJIT

Runtime=.NET 5.0  InvocationCount=1  LaunchCount=1  
UnrollFactor=1  
Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated Allocated native memory Native memory leak
PrimaryImage_Write 2.877 s 0.0422 s 0.0395 s - - - 304 B 222,029,916 B -
PrimaryImage_ToArray 2.901 s 0.0542 s 0.0507 s - - - 1,943,008 B 222,029,440 B -
PrimaryImage_ToSpan 2.906 s 0.0567 s 0.0583 s - - - 144 B 222,029,312 B -
PrimaryImage_ToStream 2.880 s 0.0536 s 0.0501 s - - - 1,943,072 B 222,029,360 B -

Copy link
Contributor

@SkyeHoefling SkyeHoefling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me, thanks for the contribution

@SkyeHoefling SkyeHoefling merged commit a701321 into main Jan 6, 2022
@SkyeHoefling SkyeHoefling deleted the feature/documentation-of-api branch January 6, 2022 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add XML Docs

2 participants