How to detect SQL Hosted CLR at runtime
I would like to detect that my assembly is loaded in SQL Hosted CLR at runtime in order to safely process the AppDomain FriendlyName string.
Unfortunately, AppDomain.CurrentDomain.DomainManager.EntryAssembly
i开发者_StackOverflow社区s null
in this context.
Any help appreciated. TIA.
I use SqlContext.IsAvailable
to determine if I am running under the SQLCLR... it works a treat..
http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.server.sqlcontext.isavailable.aspx
精彩评论