AppDomainIsolatedTaskExtension 类

定义

此类提供与 Task 类相同但派生自 MarshalByRefObject 的功能,以便可以在其自己的应用域中进行实例化。This class provides the same functionality as the Task class, but derives from MarshalByRefObject so that it can be instantiated in its own app domain.

此 API 支持产品基础结构,不能在代码中直接使用。

public ref class AppDomainIsolatedTaskExtension abstract : Microsoft::Build::Utilities::AppDomainIsolatedTask
[Microsoft.Build.Framework.LoadInSeparateAppDomain]
public abstract class AppDomainIsolatedTaskExtension : Microsoft.Build.Utilities.AppDomainIsolatedTask
[<Microsoft.Build.Framework.LoadInSeparateAppDomain>]
type AppDomainIsolatedTaskExtension = class
    inherit AppDomainIsolatedTask
Public MustInherit Class AppDomainIsolatedTaskExtension
Inherits AppDomainIsolatedTask
继承
AppDomainIsolatedTaskExtension
派生
属性

属性

BuildEngine

生成引擎自动设置此属性,以允许任务回调到其中。The build engine automatically sets this property to allow tasks to call back into it.

(继承自 AppDomainIsolatedTask)
HelpKeywordPrefix

获取或设置前缀,该前缀用于通过字符串资源名称组成 help 关键字。Gets or sets the prefix used to compose help keywords from string resource names. 如果任务没有与消息关联的 help 关键字,则可以忽略此属性或将其设置为 null。If a task does not have help keywords associated with its messages, it can ignore this property or set it to null. 如果前缀设置为空字符串,则字符串资源名称将逐字用作 help 关键字。If the prefix is set to an empty string, then string resource names will be used verbatim as help keywords. 有关如何使用此前缀的示例,请参见 LogErrorWithCodeFromResources(String, Object[]) 方法。For an example of how this prefix is used, see the LogErrorWithCodeFromResources(String, Object[]) method.

(继承自 AppDomainIsolatedTask)
HostObject

如果主机 IDE 具有与此特定任务关联的主机对象,则生成引擎会设置此属性。The build engine sets this property if the host IDE has associated a host object with this particular task.

(继承自 AppDomainIsolatedTask)
Log

此 API 支持产品基础结构,不能在代码中直接使用。

获取包含任务日志记录方法的 TaskLoggingHelperExtension 类的实例。Gets an instance of a TaskLoggingHelperExtension class containing task logging methods.

TaskResources

获取或设置任务的区域性特定资源。Gets or sets the task's culture-specific resources. 派生类应在构造期间注册资源,如果它们有本地化字符串,则可以通过此属性注册。Derived classes should register their resources either during construction, or via this property, if they have localized strings.

(继承自 AppDomainIsolatedTask)

方法

CreateObjRef(Type)

创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.

(继承自 MarshalByRefObject)
Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
Execute()

必须由派生类实现。Must be implemented by derived class.

(继承自 AppDomainIsolatedTask)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetLifetimeService()

检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance.

(继承自 MarshalByRefObject)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
InitializeLifetimeService()

重写以赋予从这个类派生的任务无限的租约时间。Overridden to give tasks deriving from this class infinite lease time. 否则,我们最终会获得一个有限的租约(大约 5 分钟),如果任务实例处理时间较长,就会过期。Otherwise we end up with a limited lease (5 minutes I think) and task instances can expire if they take long time processing.

(继承自 AppDomainIsolatedTask)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
MemberwiseClone(Boolean)

创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object.

(继承自 MarshalByRefObject)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于