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

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

SoapServices.IsSoapActionValidForMethodBase メソッド

指定した SOAPAction が特定の MethodBase許容されるかどうか確認します

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

Public Shared Function IsSoapActionValidForMethodBase
 ( _
    soapAction As String, _
    mb As MethodBase _
) As Boolean
Dim soapAction As String
Dim mb As MethodBase
Dim returnValue As Boolean

returnValue = SoapServices.IsSoapActionValidForMethodBase(soapAction, mb)
public static bool IsSoapActionValidForMethodBase
 (
    string soapAction,
    MethodBase mb
)
public:
static bool IsSoapActionValidForMethodBase
 (
    String^ soapAction, 
    MethodBase^ mb
)
public static boolean IsSoapActionValidForMethodBase
 (
    String soapAction, 
    MethodBase mb
)
public static function IsSoapActionValidForMethodBase
 (
    soapAction : String, 
    mb : MethodBase
) : boolean

パラメータ

soapAction

特定の MethodBase で検証する SOAPAction。

mb

指定した SOAPAction の検証使用する MethodBase

戻り値
指定した SOAPAction が特定の MethodBase許容される場合trueそれ以外場合false

例外例外
使用例使用例

このメソッド使用する方法次のコード例示します。このコード例は、SoapServices クラストピック取り上げているコード例一部分です。

// Get the SOAP action for the method.
System.Reflection.MethodBase getHelloMethodBase = 
    typeof(ExampleNamespace.ExampleClass).GetMethod("GetHello");
string getHelloSoapAction =
    SoapServices.GetSoapActionFromMethodBase(getHelloMethodBase);
Console.WriteLine(
    "The SOAP action for the method " +
    "ExampleClass.GetHello is {0}.", getHelloSoapAction);
bool isSoapActionValid = SoapServices.IsSoapActionValidForMethodBase(
    getHelloSoapAction,
    getHelloMethodBase);
if (isSoapActionValid)
{
    Console.WriteLine(
        "The SOAP action, {0}, " + 
        "is valid for ExampleClass.GetHello", 
        getHelloSoapAction);
}
else
{
    Console.WriteLine(
        "The SOAP action, {0}, " + 
        "is not valid for ExampleClass.GetHello", 
        getHelloSoapAction);
}

// Register the SOAP action for the GetHello method.
SoapServices.RegisterSoapActionForMethodBase(getHelloMethodBase);

// Get the type and the method names encoded into the SOAP action.
string encodedTypeName;
string encodedMethodName;
SoapServices.GetTypeAndMethodNameFromSoapAction(
    getHelloSoapAction, 
    out encodedTypeName, 
    out encodedMethodName);
Console.WriteLine(
    "The type name encoded in this SOAP
 action is {0}.",
    encodedTypeName);
Console.WriteLine(
    "The method name encoded in this SOAP
 action is {0}.",
    encodedMethodName);
// Get the SOAP action for the method.
System::Reflection::MethodBase^ getHelloMethodBase =
   ExampleNamespace::ExampleClass::typeid->GetMethod( L"GetHello" );
String^ getHelloSoapAction =
   SoapServices::GetSoapActionFromMethodBase( getHelloMethodBase );
Console::WriteLine( L"The SOAP action for the method "
L"ExampleClass.GetHello is {0}.", getHelloSoapAction );
bool isSoapActionValid =
   SoapServices::IsSoapActionValidForMethodBase(
      getHelloSoapAction, getHelloMethodBase );
if ( isSoapActionValid )
{
   Console::WriteLine( L"The SOAP action, {0}, "
   L"is valid for ExampleClass.GetHello", getHelloSoapAction
 );
}
else
{
   Console::WriteLine( L"The SOAP action, {0}, "
   L"is not valid for ExampleClass.GetHello", getHelloSoapAction
 );
}

// Register the SOAP action for the GetHello method.
SoapServices::RegisterSoapActionForMethodBase( getHelloMethodBase );

// Get the type and the method names encoded into the SOAP action.
String^ encodedTypeName;
String^ encodedMethodName;
SoapServices::GetTypeAndMethodNameFromSoapAction(
   getHelloSoapAction,encodedTypeName,encodedMethodName );
Console::WriteLine( L"The type name encoded in this
 SOAP action is {0}.",
   encodedTypeName );
Console::WriteLine( L"The method name encoded in this
 SOAP action is {0}.",
   encodedMethodName );
// Get the SOAP action for the method.
System.Reflection.MethodBase getHelloMethodBase = ExampleNamespace.
    ExampleClass.class.ToType().GetMethod("GetHello");
String getHelloSoapAction = SoapServices.
    GetSoapActionFromMethodBase(getHelloMethodBase);
Console.WriteLine("The SOAP action for the method "
 
    + "ExampleClass.GetHello is {0}.", getHelloSoapAction);
boolean isSoapActionValid = SoapServices.
    IsSoapActionValidForMethodBase(getHelloSoapAction, 
    getHelloMethodBase);
if (isSoapActionValid) {
    Console.WriteLine("The SOAP action, {0}, " 
        + "is valid for ExampleClass.GetHello", getHelloSoapAction);
}
else {
    Console.WriteLine("The SOAP action, {0}, " 
        + "is not valid for ExampleClass.GetHello",
 getHelloSoapAction);
}
// Register the SOAP action for the GetHello method.
SoapServices.RegisterSoapActionForMethodBase(getHelloMethodBase);
// Get the type and the method names encoded into the SOAP action.
String encodedTypeName = "";
String encodedMethodName = "";
SoapServices.GetTypeAndMethodNameFromSoapAction(getHelloSoapAction, 
    encodedTypeName, encodedMethodName);
Console.WriteLine("The type name encoded in this
 SOAP action is {0}.", 
    encodedTypeName);
Console.WriteLine("The method name encoded in this
 SOAP action is {0}.", 
    encodedMethodName);
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapServices クラス
SoapServices メンバ
System.Runtime.Remoting 名前空間


このページでは「.NET Framework クラス ライブラリ リファレンス」からSoapServices.IsSoapActionValidForMethodBase メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からSoapServices.IsSoapActionValidForMethodBase メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からSoapServices.IsSoapActionValidForMethodBase メソッド を検索

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

辞書ショートカット

すべての辞書の索引

「SoapServices.IsSoapActionValidForMethodBase メソッド」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS