IceReaper
IceReaper
CC#
Created by IceReaper on 12/21/2023 in #help
Safe Plugin Loader - Forbid specific namespaces (and reflection usage)?
I managed to build a solution in a single c# class which uses roslyn now. So mods have to ship the code sources. I scan the source code, check used types and functionality, verify it against a whitelist, compile the assembly in memory, and load it dynamically. works 🙂 thanks for the hint about using roslyn
33 replies
CC#
Created by IceReaper on 12/21/2023 in #help
Safe Plugin Loader - Forbid specific namespaces (and reflection usage)?
Ill just ensure the mod uses only allowed system namespaces, as for lists, dictionaries etc along the game api dll and no reflections
33 replies
CC#
Created by IceReaper on 12/21/2023 in #help
Safe Plugin Loader - Forbid specific namespaces (and reflection usage)?
Im building a framework for some games, not a specific game. so where the mods are located would be configurable by the one using the framework
33 replies
CC#
Created by IceReaper on 12/21/2023 in #help
Safe Plugin Loader - Forbid specific namespaces (and reflection usage)?
Oh, thats great to know 🙂 That defenitely sounds better then manualy parsing or using a decompiler
33 replies
CC#
Created by IceReaper on 12/21/2023 in #help
Safe Plugin Loader - Forbid specific namespaces (and reflection usage)?
Hm.. thats also an interesting approach, but i guess shipping the whole toolchain to build project requires users - in this case gamers, as the plugins are for enhancing the game with custom mechanics - to have an sdk installed?
33 replies
CC#
Created by IceReaper on 1/18/2023 in #help
❔ How to calculate with numbers which are typed as object?
Yay, that realy seems to work 🙂
9 replies
CC#
Created by IceReaper on 1/18/2023 in #help
❔ How to calculate with numbers which are typed as object?
Yeah, that was my first idea, but it would only help to build Add(T a, T b) => a + b; basicaly. But i think i just stumbled across something which may work: dynamic keyword
9 replies