次の方法で共有


RemotingConfiguration.GetRegisteredWellKnownServiceTypes メソッド

既知の型として、サービス エンドで登録されているオブジェクト型の配列を取得します。

Public Shared Function GetRegisteredWellKnownServiceTypes() As _
   WellKnownServiceTypeEntry()
[C#]
public static WellKnownServiceTypeEntry
   
   GetRegisteredWellKnownServiceTypes();
[C++]
public: static WellKnownServiceTypeEntry*
   GetRegisteredWellKnownServiceTypes() 
   ;
[JScript]
public static function GetRegisteredWellKnownServiceTypes() :
   WellKnownServiceTypeEntry
   ;

戻り値

既知の型として、サービス エンドで登録されているオブジェクト型の配列。

例外

例外の種類 条件
SecurityException コールスタックの上位にある 1 つ以上の呼び出し元に、リモート処理の型とチャネルを構成するためのアクセス許可がありません。

解説

既知のオブジェクト型には、単一の呼び出しまたはシングルトンがあります。オブジェクト型が単一の呼び出しの場合は、クライアントからの呼び出しがあるたびに新しいインスタンスが作成されます。シングルトン オブジェクトへのすべての呼び出しは、そのオブジェクトの 1 つのインスタンスによって処理されます。

既知のオブジェクトの詳細については、「 サーバー アクティベーション 」を参照してください。

使用例

 

      ' Retrive the array of objects registered as well known types at
      ' the service end.
      Dim myEntries As WellKnownServiceTypeEntry() = _ 
                       RemotingConfiguration.GetRegisteredWellKnownServiceTypes()
      Console.WriteLine("The number of WellKnownServiceTypeEntries are:" + myEntries.Length.ToString())
      Console.WriteLine("The Object Type is:" + myEntries(0).ObjectType.ToString())
      Console.WriteLine("The Object Uri is:" + myEntries(0).ObjectUri)
      Console.WriteLine("The Mode is:" + myEntries(0).Mode.ToString())
      

[C#] 

   // Retrive the array of objects registered as well known types at
   // the service end.
   WellKnownServiceTypeEntry[] myEntries =
             RemotingConfiguration.GetRegisteredWellKnownServiceTypes();
   Console.WriteLine("The number of WellKnownServiceTypeEntries are:"
                                 +myEntries.Length);
   Console.WriteLine("The Object Type is:"+myEntries[0].ObjectType);
   Console.WriteLine("The Object Uri is:"+myEntries[0].ObjectUri);
   Console.WriteLine("The Mode is:"+myEntries[0].Mode);


[C++] 

   // Retrive the array of objects registered as well known types at
   // the service end.
   WellKnownServiceTypeEntry* myEntries[] =
             RemotingConfiguration::GetRegisteredWellKnownServiceTypes();
   Console::WriteLine(S"The number of WellKnownServiceTypeEntries are:{0}", __box(myEntries->Length));
   Console::WriteLine(S"The Object Type is:{0}", myEntries[0]->ObjectType);
   Console::WriteLine(S"The Object Uri is:{0}", myEntries[0]->ObjectUri);
   Console::WriteLine(S"The Mode is:{0}", __box(myEntries[0]->Mode));

[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 ファミリ

.NET Framework セキュリティ:

参照

RemotingConfiguration クラス | RemotingConfiguration メンバ | System.Runtime.Remoting 名前空間 | WellKnownServiceTypeEntry | WellKnownClientTypeEntry | RegisterWellKnownServiceType | RegisterWellKnownClientType