Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disposable objects and README #287

Closed
netotz opened this issue May 7, 2021 · 1 comment · Fixed by #522
Closed

Disposable objects and README #287

netotz opened this issue May 7, 2021 · 1 comment · Fixed by #522

Comments

@netotz
Copy link

netotz commented May 7, 2021

Type of

[ ] Bug
[x] Question (e.g. about handling/usage)
[ ] Request for new feature/improvement

Expected Behavior

I'm using the package as follows:

using var qrGenerator = new QRCodeGenerator();
using var qrData = qrGenerator.CreateQrCode(textToEncode, ECCLevel.H);
using var qrCode = new Base64QRCode(qrData);

return qrCode.GetGraphic(100);

with using for each class given that they implement IDisposable, and also using the var keyword.

Current Behavior

The examples in both the README file and the Wiki section don't use using so I wonder if that's the best use case, and if not then why do the classes implement IDisposable. Also I think the documentation should be updated to use var keywords.

Possible Solution

Update documentation in README and Wiki with using and var. Current code samples could still be there in case somebody is using the package with a very old .NET version that doesn't support them. I'm willing to make a PR for this :)

@codebude
Copy link
Owner

There's no specific reason, why the using statements aren't part of the documentation. The documentation just wasn't updated in this particular aspect. So feel free to send in a PR.

@codebude codebude added idea rework The requests needs to be reworked. labels May 10, 2021
@codebude codebude added documentation and removed idea rework The requests needs to be reworked. labels Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants