Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

What is `LSPDFRResolveEventHandler()` used for?

Featured Replies

Hello,

For callout packs, I use a code template with the following code in the Main.cs file: (excerpt - See entire file)

# Main.cs
public override void Initialize()
{
	...
	AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(LSPDFRResolveEventHandler);
}
...
public static Assembly LSPDFRResolveEventHandler(object sender, ResolveEventArgs args)
{
    foreach (Assembly assembly in Functions.GetAllUserPlugins())
    {
        if (args.Name.ToLower().Contains(assembly.GetName().Name.ToLower()))
        {
            return assembly;
        }
    }
	return null;
}

Someone (@Yasd) pointed out something to me about this code and its purpose on one of my callout pack, but I have no idea what LSPDFRResolveEventHandler is actually used for.

Could someone explain to me what this does technically, and in what situations it's needed?

Thank you :)
I hope this fits this forum.

Edited by SSStuart

SSStuart

  • Author
1 hour ago, GTAbear said:

In cases like this, we are now blessed, because AI is amazing when it comes to code content, function and definitions.

I'd prefer a human response, especially regarding RPH/LSPDFR code

SSStuart

  • Community Team

Depends on your use case, this event returns all of the "plugins" (assemblies) lspdfr loads. This specific method just returns your own assembly from that list. In most cases you do not need this. Even in my plugins I get by just using Functions.GetAllUserPlugins()

Edited by SuperPyroManiac

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.