当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > System.Runtime.Remoting.Activation.ActivationServices.CreateInstance()

ASP.NET
使用 ASP+ 列表绑定控件(中)
使用 ASP+ 列表绑定控件(下)
关于两代语言.C/C++,java/c#
C#语言初级入门(1)
C#语言初级入门(2)
C#语言初级入门(3)
C#语言初级入门(4)
Microsoft .NET 框架常见问题 (一)
Microsoft .NET 框架常见问题 (二)
ASP.NET实现HTTP方式获取功能
Microsoft .NET Romoting 框架简介
ASP.NET中的XML表单控件
在 ASP.NET 中使用多个 runat=server form
.NET之ASP Web Form快速入门(1)
.NET之ASP Web Form快速入门(2)
.NET之ASP Web Form快速入门(3)
.NET之ASP Web Form快速入门(4)
.NET之ASP Web Form快速入门(6)
C#的前途如何?
在ASP.NET中处理 datetime 的一些通用函数(vb)

ASP.NET 中的 System.Runtime.Remoting.Activation.ActivationServices.CreateInstance()


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 167 ::
收藏到网摘: n/a

internal static MarshalByRefObject CreateInstance(Type serverType){ RemotingProxy proxy1; MarshalByRefObject obj1 = null; ConstructorCallMessage message1 = null; bool flag1 = ActivationServices.IsCurrentContextOK(serverType, (object[]) null, ref message1); if (flag1 && !serverType.IsContextful) { return RemotingServices.AllocateUninitializedObject(serverType); } obj1 = (MarshalByRefObject) ActivationServices.ConnectIfNecessary(message1); if (obj1 == null) { proxy1 = new RemotingProxy(serverType); obj1 = (MarshalByRefObject) proxy1.GetTransparentProxy(); } else { proxy1 = (RemotingProxy) RemotingServices.GetRealProxy(obj1); } proxy1.ConstructorMessage = message1; if (!flag1) { ContextLevelActivator activator1 = new ContextLevelActivator(); activator1.NextActivator = message1.Activator; message1.Activator = activator1; return obj1; } message1.ActivateInContext = true; return obj1;}