33 строки
794 B
C#
33 строки
794 B
C#
|
using System.Collections.Generic;
|
||
using System.Linq;
|
|||
using Microsoft.Build.Framework;
|
|||
using Xamarin.Messaging.Build.Client;
|
|||
|
|||
|
namespace Xamarin.MacDev.Tasks
|
||
|
{
|
||
public class MetalLib : MetalLibTaskBase, ITaskCallback
|
|||
|
{
|
||
public override bool Execute ()
|
|||
{
|
|||
if (ShouldExecuteRemotely ())
|
|||
return new TaskRunner (SessionId, BuildEngine4).RunAsync (this).Result;
|
|||
|
|||
return base.Execute ();
|
|||
}
|
|||
|
|||
public bool ShouldCopyToBuildServer (ITaskItem item) => false;
|
|||
|
|||
public bool ShouldCreateOutputFile (ITaskItem item) => true;
|
|||
|
|||
public IEnumerable<ITaskItem> GetAdditionalItemsToBeCopied () => Enumerable.Empty<ITaskItem> ();
|
|||
|
|||
public override void Cancel ()
|
|||
{
|
|||
base.Cancel ();
|
|||
|
|||
if (ShouldExecuteRemotely ())
|
|||
BuildConnection.CancelAsync (SessionId, BuildEngine4).Wait ();
|
|||
}
|
|||
|
}
|
||
}
|