Hello, I need to extend the sealed class Globals. My former colleagues have modified the class directly, but honestly I do not consider the best way... I need to add properties and the practice would be for me to create an Adapter class. Then I have to add some methods and redefine others and in this case I have to write an Extension class. The question is: what is the best way to achieve the 2 things possibly using only one class?
Thanks S.
Actually, I need to do this with other classes. Sealed and not.
Thanks
Hi! DotNetNuke.Common.Globals DotNetNuke.Framework.JavaScriptLibraries.JavaScript ...and potentially others that I haven't discovered yet
Posted By Seek on 1/31/2023 12:14 AM Hi! DotNetNuke.Common.Globals DotNetNuke.Framework.JavaScriptLibraries.JavaScript ...and potentially others that I haven't discovered yet Thanks S.
Are you trying to actually change the code you've listed, or are you trying to execute your own code at specific points in time? If it's the latter, what are the specific moments when you need your code to run?
I try to be more specific. As I wrote, I found many changes in the source code of DNN, wich add properties and methods. Now I'm migrating DNN modules from version 7.4 to version 9.11 and would like to avoid such practices. What I want to know is if there is an alternative method to directly modifying the DNN code.
S.
Ah.... Too many forum posts I've been looking at.
The answer is, it depends... Nearly everything can have a different method of implementation. Each chunk of code may need to be looked at slightly differently. With DNN, you have tons of ways to get code to run, via theme objects, theme layouts, modules, scheduled jobs, event triggers, providers of various kinds, libraries, etc. You may find yourself splitting some of the code up, while keeping other bits together.
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.