ToolTask.InitializeHostObject 方法

定义

如果任务支持宿主对象,应能替代此方法。We expect tasks to override this method if they support host objects. 该实现应确保宿主对象已能够执行任务的实际工作。The implementation should make sure that the host object is ready to perform the real work of the task.

protected:
 virtual Microsoft::Build::Utilities::HostObjectInitializationStatus InitializeHostObject();
protected virtual Microsoft.Build.Utilities.HostObjectInitializationStatus InitializeHostObject ();
abstract member InitializeHostObject : unit -> Microsoft.Build.Utilities.HostObjectInitializationStatus
override this.InitializeHostObject : unit -> Microsoft.Build.Utilities.HostObjectInitializationStatus
Protected Overridable Function InitializeHostObject () As HostObjectInitializationStatus

返回

HostObjectInitializationStatus

返回值指示下一步要采取的步骤。The return value indicates what steps to take next. 默认情况是假定没有提供宿主对象,因此我们应该回退到命令行工具的调用。The default is to assume that there is no host object provided, and therefore we should fallback to calling the command-line tool.

适用于