static void Main()
        {
            AppDomain DomainA;

            DomainA = AppDomain.CreateDomain("MyDomainA");
            string StringA = "DomainA Value";

            DomainA.SetData("DomainKey", StringA);

            CommonCallBack();
            CrossAppDomainDelegate delegateA = new CrossAppDomainDelegate(CommonCallBack);

            DomainA.DoCallBack(delegateA);
            Console.ReadLine();
        }
示例#2
0
 public RpcMethodHandle <TParams, TResult> NewMethodAtA <TParams, TResult>(string methodName, RpcAsyncMethodEntry methodEntry)
 {
     DomainA.AddMethod(methodName, methodEntry);
     return(new RpcMethodHandle <TParams, TResult>(DomainB, methodName));
 }