3 instantiations of ProjectWhenElement
Microsoft.Build (3)
Construction\ProjectWhenElement.cs (1)
71var when = new ProjectWhenElement(element, containingProject) { Condition = condition };
Evaluation\ProjectParser.cs (1)
819ProjectWhenElement when = new ProjectWhenElement(element, parent, _project);
ObjectModelRemoting\LinkedObjectFactory.cs (1)
228return new ProjectWhenElement(link);
43 references to ProjectWhenElement
Microsoft.Build (17)
Construction\ProjectChooseElement.cs (3)
61public ICollection<ProjectWhenElement> WhenElements => GetChildrenOfType<ProjectWhenElement>(); 107ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement || parent is ProjectWhenElement || parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectItemElement.cs (1)
476ErrorUtilities.VerifyThrowInvalidOperation(parent.Parent is ProjectRootElement || parent.Parent is ProjectTargetElement || parent.Parent is ProjectWhenElement || parent.Parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectItemGroupElement.cs (1)
177ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement || parent is ProjectTargetElement || parent is ProjectWhenElement || parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectOtherwiseElement.cs (1)
102ErrorUtilities.VerifyThrowInvalidOperation(!(nextSibling is ProjectWhenElement) && !(previousSibling is ProjectOtherwiseElement) && !(nextSibling is ProjectOtherwiseElement), "OM_NoOtherwiseBeforeWhenOrOtherwise");
Construction\ProjectPropertyGroupElement.cs (1)
110ErrorUtilities.VerifyThrowInvalidOperation(parent is ProjectRootElement || parent is ProjectTargetElement || parent is ProjectWhenElement || parent is ProjectOtherwiseElement, "OM_CannotAcceptParent");
Construction\ProjectRootElement.cs (2)
1477public ProjectWhenElement CreateWhenElement(string condition) 1479return Link != null ? RootLink.CreateWhenElement(condition) : ProjectWhenElement.CreateDisconnected(condition, this);
Construction\ProjectWhenElement.cs (2)
67internal static ProjectWhenElement CreateDisconnected(string condition, ProjectRootElement containingProject) 71var when = new ProjectWhenElement(element, containingProject) { Condition = condition };
Evaluation\Evaluator.cs (1)
1436foreach (ProjectWhenElement whenElement in chooseElement.WhenElements)
Evaluation\ProjectParser.cs (2)
815private ProjectWhenElement ParseProjectWhenElement(XmlElementWithLocation element, ProjectChooseElement parent, int nestingDepth) 819ProjectWhenElement when = new ProjectWhenElement(element, parent, _project);
ObjectModelRemoting\ConstructionObjectLinks\ProjectElementContainerLink.cs (1)
122/// Allow for creating a local representation to external object of type <see cref="ProjectWhenElement"/>
ObjectModelRemoting\ConstructionObjectLinks\ProjectRootElementLink.cs (1)
183public abstract ProjectWhenElement CreateWhenElement(string condition);
ObjectModelRemoting\LinkedObjectFactory.cs (1)
226public ProjectWhenElement Create(ProjectWhenElementLink link)
Microsoft.Build.Engine.OM.UnitTests (26)
Construction\ConstructionEditing_Tests.cs (9)
182ProjectWhenElement when = project.CreateWhenElement("c"); 198ProjectWhenElement when = project.CreateWhenElement("c"); 214ProjectWhenElement when = project.CreateWhenElement("c"); 232ProjectWhenElement when = project.CreateWhenElement("c"); 1241ProjectWhenElement when = project.CreateWhenElement("c"); 1291ProjectWhenElement when = project.CreateWhenElement("c"); 1307ProjectWhenElement when = project.CreateWhenElement("c"); 1931ProjectWhenElement when = project.CreateWhenElement("c"); 2301ProjectWhenElement when = project.CreateWhenElement("c");
Construction\ProjectChooseElement_Tests.cs (2)
224List<ProjectWhenElement> whens = Helpers.MakeList(choose.WhenElements); 277ProjectWhenElement when = Helpers.GetFirst(choose.WhenElements);
Construction\ProjectRootElement_Tests.cs (1)
1190var when1 = pre.CreateWhenElement("some condition");
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (2)
577public static void Verify(ProjectWhenElement viewXml, ProjectWhenElement realXml, ValidationContext context = null)
ObjectModelRemoting\Helpers\ViewValidation.cs (1)
144if (VerifyCheckType<ProjectWhenElement>(view, real, context, Verify))
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (6)
130xmlPair.CreateWithVerify<ProjectWhenElement>((p) => p.CreateWhenElement("condition")); 384choose.Append2NewLabeledChildrenWithVerify<ProjectWhenElement>("when", (p, l) => p.CreateWhenElement($"'$(c)' == '{l}'"), out var when1, out var when2); 386when1.VerifySame(choose.QuerySingleChildrenWithValidation<ProjectWhenElement>((ch) => ch.Label == when1.View.Label)); 387when2.VerifySame(choose.QuerySingleChildrenWithValidation<ProjectWhenElement>((ch) => ch.Label == when2.View.Label)); 399when1.VerifySame(choose.QuerySingleChildrenWithValidation<ProjectWhenElement>((ch) => ch.Label == when1.View.Label)); 414var when = choose.AppendNewChaildWithVerify<ProjectWhenElement>(ObjectType.View, "when", (p, s) => p.CreateWhenElement("true"), (p, s) => true);
ObjectModelRemoting\LinkedConstructionReadOnly_Tests.cs (2)
231var realCollection = preReal.AllChildren.OfType<ProjectWhenElement>().ToList(); 232var viewCollection = preView.AllChildren.OfType<ProjectWhenElement>().ToList();
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\MockProjectRootElementLink.cs (2)
310public override ProjectWhenElement CreateWhenElement(string condition) 312return (ProjectWhenElement)this.Proxy.CreateWhenElement(condition).Import(this.Linker);
ObjectModelRemoting\RemoteProjectsProviderMock\ConstructionLinkMocks\ProjectElemetExportHelper.cs (1)
72ElementInfo.New<ProjectWhenElement , MockProjectWhenElementLinkRemoter>(),