public void IsInterface(Type type, bool expected) { var symbol = Compilation.GetTypeByMetadataName(type); symbol.ShouldNotBeNull(); SyntaxTools.IsInterface(symbol).ShouldBe(expected); }
public static bool IsServiceContractInterface(INamedTypeSymbol type) { return(SyntaxTools.IsInterface(type) && !type.IsUnboundGenericType && GetServiceContractAttribute(type) != null); }