.net - Replacing Classes in the System Namespace -
i'm working hack .net operating system running on top of ms.net/mono (previously ran bare-metal only), , i've hit small snag. need implement own system.console talks service infrastructure, , can't find way replace without either 1) not linking against mscorlib (would hellacious do), or 2) using notquitesystem namespace replacements, break compatibility.
is there mechanism can cleanly replace system classes without doing 1 of things?
edit: 1 thought use mono.cecil rewrite references system.console renraku.system.console or somesuch, i'd prefer work within framework if possible.
you should free tool postsharp. allows change existing .net assemblies @ design time automating modification of msil.
see this page more information on compile-time weaving in postsharp. , this page information on load-time weaving (occurs @ runtime before assembly loaded in memory).
for runtime weaving (modifying existing methods @ runtime), @ linfu.
[except page]
... can use linfu.aop dynamically intercept method on type, regardless of whether or not method declared virtual or non-virtual. you’ll able dynamically intercept (and replace) methods declared on sealed types, in addition static methods declared on type.
[/except page]
Comments
Post a Comment