question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extract `GetLocalResourceFile` from `ModuleControlPipeline`

See original GitHub issue

PR #2774 rearranged the code which creates modules, and highlighted to me that the logic to generate the LocalResourceFile value for a module differs based on the type of module.

Original code: https://github.com/dnnsoftware/Dnn.Platform/blob/2a4c9f1cd06d8209668be4e3271bfaa7b01d462b/DNN Platform/Library/UI/Modules/ModuleControlFactory.cs#L179-L202

Updated code: https://github.com/dnnsoftware/Dnn.Platform/blob/1414a469f077274f713ae9162f336019084d5c72/DNN Platform/DotNetNuke.ModulePipeline/ModuleControlPipeline.cs#L168-L191

I’m proposing that this logic be moved into the IModuleControlFactory interface, so that the ModuleControlPipeline doesn’t need to have as much specific knowledge of different module patterns. It would be nice to create an abstract base class to move that common logic into, which can be overridden by the MvcModuleControlFactory, but there may not be a reasonable place for that base class to exist that can be referenced by all of the implementations. Also, adding a member to an existing interface is a breaking change, so it may not be worth it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
SkyeHoeflingcommented, May 14, 2019

@bdukes Can you take a look at this commit https://github.com/ahoefling/Dnn.Platform/commit/d07bbc96dfa11a33178f3e8db7638289d06a980b

I am thinking of submitting the PR for this when the other one is merged. Everything appears to work, but would love to get some feedback before submitting the PR

0reactions
bdukescommented, May 14, 2019

My opinion would be that extending the module pipeline isn’t an important feature to prioritize anytime soon. Maybe something to consider as we move to .NET Core

Read more comments on GitHub >

github_iconTop Results From Across the Web

Extracting Local Resource Image from Winforms Form ...
Double click Form1.resx to open the Resource designer. Right click on the image you'd like to extract. Choose "Export To File...".
Read more >
Get-Module (Microsoft.PowerShell.Core)
The Get-Module cmdlet lists the PowerShell modules that have been imported, ... can get and then, import modules from remote sessions into the...
Read more >
Define YAML resources for Azure Pipelines
Learn how to define YAML resources that can be consumed anywhere in your pipelines.
Read more >
Extending with Shared Libraries
The Groovy source files in these directories get the same “CPS transformation” as in Scripted Pipeline. A resources directory allows the libraryResource ...
Read more >
How to create reusable infrastructure with Terraform modules
Open up the main.tf file in modules/services/webserver-cluster, ... use this module more than once in the same AWS account, you'll get name conflict...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found