public void Test01_AssemblyAttribute() { Test01 test = new Test01(); var c1AsmRef = test.c2.Compilation.GetReferencedAssemblySymbol(test.c1); Assert.IsType <RetargetingAssemblySymbol>(c1AsmRef); test.TestAttributeRetargeting(c1AsmRef); }
public void Test01_NamedTypeAttribute() { Test01 test = new Test01(); var testClass = test.c2.Compilation.GlobalNamespace.GetTypeMembers("TestClass").Single(); Assert.IsType <RetargetingNamedTypeSymbol>(testClass); test.TestAttributeRetargeting(testClass); }
public void Test01_ModuleAttribute() { Test01 test = new Test01(); var c1AsmRef = test.c2.Compilation.GetReferencedAssemblySymbol(test.c1); var c1ModuleSym = c1AsmRef.Modules[0]; Assert.IsType <RetargetingModuleSymbol>(c1ModuleSym); test.TestAttributeRetargeting(c1ModuleSym); }
public void Test01_MethodAttribute() { Test01 test = new Test01(); var testClass = test.c2.Compilation.GlobalNamespace.GetTypeMembers("TestClass").Single(); MethodSymbol testMethod = testClass.GetMembers("TestMethod").OfType <MethodSymbol>().Single(); Assert.IsType <RetargetingMethodSymbol>(testMethod); test.TestAttributeRetargeting(testMethod); }
public void Test01_PropertyAttribute() { Test01 test = new Test01(); var testClass = test.c2.Compilation.GlobalNamespace.GetTypeMembers("TestClass").Single(); PropertySymbol testProperty = testClass.GetMembers("TestProperty").OfType <PropertySymbol>().Single(); Assert.IsType <RetargetingPropertySymbol>(testProperty); test.TestAttributeRetargeting(testProperty); MethodSymbol testMethod = testProperty.GetMethod; Assert.IsType <RetargetingMethodSymbol>(testMethod); test.TestAttributeRetargeting_ReturnTypeAttributes(testMethod); }
public void Test01_ParameterAttribute() { Test01 test = new Test01(); var testClass = test.c2.Compilation.GlobalNamespace.GetTypeMembers("TestClass").Single(); MethodSymbol testMethod = testClass.GetMembers("TestMethod").OfType<MethodSymbol>().Single(); Assert.IsType<RetargetingMethodSymbol>(testMethod); ParameterSymbol testParameter = testMethod.Parameters[0]; Assert.IsType<RetargetingMethodParameterSymbol>(testParameter); test.TestAttributeRetargeting(testParameter); }
public void Test01_PropertyAttribute() { Test01 test = new Test01(); var testClass = test.c2.Compilation.GlobalNamespace.GetTypeMembers("TestClass").Single(); PropertySymbol testProperty = testClass.GetMembers("TestProperty").OfType<PropertySymbol>().Single(); Assert.IsType<RetargetingPropertySymbol>(testProperty); test.TestAttributeRetargeting(testProperty); MethodSymbol testMethod = testProperty.GetMethod; Assert.IsType<RetargetingMethodSymbol>(testMethod); test.TestAttributeRetargeting_ReturnTypeAttributes(testMethod); }
public void Test01_FieldAttribute() { Test01 test = new Test01(); var testClass = test.c2.Compilation.GlobalNamespace.GetTypeMembers("TestClass").Single(); FieldSymbol testField = testClass.GetMembers("testField").OfType<FieldSymbol>().Single(); Assert.IsType<RetargetingFieldSymbol>(testField); test.TestAttributeRetargeting(testField); }
public void Test01_NamedTypeAttribute() { Test01 test = new Test01(); var testClass = test.c2.Compilation.GlobalNamespace.GetTypeMembers("TestClass").Single(); Assert.IsType<RetargetingNamedTypeSymbol>(testClass); test.TestAttributeRetargeting(testClass); }
public void Test01_ModuleAttribute() { Test01 test = new Test01(); var c1AsmRef = test.c2.Compilation.GetReferencedAssemblySymbol(test.c1); var c1ModuleSym = c1AsmRef.Modules[0]; Assert.IsType<RetargetingModuleSymbol>(c1ModuleSym); test.TestAttributeRetargeting(c1ModuleSym); }
public void Test01_AssemblyAttribute() { Test01 test = new Test01(); var c1AsmRef = test.c2.Compilation.GetReferencedAssemblySymbol(test.c1); Assert.IsType<RetargetingAssemblySymbol>(c1AsmRef); test.TestAttributeRetargeting(c1AsmRef); }