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