Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. COThis looks very promising. I found I can get the current assembly using GetExecutingAssembly (untested, there are other options). The problem is, even if I get the type as a variable, intellesnse can't recognize members because the type is System.Type and i can't declare the type because I have to check it first...chicken of the egg. I think the only way forward would be to also use reflection to call the method I need but this is a performance sensitive area. I'll test with singleton and see how it goes, then come and edit this.
      singulars
    2. CO@Rafe, I think I'm a little confused right? You're calling a type you expect to be there if they've loaded a specific assembly from plug in right? If the assembly reference isn't null and the type isn't null you can assume they've loaded that assembly and can create an instance through Activator that does what you need... I've edit'ed my answer to show the activator call...
      singulars
    3. COI marked this as the answer because it is the best that can be supplied without becoming situational. Unfortunately I won't be going down this road to supply my own solution because the effort cost to create this is not worth the benefit. For us this would be nice to have but is not critical. It should however be made clear the the simple "Do something" should be replaced by "lots more reflection work goes here". Even if going one level deep to a static method is another step. Going deeper in to instances is quite a bit more code depending on what you need.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload