0
我在我的項目中使用了一些xpcom組件。此組件不允許在同一個AppDomain中同時使用。如何在單獨的AppDomain中運行靜態方法?
我可以限制我在一個單一的靜態方法該組件的用法:
public static class MyClass
{
// This should run in another appdomain
public static QueryResult Run(QueryParameter arg)
{
}
}
QueryResult
和QueryParameter
都是不可變的序列化類。
我真的不想在另一個進程中運行它,所以我認爲可以在另一個AppDomain中運行它。
什麼是正確的做法?