Browse Source

Merge remote-tracking branch 'upstream/master' into mansheng

newNRvisualizers
Mansheng Yang 13 years ago
parent
commit
b0e12f08e9
  1. 836
      ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs
  2. 12
      ICSharpCode.NRefactory/TypeSystem/ExtensionMethods.cs

836
ICSharpCode.NRefactory.CSharp/Completion/CSharpCompletionEngine.cs

File diff suppressed because it is too large Load Diff

12
ICSharpCode.NRefactory/TypeSystem/ExtensionMethods.cs

@ -92,7 +92,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -92,7 +92,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
}
#endregion
#region IsOpen / IsUnbound
#region IsOpen / IsUnbound / IsKnownType
sealed class TypeClassificationVisitor : TypeVisitor
{
internal bool isOpen;
@ -140,6 +140,16 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -140,6 +140,16 @@ namespace ICSharpCode.NRefactory.TypeSystem
throw new ArgumentNullException("type");
return type is ITypeDefinition && type.TypeParameterCount > 0;
}
/// <summary>
/// Gets whether the type is the specified known type.
/// For generic known types, this returns true any parameterization of the type (and also for the definition itself).
/// </summary>
public static bool IsKnownType(this IType type, KnownTypeCode knownType)
{
var def = type.GetDefinition();
return def != null && def.KnownTypeCode == knownType;
}
#endregion
#region Import

Loading…
Cancel
Save