Freigeben über


LogicalMethodInfo.MethodInfo-Eigenschaft

Ruft die Attribute und Metadaten für eine asynchrone Methode ab.

Namespace: System.Web.Services.Protocols
Assembly: System.Web.Services (in system.web.services.dll)

Syntax

'Declaration
Public ReadOnly Property MethodInfo As MethodInfo
'Usage
Dim instance As LogicalMethodInfo
Dim value As MethodInfo

value = instance.MethodInfo
public MethodInfo MethodInfo { get; }
public:
property MethodInfo^ MethodInfo {
    MethodInfo^ get ();
}
/** @property */
public MethodInfo get_MethodInfo ()
public function get MethodInfo () : MethodInfo

Eigenschaftenwert

Eine MethodInfo, die die Attribute und Metadaten für eine Methode darstellt. Wenn IsAsync true ist, ist der Wert dieser Eigenschaft NULL (Nothing in Visual Basic).

Beispiel

Dim myType As Type = GetType(MyService)
Dim myMethodInfo As MethodInfo = myType.GetMethod("Add")
' Create a synchronous 'LogicalMethodInfo' instance.
Dim myLogicalMethodInfo As LogicalMethodInfo = _
           LogicalMethodInfo.Create(New MethodInfo() {myMethodInfo}, LogicalMethodTypes.Sync)(0)
' Display the method for which the attributes are being displayed.
Console.WriteLine(ControlChars.NewLine + "Displaying the attributes for the method : {0}" + _
           ControlChars.NewLine, myLogicalMethodInfo.MethodInfo.ToString())
Type myType = typeof(MyService);
MethodInfo myMethodInfo = myType.GetMethod("Add");
// Create a synchronous 'LogicalMethodInfo' instance.
LogicalMethodInfo myLogicalMethodInfo = 
   (LogicalMethodInfo.Create(new MethodInfo[] {myMethodInfo}, 
                             LogicalMethodTypes.Sync))[0];
// Display the method for which the attributes are being displayed.
Console.WriteLine("\nDisplaying the attributes for the method : {0}\n",
                     myLogicalMethodInfo.MethodInfo);
Type^ myType = MyService::typeid;
MethodInfo^ myMethodInfo = myType->GetMethod( "Add" );

// Create a synchronous 'LogicalMethodInfo' instance.
array<MethodInfo^>^temparray = {myMethodInfo};
LogicalMethodInfo^ myLogicalMethodInfo = (LogicalMethodInfo::Create( temparray, LogicalMethodTypes::Sync ))[ 0 ];

// Display the method for which the attributes are being displayed.
Console::WriteLine( "\nDisplaying the attributes for the method : {0}\n", myLogicalMethodInfo->MethodInfo );
Type myType = MyService.class.ToType();
MethodInfo myMethodInfo = myType.GetMethod("Add");

// Create a synchronous 'LogicalMethodInfo' instance.
LogicalMethodInfo myLogicalMethodInfo = 
    (LogicalMethodInfo)LogicalMethodInfo.Create(new MethodInfo[] 
    { myMethodInfo }, LogicalMethodTypes.Sync).get_Item(0);

// Display the method for which the attributes are being displayed.
Console.WriteLine("\nDisplaying the attributes for the method : {0}\n",
    myLogicalMethodInfo.get_MethodInfo());

Plattformen

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

.NET Compact Framework

Unterstützt in: 2.0, 1.0

Siehe auch

Referenz

LogicalMethodInfo-Klasse
LogicalMethodInfo-Member
System.Web.Services.Protocols-Namespace
MethodInfo
LogicalMethodInfo.BeginMethodInfo-Eigenschaft
LogicalMethodInfo.EndMethodInfo-Eigenschaft