7 DocumentForm
<object> browseForm
= new DocumentForm
<object> ();
8 if (browseForm
.DoInit () != 248)
11 var domain
= AppDomain
.CreateDomain ("foo");
12 var engine
= Engine
.CreateRemote (domain
);
14 if (engine
.GetDomainName
<object> () != "foo")
21 public abstract class EntityBase
25 public class GenEntity
<T
> : EntityBase
33 var g
= new Grid1
<GenEntity
<T
>>(123);
34 var g2
= new Grid2
<GenEntity
<T
>>(123);
35 return g
.num
+ g2
.num
;
39 public class Grid1
<TEntity
> : MarshalByRefObject
49 public class Grid2
<TEntity
> : MarshalByRefObject where TEntity
: EntityBase
, new()
59 public class Engine
: MarshalByRefObject
65 public string GetDomainName
<T
> ()
67 return AppDomain
.CurrentDomain
.FriendlyName
;
70 public string GetDomainName ()
72 return AppDomain
.CurrentDomain
.FriendlyName
;
75 public static Engine
CreateRemote (AppDomain domain
)
77 return (Engine
) domain
.CreateInstanceAndUnwrap (
78 typeof (Engine
).Assembly
.FullName
,
79 typeof (Engine
).FullName
);