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. 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.
    1. COI'm not sure how MEF would work here. We don't have control over the application, only a piece of code someone can use in their own code, all of which is used in the application (this is a game engine if it matters)... Distribution in this case has no real installation. To simplify, you would just get some files to add to a project just as if you had written the code. If the file is there, the type is there. We do declare licensing but it is rather simple in nature. You can use it if you don't redistribute, etc. We don't even worry about the dishonorable few in the community.
      singulars
    2. CO@Rafe: You said "files" in your OP, which I took to mean assemblies. Nearly all non-open-source .Net projects are distributed as assemblies, so you definitely have a special case here. That's fine and well, but that's why I didn't say more than just "use MEF" :) If you are distributing the *plugins* as assemblies (the accepted answer will only work if you are), then you could use MEF. You'd distribute an assembly that contains just the plugin interfaces, use those interfaces to make extension points in your source files, and implement those interfaces with your plugins.
      singulars
    3. CO@Rafe: It is up to you if MEF provides enough benefit to warrant using it. You're going to have to define a contract between the plugin and the code anyhow, and it will be easier to write code against an interface than it will against `object`. This will also give good perf (just virtual function calls once the type has been loaded). Other solutions involve you either calling with extended use of reflections (every call, property access, etc), using `dynamic` to do the same, or possibly compiling dynamic methods (see: https://github.com/ninject/ninject/wiki/How-Injection-Works)
      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