Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
LocalCommandContext.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System.Collections.Generic;
4 using System.Threading.Tasks;
5 using SiliconStudio.Core.Storage;
6 using SiliconStudio.Core.Diagnostics;
7 using SiliconStudio.Core.Serialization.Assets;
8 
9 namespace SiliconStudio.BuildEngine
10 {
12  {
13  private readonly IExecuteContext executeContext;
14 
15  private readonly Logger logger;
16 
17  public CommandBuildStep Step { get; protected set; }
18 
19  public override Logger Logger { get { return logger; } }
20 
21  public LocalCommandContext(IExecuteContext executeContext, CommandBuildStep step, BuilderContext builderContext) : base(step.Command, builderContext)
22  {
23  this.executeContext = executeContext;
24  logger = executeContext.Logger;
25  Step = step;
26  }
27 
29  {
30  return Step.GetOutputObjectsGroups();
31  }
32 
34  {
35  var resultStatus = await Step.SpawnCommand(command, executeContext);
36  return resultStatus;
37  }
38 
39  internal protected override ObjectId ComputeInputHash(UrlType type, string filePath)
40  {
41  return executeContext.ComputeInputHash(type, filePath);
42  }
43  }
44 }
override IEnumerable< IDictionary< ObjectUrl, OutputObject > > GetOutputObjectsGroups()
Base implementation for ILogger.
Definition: Logger.cs:10
override ObjectId ComputeInputHash(UrlType type, string filePath)
A hash to uniquely identify data.
Definition: ObjectId.cs:13
LocalCommandContext(IExecuteContext executeContext, CommandBuildStep step, BuilderContext builderContext)
override async Task< ResultStatus > ScheduleAndExecuteCommandInternal(Command command)