Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
AnonymousBuildStepProvider.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;
4 
5 namespace SiliconStudio.BuildEngine
6 {
7  /// <summary>
8  /// An implementation of the <see cref="IBuildStepProvider"/> interface that allows to create a build step provider
9  /// from an anonymous function.
10  /// </summary>
12  {
13  private readonly Func<BuildStep> providerFunction;
14 
15  /// <summary>
16  /// Initializes a new instance of the <see cref="AnonymousBuildStepProvider"/> class.
17  /// </summary>
18  /// <param name="providerFunction">The function that provides build steps.</param>
19  public AnonymousBuildStepProvider(Func<BuildStep> providerFunction)
20  {
21  if (providerFunction == null) throw new ArgumentNullException("providerFunction");
22  this.providerFunction = providerFunction;
23  }
24 
25  /// <inheritdoc/>
27  {
28  return providerFunction();
29  }
30  }
31 }
AnonymousBuildStepProvider(Func< BuildStep > providerFunction)
Initializes a new instance of the AnonymousBuildStepProvider class.
An implementation of the IBuildStepProvider interface that allows to create a build step provider fro...
BuildStep GetNextBuildStep()
Gets the next build step to execute. The next build step to execute, or null if there is no build ste...
This interface describes a class that is capable of providing build steps to a DynamicBuildStep.