ProxyAttribute.CreateInstance メソッド
指定した型が現在のコンテキスト内に存在するかどうかによって、初期化されていない MarshalByRefObject または透過プロキシのいずれかを作成します。
Public Overridable Function CreateInstance( _
ByVal serverType As Type _) As MarshalByRefObject
[C#]
public virtual MarshalByRefObject CreateInstance(TypeserverType);
[C++]
public: virtual MarshalByRefObject* CreateInstance(Type* serverType);
[JScript]
public function CreateInstance(
serverType : Type) : MarshalByRefObject;
パラメータ
- serverType
インスタンスを作成するオブジェクト型。
戻り値
初期化されていない MarshalByRefObject または透過プロキシ。
使用例
' Create an instance of ServicedComponentProxy
Public Overrides Function CreateInstance(serverType As Type) As MarshalByRefObject
Return MyBase.CreateInstance(serverType)
End Function 'CreateInstance
[C#]
// Create an instance of ServicedComponentProxy
public override MarshalByRefObject CreateInstance(Type serverType)
{
return base.CreateInstance(serverType);
}
[C++]
// Create an instance of ServicedComponentProxy
public:
MarshalByRefObject* CreateInstance(Type* serverType)
{
return ProxyAttribute::CreateInstance(serverType);
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
ProxyAttribute クラス | ProxyAttribute メンバ | System.Runtime.Remoting.Proxies 名前空間