ModuleServiceProxy.Invoke(String, Object[]) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Calls the specified method using the specified arguments.
protected:
System::Object ^ Invoke(System::String ^ methodName, ... cli::array <System::Object ^> ^ parameters);
protected object Invoke (string methodName, params object[] parameters);
member this.Invoke : string * obj[] -> obj
Protected Function Invoke (methodName As String, ParamArray parameters As Object()) As Object
Parameters
- methodName
- String
The name of the method to invoke.
Returns
The return value from the delegate being invoked, or null
if the delegate has no return value.
Examples
The following example shows the use of the Invoke method.
using System;
using System.Collections;
using Microsoft.Web.Management.Client;
namespace rxDemo {
internal class DemoModuleServiceProxy : ModuleServiceProxy {
public DemoModuleServiceProxy() : base() { }
public ArrayList GetSettings() {
return (ArrayList)Invoke("GetSettings");
}
}
}
internal class DemoPage : ModuleListPage {
public DemoPage() : base() { }
ModuleListPageGrouping _entryTypeGrouping;
// Invoke GetSettings from ModuleListPage derived class
private void GetSettingsMLP(object sender, DoWorkEventArgs e) {
try {
e.Result = _serviceProxy.GetSettings();
} catch (Exception ex) {
DisplayExceptionString(ex);
}
}
Remarks
Only .NET Framework types can be passed; arbitrary objects cannot be passed as a parameter. The number of parameters passed is arbitrary.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for