指定したオブジェクト型が既知のクライアント型として登録されているかどうかを確認します。
オーバーロードの一覧
指定したオブジェクト Type が既知のクライアント型として登録されているかどうかを確認します。
[Visual Basic] Overloads Public Shared Function IsWellKnownClientType(Type) As WellKnownClientTypeEntry
[C#] public static WellKnownClientTypeEntry IsWellKnownClientType(Type);
[C++] public: static WellKnownClientTypeEntry* IsWellKnownClientType(Type*);
[JScript] public static function IsWellKnownClientType(Type) : WellKnownClientTypeEntry;
型名とアセンブリ名で指定したオブジェクトが、既知のクライアント型として登録されているかどうかを確認します。
[Visual Basic] Overloads Public Shared Function IsWellKnownClientType(String, String) As WellKnownClientTypeEntry
[C#] public static WellKnownClientTypeEntry IsWellKnownClientType(string, string);
[C++] public: static WellKnownClientTypeEntry* IsWellKnownClientType(String*, String*);
[JScript] public static function IsWellKnownClientType(String, String) : WellKnownClientTypeEntry;
使用例
[Visual Basic, C#, C++] メモ ここでは、IsWellKnownClientType のオーバーロード形式のうちの 1 つだけについて、使用例を示します。その他の例については、各オーバーロード形式のトピックを参照してください。
Dim myObject As New MyServerImpl()
' Get the assembly for the 'MyServerImpl' object.
Dim myAssembly As [Assembly] = [Assembly].GetAssembly(GetType(MyServerImpl))
Dim myName As AssemblyName = myAssembly.GetName()
' Check whether the specified object type is registered as
' well-known client type.
Dim myWellKnownClientType As WellKnownClientTypeEntry = _
RemotingConfiguration.IsWellKnownClientType(GetType(MyServerImpl).FullName, myName.Name)
Console.WriteLine("The Object type :" + myWellKnownClientType.ObjectType.ToString())
Console.WriteLine("The Object Uri :" + myWellKnownClientType.ObjectUrl)
[C#]
MyServerImpl myObject = new MyServerImpl();
// Get the assembly for the 'MyServerImpl' object.
Assembly myAssembly = Assembly.GetAssembly(typeof(MyServerImpl));
AssemblyName myName = myAssembly.GetName();
// Check whether the specified object type is registered as
// well-known client type.
WellKnownClientTypeEntry myWellKnownClientType =
RemotingConfiguration.IsWellKnownClientType(
(typeof(MyServerImpl)).FullName,myName.Name);
Console.WriteLine("The Object type :"
+myWellKnownClientType.ObjectType);
Console.WriteLine("The Object Uri :"
+myWellKnownClientType.ObjectUrl);
[C++]
MyServerImpl* myObject = new MyServerImpl();
// Get the assembly for the 'MyServerImpl' object.
Assembly* myAssembly = Assembly::GetAssembly(__typeof(MyServerImpl));
AssemblyName* myName = myAssembly->GetName();
// Check whether the specified object type is registered as
// well-known client type.
WellKnownClientTypeEntry* myWellKnownClientType =
RemotingConfiguration::IsWellKnownClientType(
(__typeof(MyServerImpl))->FullName,myName->Name);
Console::WriteLine(S"The Object type :{0}", myWellKnownClientType->ObjectType);
Console::WriteLine(S"The Object Uri :{0}", myWellKnownClientType->ObjectUrl);
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
参照
RemotingConfiguration クラス | RemotingConfiguration メンバ | System.Runtime.Remoting 名前空間