开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜