16 references to ReplaceReference
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (16)
Compilation\CompilationAPITests.cs (14)
508
comp = comp.
ReplaceReference
(ref1, ref2);
1172
comp = comp.
ReplaceReference
(item, item);
1207
comp = comp.
ReplaceReference
(compRef2, ref2);
1212
comp = comp.
ReplaceReference
(ref1, compRef2);
1283
comp = comp.RemoveReferences(compRef1).
ReplaceReference
(modRef1, compRef1);
1290
comp = comp.
ReplaceReference
(compRef1, modRef1);
1424
comp = comp.AddReferences(listRef).AddReferences(ref2).RemoveReferences(ref1, ref3, ref4).
ReplaceReference
(ref2, ref2);
1428
Assert.Throws<ArgumentException>(() => comp.AddReferences(listRef).AddReferences(ref2).RemoveReferences(ref1, ref2, ref3, ref4).
ReplaceReference
(ref2, ref2));
1443
Assert.Throws<ArgumentException>(() => comp = comp.
ReplaceReference
(MscorlibRef, ref1));
1457
comp = comp.
ReplaceReference
(ref1, null);
1464
comp = comp.
ReplaceReference
(newReference: ref1, oldReference: null);
1478
comp = comp.
ReplaceReference
(ref1, ref2);
1486
comp.
ReplaceReference
(newReference: NetFramework.System, oldReference: ref2);
2056
c3 = c2.
ReplaceReference
(MscorlibRef, SystemCoreRef);
Compilation\GetImportScopesTests.cs (1)
404
return comp.
ReplaceReference
(reference, reference.WithAliases(ImmutableArray.CreateRange(aliases)));
Symbols\CompilationCreationTests.cs (1)
2626
c = c.
ReplaceReference
(systemCoreRef, systemRef);