次の方法で共有


ICancelBuild Interface

Interface used to cancel the Content Pipeline build process.

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Tasks
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

Syntax

public interface ICancelBuild : ITaskHost

Remarks

This interface can be implemented by applications that host the BuildContent or BuildXact tasks, and passed in via the MSBuild HostObject property. The Content Pipeline build process checks whether the HostObject implements ICancelBuild, and if so, subscribes to the BuildCancelled event.

The cancellation status is checked whenever the build process outputs a log message. This check can sometimes result in a slight lag between the cancel event and when the build stops, but it ensures that the build is interrupted only at well known locations, which is much more robust than if you tried to forcibly interrupt it from inside unknown third-party code.

See Also

Reference

ICancelBuild Members
Microsoft.Xna.Framework.Content.Pipeline.Tasks Namespace

Platforms

Windows XP SP2, Windows Vista