public void IsInterface(Type type, bool expected)
        {
            var symbol = Compilation.GetTypeByMetadataName(type);

            symbol.ShouldNotBeNull();

            SyntaxTools.IsInterface(symbol).ShouldBe(expected);
        }
Beispiel #2
0
 public static bool IsServiceContractInterface(INamedTypeSymbol type)
 {
     return(SyntaxTools.IsInterface(type) &&
            !type.IsUnboundGenericType &&
            GetServiceContractAttribute(type) != null);
 }