public CustomBuildAppTask(BuildRunEntity run) : base(run) { InitializeTask(); // Note: I'm also assuming build runs don't ever get nested (i.e. re-run etc) BuildEntity = (CustomBuildEntity)XParent.GetEntity(); }
public MSBuildAppTask(BuildRunEntity run) : base(run) { InitializeTask(); MSBuildSettings = XParent .AncestorsAndSelf() .SelectEntities() .Where(e => e != null) .OfType <IMSBuildSettings>() .FirstOrDefault(); }
protected override void OnPerformSetup() { base.OnPerformSetup(); // Create the run entity XElement xrun = CreateXRun(); Run = (BuildRunEntity)Controller.Model.EntityBuilder.CreateEntityAndBindToElement(xrun); Run.LoadChildren(true); // Need to also set our self so the Run has access to it before it adds itself to the xml tree. Run.Task = this; // Add the run to the parent entity. if (XParent != null) { XParent.Add(Run.DataElement); } }