示例#1
0
 public override void VisitTypeParameter(ITypeParameterSymbol symbol)
 {
     if (_indent < 5)
     {
         _output.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name);
     }
     else
     {
         _output.Append(symbol.GetType().Name + " " + symbol.Name);
     }
 }
示例#2
0
 public override int VisitTypeParameter(ITypeParameterSymbol symbol, StringBuilder argument)
 {
     if (_indent < 5)
     {
         argument.AppendLine(new string(' ', 2 * _indent) + symbol.GetType().Name + " " + symbol.Name);
     }
     else
     {
         argument.Append(symbol.GetType().Name + " " + symbol.Name);
     }
     return(_indent);
 }
 /// Uses reflection to obtain the EffectiveInterfacesNoUseSiteDiagnostics property and its value.
 /// http://source.roslyn.codeplex.com/#Microsoft.CodeAnalysis.CSharp/Symbols/TypeParameterSymbol.cs#300
 private static MethodInfo GetReflectedEffectiveInterfaceMethodInfo(ITypeParameterSymbol typeSymbol)
 {
     return(typeSymbol.GetType().GetRuntimeProperties().FirstOrDefault(methodInfo => methodInfo.Name == "EffectiveInterfacesNoUseSiteDiagnostics").GetMethod);
 }