开发者

How to detect SQL Hosted CLR at runtime

开发者 https://www.devze.com 2023-01-21 02:54 出处:网络
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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消