public static Bff.IResolvable GetResolveableFromBuildStep(string buildStepKey, Project.Configuration.BuildStepBase buildStep) { if (buildStep is Project.Configuration.BuildStepExecutable) { return(new Bff.ExecNode(buildStepKey, buildStep as Project.Configuration.BuildStepExecutable)); } if (buildStep is Project.Configuration.BuildStepCopy) { var copyStep = buildStep as Project.Configuration.BuildStepCopy; if (copyStep.IsFileCopy) { return(new Bff.CopyNode(buildStepKey, copyStep)); } return(new Bff.CopyDirNode(buildStepKey, copyStep)); } if (buildStep is Project.Configuration.BuildStepTest) { return(new Bff.TestNode(buildStepKey, buildStep as Project.Configuration.BuildStepTest)); } throw new Error("error, BuildStep not supported: {0}", buildStep.GetType().FullName); }
private static Bff.BffNodeBase GetBffNodesFromBuildStep(string buildStepKey, Project.Configuration.BuildStepBase buildStep, Strings dependencies) { Bff.BffDependentNode node = null; if (buildStep is Project.Configuration.BuildStepExecutable) { node = new Bff.ExecNode(buildStepKey, buildStep as Project.Configuration.BuildStepExecutable); } if (buildStep is Project.Configuration.BuildStepCopy) { var copyStep = buildStep as Project.Configuration.BuildStepCopy; if (copyStep.IsFileCopy) { node = new Bff.CopyNode(buildStepKey, copyStep); } else { node = new Bff.CopyDirNode(buildStepKey, copyStep); } } if (buildStep is Project.Configuration.BuildStepTest) { node = new Bff.TestNode(buildStepKey, buildStep as Project.Configuration.BuildStepTest); } if (node == null) { throw new Error("BuildStep not supported: {0}", buildStep.GetType().FullName); } node.Dependencies.AddRange(dependencies); return(node); }