WellKnownServiceTypeEntry クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > WellKnownServiceTypeEntry クラスの意味・解説 

WellKnownServiceTypeEntry クラス

サーバー側でアクティブ化されるオブジェクト (単一呼び出しまたはシングルトン) としてサービス エンド登録されオブジェクト型の値を保持します

名前空間: System.Runtime.Remoting
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

<ComVisibleAttribute(True)> _
Public Class WellKnownServiceTypeEntry
    Inherits TypeEntry
Dim instance As WellKnownServiceTypeEntry
[ComVisibleAttribute(true)] 
public class WellKnownServiceTypeEntry : TypeEntry
[ComVisibleAttribute(true)] 
public ref class WellKnownServiceTypeEntry
 : public TypeEntry
/** @attribute ComVisibleAttribute(true) */ 
public class WellKnownServiceTypeEntry extends
 TypeEntry
ComVisibleAttribute(true) 
public class WellKnownServiceTypeEntry extends
 TypeEntry
解説解説
使用例使用例
Imports System
Imports System.Runtime.Remoting
Imports System.Runtime.Remoting.Channels
Imports System.Runtime.Remoting.Channels.Http

Public Class MyServer
   
   Public Shared Sub Main()
      ' Create a 'HttpChannel' object and register it with the 
      ' channel services.
      ChannelServices.RegisterChannel(New HttpChannel(8086))
      ' Record the 'HelloServer' type as 'Singleton' well-known type.
      Dim myWellKnownServiceTypeEntry As New
 WellKnownServiceTypeEntry(GetType(HelloServer), _ 
                                                 "SayHello",
 WellKnownObjectMode.Singleton)
      ' Register the remote object as well-known type.
      RemotingConfiguration.RegisterWellKnownServiceType(myWellKnownServiceTypeEntry)
      ' Retrieve object types registered on the service end 
      ' as well-known types.
      Dim myWellKnownServiceTypeEntryCollection As
 WellKnownServiceTypeEntry() = _ 
                                      RemotingConfiguration.GetRegisteredWellKnownServiceTypes()
      Console.WriteLine("The 'WellKnownObjectMode' of the remote
 object : " + _
                                        myWellKnownServiceTypeEntryCollection(0).Mode.ToString())
      Console.WriteLine("The 'WellKnownServiceTypeEntry' object:
 " + _ 
                                             myWellKnownServiceTypeEntryCollection(0).ToString())
      Console.WriteLine("Started the Server, Hit <enter>
 to exit...")
      Console.ReadLine()
   End Sub 'Main
End Class 'MyServer
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;

public class MyServer 
{
   public static void Main()
 
   {
      // Create a 'HttpChannel' object and register it with the 
      // channel services.
      ChannelServices.RegisterChannel(new HttpChannel(8086));
      // Record the 'HelloServer' type as 'Singleton' well-known type.
      WellKnownServiceTypeEntry myWellKnownServiceTypeEntry= 
          new WellKnownServiceTypeEntry(typeof(HelloServer),
                                        "SayHello",
                                        WellKnownObjectMode.Singleton);
      // Register the remote object as well-known type.
      RemotingConfiguration.RegisterWellKnownServiceType(
                                          myWellKnownServiceTypeEntry);
      // Retrieve object types registered on the service end 
      // as well-known types.
      WellKnownServiceTypeEntry [] myWellKnownServiceTypeEntryCollection = 
            RemotingConfiguration.GetRegisteredWellKnownServiceTypes();
      Console.WriteLine("The 'WellKnownObjectMode' of the remote object : "
                       +myWellKnownServiceTypeEntryCollection[0].Mode);
      Console.WriteLine("The 'WellKnownServiceTypeEntry' object: "+
                  myWellKnownServiceTypeEntryCollection[0].ToString());
      Console.WriteLine("Started the Server, Hit <enter> to exit...");
      Console.ReadLine();
   }
}
#using <System.Runtime.Remoting.dll>
#using <System.dll>
#using <WellKnownServiceTypeEntry_Share.dll>

using namespace System;
using namespace System::Runtime::Remoting;
using namespace System::Runtime::Remoting::Channels;
using namespace System::Runtime::Remoting::Channels::Http;

int main()
{
   // Create a 'HttpChannel' object and register it with the 
   // channel services.
   ChannelServices::RegisterChannel( gcnew HttpChannel( 8086 ) );

   // Record the 'HelloServer' type as 'Singleton' well-known type.
   WellKnownServiceTypeEntry^ myWellKnownServiceTypeEntry = gcnew WellKnownServiceTypeEntry(
 HelloServer::typeid,"SayHello",WellKnownObjectMode::Singleton );

   // Register the remote object as well-known type.
   RemotingConfiguration::RegisterWellKnownServiceType( myWellKnownServiceTypeEntry
 );

   // Retrieve object types registered on the service end 
   // as well-known types.
   array<WellKnownServiceTypeEntry^>^myWellKnownServiceTypeEntryCollection
 = RemotingConfiguration::GetRegisteredWellKnownServiceTypes();
   Console::WriteLine( "The 'WellKnownObjectMode' of the remote object : {0}",
 myWellKnownServiceTypeEntryCollection[ 0 ]->Mode );
   Console::WriteLine( "The 'WellKnownServiceTypeEntry' object: {0}", myWellKnownServiceTypeEntryCollection[
 0 ] );
   Console::WriteLine( "Started the Server, Hit <enter> to exit..."
 );
   Console::ReadLine();
}
import System.*;
import System.Runtime.Remoting.*;
import System.Runtime.Remoting.Channels.*;
import System.Runtime.Remoting.Channels.Http.*;

public class MyServer
{
    public static void main(String[]
 args)
    {
        // Create a 'HttpChannel' object and register it with the 
        // channel services.
        ChannelServices.RegisterChannel(new HttpChannel(8086));
        // Record the 'HelloServer' type as 'Singleton' well-known type.
        WellKnownServiceTypeEntry myWellKnownServiceTypeEntry = 
            new WellKnownServiceTypeEntry(HelloServer.class.ToType()
,
            "SayHello", WellKnownObjectMode.Singleton);
        // Register the remote object as well-known type.
        RemotingConfiguration.RegisterWellKnownServiceType(
            myWellKnownServiceTypeEntry);
        // Retrieve object types registered on the service end 
        // as well-known types.
        WellKnownServiceTypeEntry myWellKnownServiceTypeEntryCollection[] =
            RemotingConfiguration.GetRegisteredWellKnownServiceTypes();
        Console.WriteLine("The 'WellKnownObjectMode' of the remote object :
 " 
            + myWellKnownServiceTypeEntryCollection[0].get_Mode());
        Console.WriteLine("The 'WellKnownServiceTypeEntry' object: " 
            + myWellKnownServiceTypeEntryCollection.get_Item(0).ToString());
        Console.WriteLine("Started the Server, Hit <enter> to exit...");
        Console.ReadLine();
    } //main
} //MyServer
継承階層継承階層
System.Object
   System.Runtime.Remoting.TypeEntry
    System.Runtime.Remoting.WellKnownServiceTypeEntry
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WellKnownServiceTypeEntry メンバ
System.Runtime.Remoting 名前空間
RegisterWellKnownServiceType
その他の技術情報
サーバー アクティベーション



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「WellKnownServiceTypeEntry クラス」の関連用語

WellKnownServiceTypeEntry クラスのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



WellKnownServiceTypeEntry クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS