ManagementGroup.BeginExecuteMonitoringTask<T> 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.
Caution
Please use TaskRuntime.BeginExecuteMonitoringTask<T>()
Begins the execution of a task.
public:
generic <typename T>
where T : Microsoft::EnterpriseManagement::Monitoring::PartialMonitoringObject IAsyncResult ^ BeginExecuteMonitoringTask(System::Collections::Generic::ICollection<T> ^ targets, Microsoft::EnterpriseManagement::Runtime::MonitoringTask ^ task, Microsoft::EnterpriseManagement::Runtime::TaskConfiguration ^ configuration, AsyncCallback ^ callback, System::Object ^ state);
[System.Obsolete("Please use TaskRuntime.BeginExecuteMonitoringTask<T>()")]
public IAsyncResult BeginExecuteMonitoringTask<T> (System.Collections.Generic.ICollection<T> targets, Microsoft.EnterpriseManagement.Runtime.MonitoringTask task, Microsoft.EnterpriseManagement.Runtime.TaskConfiguration configuration, AsyncCallback callback, object state) where T : Microsoft.EnterpriseManagement.Monitoring.PartialMonitoringObject;
member this.BeginExecuteMonitoringTask : System.Collections.Generic.ICollection<'T (requires 'T :> Microsoft.EnterpriseManagement.Monitoring.PartialMonitoringObject)> * Microsoft.EnterpriseManagement.Runtime.MonitoringTask * Microsoft.EnterpriseManagement.Runtime.TaskConfiguration * AsyncCallback * obj -> IAsyncResult (requires 'T :> Microsoft.EnterpriseManagement.Monitoring.PartialMonitoringObject)
Public Function BeginExecuteMonitoringTask(Of T As PartialMonitoringObject) (targets As ICollection(Of T), task As MonitoringTask, configuration As TaskConfiguration, callback As AsyncCallback, state As Object) As IAsyncResult
Type Parameters
- T
Must be of typePartialMonitoringObject
Parameters
- targets
- ICollection<T>
The entities to target.
- task
- MonitoringTask
The task to submit.
- configuration
- TaskConfiguration
The configuration of the task.
- callback
- AsyncCallback
The callback to get notified on when the task completes.
- state
- Object
The optional state to pass back to the callback.
Returns
An IAsyncResult object.
- Attributes
Examples
For an example of theBeginExecuteMonitoringTaskmethod, see How to Asynchronously Run a Management Pack Task