101 references to ObjectType
Microsoft.Build.Engine.OM.UnitTests (101)
ObjectModelRemoting\Helpers\ViewValidation.construction.cs (18)
25
public ElementLinkPair<CT> AppendNewChaildWithVerify<CT>(
ObjectType
where, string id, Func<ProjectRootElement, string, CT> adder, Func<CT, string, bool> matcher)
41
public ElementLinkPair<CT> AppendNewNamedChaildWithVerify<CT>(
ObjectType
where, string name, Func<ProjectRootElement, string, CT> adder)
45
public ElementLinkPair<CT> AppendNewLabeledChaildWithVerify<CT>(
ObjectType
where, string label, Func<ProjectRootElement, string, CT> adder)
58
public ElementLinkPair<CT> AddNewChaildWithVerify<CT>(
ObjectType
where, string id, Func<T, string, CT> adder, Func<CT, string, bool> matcher)
70
public ElementLinkPair<CT> AddNewNamedChaildWithVerify<CT>(
ObjectType
where, string name, Func<T, string, CT> adder)
74
public ElementLinkPair<CT> AddNewLabeledChaildWithVerify<CT>(
ObjectType
where, string label, Func<T, string, CT> adder)
89
c1 = AppendNewChaildWithVerify(
ObjectType
.View, id.Ver(1), adder, matcher);
90
c2 = AppendNewChaildWithVerify(
ObjectType
.Real, id.Ver(2), adder, matcher);
96
c1 = AppendNewNamedChaildWithVerify(
ObjectType
.View, name.Ver(1), adder);
97
c2 = AppendNewNamedChaildWithVerify(
ObjectType
.Real, name.Ver(2), adder);
103
c1 = AppendNewLabeledChaildWithVerify(
ObjectType
.View, label.Ver(1), adder);
104
c2 = AppendNewLabeledChaildWithVerify(
ObjectType
.Real, label.Ver(2), adder);
110
c1 = AddNewChaildWithVerify(
ObjectType
.View, id.Ver(1), adder, matcher);
111
c2 = AddNewChaildWithVerify(
ObjectType
.Real, id.Ver(2), adder, matcher);
117
c1 = AddNewNamedChaildWithVerify(
ObjectType
.View, name.Ver(1), adder);
118
c2 = AddNewNamedChaildWithVerify(
ObjectType
.Real, name.Ver(2), adder);
124
c1 = AddNewLabeledChaildWithVerify(
ObjectType
.View, label.Ver(1), adder);
125
c2 = AddNewLabeledChaildWithVerify(
ObjectType
.Real, label.Ver(2), adder);
ObjectModelRemoting\Helpers\ViewValidation.cs (2)
31
public T Get(
ObjectType
type) => type ==
ObjectType
.Real ? this.Real : this.View;
ObjectModelRemoting\Helpers\ViewValidation.evaluation.cs (6)
27
private ProjectItem VerifyAfterAddSingleItem(
ObjectType
where, ICollection<ProjectItem> added, IEnumerable<KeyValuePair<string, string>> metadata)
52
public ProjectItem AddSingleItemWithVerify(
ObjectType
where, string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata = null)
59
public ProjectItem AddSingleItemFastWithVerify(
ObjectType
where, string itemType, string unevaluatedInclude, IEnumerable<KeyValuePair<string, string>> metadata = null)
66
public ProjectItem GetSingleItemWithVerify(
ObjectType
which, string evaluatedInclude)
78
return which ==
ObjectType
.View ? viewItems.First() : realItems.First();
81
public ProjectProperty SetPropertyWithVerify(
ObjectType
where, string name, string unevaluatedValue)
ObjectModelRemoting\LinkedConstructionModify_Tests.cs (41)
148
var newTarget1 = xmlPair.AddNewChaildWithVerify<ProjectTargetElement>(
ObjectType
.View, NewTargetName, (p, n) => p.AddTarget(n), (t, n) => string.Equals(t.Name, n));
223
var newTarget = xmlPair.AddNewChaildWithVerify<ProjectTargetElement>(
ObjectType
.View, "TargetToTestTask", (p, n) => p.AddTarget(n), (t, n) => string.Equals(t.Name, n));
224
var newTask = newTarget.AddNewNamedChaildWithVerify<ProjectTaskElement>(
ObjectType
.View, NewTasktName, (t, n) => t.AddTask(n));
319
var newTarget = xmlPair.AddNewChaildWithVerify<ProjectTargetElement>(
ObjectType
.View, "TargetToTestTask", (p, n) => p.AddTarget(n), (t, n) => string.Equals(t.Name, n));
320
var newTask = newTarget.AddNewNamedChaildWithVerify<ProjectTaskElement>(
ObjectType
.Real, "NewTaskName", (t, n) => t.AddTask(n));
324
var newOutputItem = newTask.AddNewChaildWithVerify<ProjectOutputElement>(
ObjectType
.View, NewOutputItem, (t, n) => t.AddOutputItem(n, ItemType), (oi, n) => oi.TaskParameter == n);
331
var newOutputProp = newTask.AddNewChaildWithVerify<ProjectOutputElement>(
ObjectType
.View, NewOutputProperty, (t, n) => t.AddOutputProperty(n, PropertyName), (oi, n) => oi.TaskParameter == n);
351
var item1 = xmlPair.AddNewChaildWithVerify<ProjectItemElement>(
ObjectType
.View, "newItem", (p, i) => p.AddItem("cpp", i), (pi, i) => pi.Include == i);
352
var metadata = item1.AddNewChaildWithVerify<ProjectMetadataElement>(
ObjectType
.View, "metadata", (p, n) => p.AddMetadata(n, "value"), (md, n) => md.Name == n);
391
var otherWise = choose.AppendNewChaildWithVerify<ProjectOtherwiseElement>(
ObjectType
.View, "when", (p, l) => p.CreateOtherwiseElement(), (p, l) => true);
413
var choose = xmlPair.AppendNewChaildWithVerify<ProjectChooseElement>(
ObjectType
.View, "choose", (p, s) => p.CreateChooseElement(), (p, s) => true);
414
var when = choose.AppendNewChaildWithVerify<ProjectWhenElement>(
ObjectType
.View, "when", (p, s) => p.CreateWhenElement("true"), (p, s) => true);
452
var choose = xmlPair.AppendNewChaildWithVerify<ProjectChooseElement>(
ObjectType
.View, "choose", (p, s) => p.CreateChooseElement(), (p, s) => true);
453
var otherwise = choose.AppendNewChaildWithVerify<ProjectOtherwiseElement>(
ObjectType
.View, "when", (p, s) => p.CreateOtherwiseElement(), (p, s) => true);
488
var usingTaskFile = xmlPair.AddNewChaildWithVerify<ProjectUsingTaskElement>(
ObjectType
.View, "NewUsingTask", (p, n) => p.AddUsingTask(n, "assemblyFile", null), (ut, n) => true);
500
var body = usingTaskFile.AddNewChaildWithVerify<ProjectUsingTaskBodyElement>(
ObjectType
.View, "eval", (ut, e) => ut.AddUsingTaskBody(e, "body"), (ut, e) => true);
505
var pg = usingTaskFile.AddNewChaildWithVerify<UsingTaskParameterGroupElement>(
ObjectType
.View, "pg", (ut, e) => ut.AddParameterGroup(), (ut, e) => true);
512
var usingTaskName = xmlPair.AddNewChaildWithVerify<ProjectUsingTaskElement>(
ObjectType
.View, "NewUsingTask", (p, n) => p.AddUsingTask(n, null, "assemblyName"), (ut, n) => true);
522
var usingTask = xmlPair.AddNewChaildWithVerify<ProjectUsingTaskElement>(
ObjectType
.View, "NewUsingTask", (p, n) => p.AddUsingTask(n, "assemblyFile", null), (ut, n) => true);
525
var taskBody = usingTask.AddNewChaildWithVerify<ProjectUsingTaskBodyElement>(
ObjectType
.View, "eval", (ut, e) => ut.AddUsingTaskBody(e, "body"), (ut, e) => true);
537
var usingTask = xmlPair.AddNewChaildWithVerify<ProjectUsingTaskElement>(
ObjectType
.View, "NewUsingTask", (p, n) => p.AddUsingTask(n, "assemblyFile", null), (ut, n) => true);
540
var taskParamGroup = usingTask.AddNewChaildWithVerify<UsingTaskParameterGroupElement>(
ObjectType
.View, "pg", (ut, e) => ut.AddParameterGroup(), (ut, e) => true);
558
var usingTask = xmlPair.AddNewChaildWithVerify<ProjectUsingTaskElement>(
ObjectType
.View, "NewUsingTask", (p, n) => p.AddUsingTask(n, "assemblyFile", null), (ut, n) => true);
560
var taskParamGroup = usingTask.AddNewChaildWithVerify<UsingTaskParameterGroupElement>(
ObjectType
.View, "pg", (ut, e) => ut.AddParameterGroup(), (ut, e) => true);
561
var paraElement = taskParamGroup.AddNewNamedChaildWithVerify<ProjectUsingTaskParameterElement>(
ObjectType
.View, "param", (tpg, n) => tpg.AddParameter(n));
574
var extensionXml = xmlPair.AppendNewChaildWithVerify<ProjectExtensionsElement>(
ObjectType
.View, "ext", (p, s) => p.CreateProjectExtensionsElement(), (pe, s) => true);
584
var import = xmlPair.AddNewChaildWithVerify<ProjectImportElement>(
ObjectType
.View, "import", (p, s) => p.AddImport(s), (pe, s) => true);
598
var importGroup = xmlPair.AddNewChaildWithVerify<ProjectImportGroupElement>(
ObjectType
.View, "import", (p, s) => p.AddImportGroup(), (pe, s) => true);
611
var itemDef = xmlPair.AddNewChaildWithVerify<ProjectItemDefinitionElement>(
ObjectType
.View, "source", (p, s) => p.AddItemDefinition(s), (pe, s) => true);
630
var itemDefGrp = xmlPair.AddNewChaildWithVerify<ProjectItemDefinitionGroupElement>(
ObjectType
.View, "grp", (p, s) => p.AddItemDefinitionGroup(), (pe, s) => true);
642
var target = xmlPair.AddNewChaildWithVerify<ProjectTargetElement>(
ObjectType
.View, "NewTarget", (p, n) => p.AddTarget(n), (t, n) => string.Equals(t.Name, n));
643
var itemGrp = target.AddNewLabeledChaildWithVerify<ProjectItemGroupElement>(
ObjectType
.View, "tagetigrp", (p, s) => p.AddItemGroup());
644
var itemInTargt = itemGrp.AddNewChaildWithVerify<ProjectItemElement>(
ObjectType
.View, "targetfile.cs", (p, s) => p.AddItem("cs", s), (pe, s) => pe.Include == s);
646
var item = xmlPair.AddNewChaildWithVerify<ProjectItemElement>(
ObjectType
.View, "file.cpp", (p, s) => p.AddItem("cpp", s), (pe, s) => pe.Include == s);
694
var itemGrp = xmlPair.AddNewLabeledChaildWithVerify<ProjectItemGroupElement>(
ObjectType
.View, "igrp", (p, s) => p.AddItemGroup());
716
var propGrp = xmlPair.AddNewLabeledChaildWithVerify<ProjectPropertyGroupElement>(
ObjectType
.View, "grp", (p, l) => p.AddPropertyGroup());
717
var prop = propGrp.AddNewChaildWithVerify<ProjectPropertyElement>(
ObjectType
.View, "prop", (pg, n) => pg.AddProperty(n, $"value{n}"), (p, n) => p.Name == n);
729
var propGrp = xmlPair.AddNewLabeledChaildWithVerify<ProjectPropertyGroupElement>(
ObjectType
.View, "grp", (p, l) => p.AddPropertyGroup());
760
var sdkElement = xmlPair.AppendNewChaildWithVerify<ProjectSdkElement>(
ObjectType
.View, "sdk", (p, n) => p.CreateProjectSdkElement(n, "sdkVer"), (s, n) => true);
777
var newTarget = xmlPair.AddNewChaildWithVerify<ProjectTargetElement>(
ObjectType
.View, "TargetToTestTask", (p, n) => p.AddTarget(n), (t, n) => string.Equals(t.Name, n));
778
var onErr = newTarget.AppendNewChaildWithVerify<ProjectOnErrorElement>(
ObjectType
.View, "errTarget", (p, et) => p.CreateOnErrorElement(et), (oe, et) => oe.ExecuteTargetsAttribute == et);
ObjectModelRemoting\LinkedEvaluationModify_Tests.cs (32)
128
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.View, "foo.cpp"));
129
var fooView = pair.AddSingleItemWithVerify(
ObjectType
.View, "cpp", "foo.cpp");
131
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.View, "fooFast.cpp"));
132
var fooViewFast = pair.AddSingleItemFastWithVerify(
ObjectType
.View, "cpp", "fooFast.cpp");
134
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.View, "fooWithMetadata.cpp"));
135
var fooWithMetadataView = pair.AddSingleItemWithVerify(
ObjectType
.View, "cpp", "fooWithMetadata.cpp", testMedatada);
137
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.View, "fooWithMetadataFast.cpp"));
138
var fooWithMetadataViewFast = pair.AddSingleItemWithVerify(
ObjectType
.View, "cpp", "fooWithMetadataFast.cpp", testMedatada);
141
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.Real, "bar.cpp"));
142
var barReal = pair.AddSingleItemWithVerify(
ObjectType
.Real, "cpp", "bar.cpp");
144
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.Real, "barFast.cpp"));
145
var barRealFast = pair.AddSingleItemFastWithVerify(
ObjectType
.Real, "cpp", "barFast.cpp");
147
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.Real, "barWithMetadata.cpp"));
148
var barWithMetadataReal = pair.AddSingleItemWithVerify(
ObjectType
.Real, "cpp", "barWithMetadata.cpp", testMedatada);
150
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.Real, "barWithMetadataFast.cpp"));
151
var barWithMetadataRealFast = pair.AddSingleItemWithVerify(
ObjectType
.Real, "cpp", "barWithMetadataFast.cpp", testMedatada);
161
Assert.NotNull(pair.GetSingleItemWithVerify(
ObjectType
.View, "barWithMetadataFast.cpp"));
162
var barWithMetadataViewFast = pair.GetSingleItemWithVerify(
ObjectType
.View, "barWithMetadataFast.cpp");
172
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.View, "barWithMetadataFast.cpp"));
177
Assert.NotNull(pair.GetSingleItemWithVerify(
ObjectType
.View, "fooWithMetadata.cpp"));
178
var barWithMetadataView = pair.GetSingleItemWithVerify(
ObjectType
.View, "barWithMetadata.cpp");
189
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.View, "fooWithMetadata.cpp"));
190
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.View, "barWithMetadata.cpp"));
196
Assert.NotNull(pair.GetSingleItemWithVerify(
ObjectType
.Real, "fooWithMetadataFast.cpp"));
197
var fooWithMetadataRealFast = pair.GetSingleItemWithVerify(
ObjectType
.Real, "fooWithMetadataFast.cpp");
210
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.Real, "fooWithMetadataFast.cpp"));
215
Assert.NotNull(pair.GetSingleItemWithVerify(
ObjectType
.Real, "barFast.cpp"));
216
var fooRealFast = pair.GetSingleItemWithVerify(
ObjectType
.Real, "fooFast.cpp");
227
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.Real, "fooFast.cpp"));
228
Assert.Null(pair.GetSingleItemWithVerify(
ObjectType
.Real, "barFast.cpp"));
233
var fooReal = pair.GetSingleItemWithVerify(
ObjectType
.Real, "foo.cpp");
353
var fooView = pair.SetPropertyWithVerify(
ObjectType
.View, "fooProp", "fooValue$(xxx)");
ObjectModelRemoting\LinkedSpecialCasesScenarios.cs (2)
165
var newCopyFrom = xmlPair.AddNewLabeledChaildWithVerify<ProjectItemGroupElement>(
ObjectType
.View, "newGrop", (p, l) => p.AddItemGroup());
183
var newDeepCopy = xmlPair.AddNewLabeledChaildWithVerify<ProjectItemGroupElement>(
ObjectType
.View, "newGrop", (p, l) => p.AddItemGroup());