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

Refactor plugin instance access #20

Merged
merged 1 commit into from
Jun 24, 2022
Merged

Conversation

Kevinjil
Copy link
Owner

No description provided.

This removes the nullable check from all references and cleans up code.
@@ -32,6 +32,8 @@
/// </summary>
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
{
private static Plugin? instance;

Check notice

Code scanning / CodeQL

Missed 'readonly' opportunity

Field 'instance' can be 'readonly'.
@@ -44,7 +46,7 @@
: base(applicationPaths, xmlSerializer)
{
_logger = logger;
Instance = this;
instance = this;

Check notice

Code scanning / CodeQL

Static field written by instance method

Write to static field from instance method or constructor.
@Kevinjil Kevinjil merged commit dc44e1a into master Jun 24, 2022
@Kevinjil Kevinjil deleted the refactor/plugin-instance branch June 24, 2022 21:32
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.

1 participant