Example #1
0
 private static void AssertHasNoDynamicAttribute(IMethodSymbol method)
 {
     Assert.DoesNotContain(
         "System.Runtime.CompilerServices.DynamicAttribute",
         method.GetSynthesizedAttributes(forReturnType: true).Select(a => a.AttributeClass.ToTestDisplayString()));
 }
 internal static SynthesizedAttributeData GetAttributeIfAny(IMethodSymbol method, string typeName)
 {
     return method.GetSynthesizedAttributes(forReturnType: true).
         Where(a => a.AttributeClass.ToTestDisplayString() == typeName).
         SingleOrDefault();
 }
Example #3
0
 private static void AssertHasNoDynamicAttribute(IMethodSymbol method)
 {
     Assert.DoesNotContain(
         "System.Runtime.CompilerServices.DynamicAttribute",
         method.GetSynthesizedAttributes(forReturnType: true).Select(a => a.AttributeClass.ToTestDisplayString()));
 }
 internal static SynthesizedAttributeData GetAttributeIfAny(IMethodSymbol method, string typeName)
 {
     return(method.GetSynthesizedAttributes(forReturnType: true).
            Where(a => a.AttributeClass.ToTestDisplayString() == typeName).
            SingleOrDefault());
 }