[assembly: MolesEraseStaticConstructor(typeof(MyStatic))]
22 November 2011
How To Detour a Static Constructor
at
13:37
Static constructors pose a challenge. Naturally, one can not call the constructor of a static class. This also means that the Moles Framework does not provide an accessor to detour the constructor of a static class. However, Moles provides a way to erase static constructors, to prevent them from executing. Simply add the MolesDisableStaticConstructor assembly attribute to the test class:
Subscribe to:
Post Comments (Atom)
thanks for information.. for more details on static constructor this link may help http://aspnettutorialonline.blogspot.com/2012/04/static-constructor-and-normal.html
ReplyDelete