RemotingServices.IsOneWay メソッドとは? わかりやすく解説

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

RemotingServices.IsOneWay メソッド

特定のメッセージ内で指定したメソッド呼び出したクライアントが、実行継続する前に、このメソッドの処理をサーバー完了するまで待機するかどうかを示す Boolean 値を返します

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

Public Shared Function IsOneWay
 ( _
    method As MethodBase _
) As Boolean
Dim method As MethodBase
Dim returnValue As Boolean

returnValue = RemotingServices.IsOneWay(method)
public static bool IsOneWay
 (
    MethodBase method
)
public:
static bool IsOneWay (
    MethodBase^ method
)
public static boolean IsOneWay (
    MethodBase method
)
public static function IsOneWay
 (
    method : MethodBase
) : boolean

パラメータ

method

該当するメソッド

戻り値
メソッド一方向場合trueそれ以外場合false

例外例外
解説解説
使用例使用例
Public Class HelloServer
    Inherits MarshalByRefObject

    Shared Sub New()
        Console.WriteLine("HelloServer activated.")
    End Sub

    <OneWay()> Public Sub SayHelloToServer(ByVal
 name As String)
        Console.WriteLine("Client invoked SayHelloToServer(""{0}"").",
 name)
    End Sub

    ' Note the lack of the OneWayAttribute adornment on this method.
<SecurityPermission(SecurityAction.Demand)> _
    Public Function SayHelloToServerAndWait(ByVal
 name As String) As String
        Console.WriteLine("Client invoked SayHelloToServerAndWait(""{0}"").",
 name)

        Console.WriteLine( _
            "Client waiting for return? {0}", _
            IIf(RemotingServices.IsOneWay(MethodBase.GetCurrentMethod()), "No",
 "Yes") _
        )

        Return "Hi there, " + name
 + "."
    End Function

End Class
public class HelloServer : MarshalByRefObject
 {

   public HelloServer() {
      Console.WriteLine("HelloServer activated.");
   }

   [OneWay()]
   public void SayHelloToServer(string
 name) {
      Console.WriteLine("Client invoked SayHelloToServer(\"{0}\").",
 name);
   }   

[SecurityPermission(SecurityAction.Demand)]
   // Note the lack of the OneWayAttribute adornment on this method.
   public string SayHelloToServerAndWait(string
 name) {
      Console.WriteLine("Client invoked SayHelloToServerAndWait(\"{0}\").",
 name);

      Console.WriteLine(
         "Client waiting for return? {0}"
,
         RemotingServices.IsOneWay(MethodBase.GetCurrentMethod()) ? "No"
 : "Yes"
      );

      return "Hi there, " + name + ".";
   }
}
public ref class HelloServer: public
 MarshalByRefObject
{
public:
   HelloServer()
   {
      Console::WriteLine( "HelloServer activated." );
   }

   [OneWay]
   void SayHelloToServer( String^ name )
   {
      Console::WriteLine( "Client invoked SayHelloToServer(\" {0}\").",
 name );
   }

   // Note the lack of the OneWayAttribute adornment on this method.
   [SecurityPermissionAttribute(SecurityAction::Demand, Flags=SecurityPermissionFlag::Infrastructure)]
   
   String^ SayHelloToServerAndWait( String^ name )
   {
      Console::WriteLine( "Client invoked SayHelloToServerAndWait(\" {0}\").",
 name );
      Console::WriteLine( "Client waiting for return?
 {0}", RemotingServices::IsOneWay( MethodBase::GetCurrentMethod() ) ? (String^)"No"
 : "Yes" );
      return String::Format( "Hi there, {0}.", name
 );
   }
};
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
RemotingServices クラス
RemotingServices メンバ
System.Runtime.Remoting 名前空間



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

辞書ショートカット

すべての辞書の索引

「RemotingServices.IsOneWay メソッド」の関連用語

RemotingServices.IsOneWay メソッドのお隣キーワード
検索ランキング

   

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



RemotingServices.IsOneWay メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS