4
因爲並非我要實例化的類中使用的所有類都是可序列化的,所以我無法展開。從應用程序域展開不可序列化的類
這可能嗎?
var appdom = AppDomain.CreateDomain(amServiceable.GetType().ToString());
var objectHandle = appdom.CreateInstance(amServiceable.GetType().Assembly.FullName,
amServiceable.GetType().FullName);
var plugin = objectHandle.Unwrap() as IPlugin //throws an error. that some class in not marked serializable.