diff --git a/ICSharpCode.NRefactory/TypeSystem/IMember.cs b/ICSharpCode.NRefactory/TypeSystem/IMember.cs
index d6225d6194..66e5fcf876 100644
--- a/ICSharpCode.NRefactory/TypeSystem/IMember.cs
+++ b/ICSharpCode.NRefactory/TypeSystem/IMember.cs
@@ -179,5 +179,11 @@ namespace ICSharpCode.NRefactory.TypeSystem
get;
}
+ ///
+ /// If true a type substitution on this member has been performed.
+ ///
+ bool IsSpecialized {
+ get;
+ }
}
}
diff --git a/ICSharpCode.NRefactory/TypeSystem/IType.cs b/ICSharpCode.NRefactory/TypeSystem/IType.cs
index e13ebb7113..e812ba15a0 100644
--- a/ICSharpCode.NRefactory/TypeSystem/IType.cs
+++ b/ICSharpCode.NRefactory/TypeSystem/IType.cs
@@ -96,6 +96,11 @@ namespace ICSharpCode.NRefactory.TypeSystem
///
IList TypeArguments { get; }
+ ///
+ /// If true the type represents an instance of a generic type.
+ ///
+ bool IsParameterized { get; }
+
///
/// Calls ITypeVisitor.Visit for this type.
///
diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedMember.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedMember.cs
index 12b39df4ae..e482f01fd3 100644
--- a/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedMember.cs
+++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedMember.cs
@@ -122,6 +122,10 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
get { return TypeParameterSubstitution.Identity; }
}
+ public bool IsSpecialized {
+ get { return false; }
+ }
+
public virtual IMemberReference ToMemberReference()
{
var declTypeRef = this.DeclaringType.ToTypeReference();
diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedTypeParameter.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedTypeParameter.cs
index 77662a5422..4c7427ff07 100644
--- a/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedTypeParameter.cs
+++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractResolvedTypeParameter.cs
@@ -207,6 +207,10 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
get { return 0; }
}
+ bool IType.IsParameterized {
+ get { return false; }
+ }
+
readonly static IList emptyTypeParameters = new ITypeParameter[0];
IList IType.TypeParameters {
get { return emptyTypeParameters; }
diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractType.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractType.cs
index 8e42020ea8..e174ab85b7 100644
--- a/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractType.cs
+++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/AbstractType.cs
@@ -65,14 +65,18 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
readonly static IList emptyTypeArguments = new IType[0];
- IList IType.TypeArguments {
+ public virtual IList TypeArguments {
get { return emptyTypeArguments; }
}
public virtual IType DeclaringType {
get { return null; }
}
-
+
+ public virtual bool IsParameterized {
+ get { return false; }
+ }
+
public virtual ITypeDefinition GetDefinition()
{
return null;
diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedTypeDefinition.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedTypeDefinition.cs
index cee886cb57..874dbe42e6 100644
--- a/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedTypeDefinition.cs
+++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/DefaultResolvedTypeDefinition.cs
@@ -494,10 +494,14 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
readonly static IList emptyTypeArguments = new IType[0];
- IList IType.TypeArguments {
+ public IList TypeArguments {
get { return emptyTypeArguments; }
}
+ public bool IsParameterized {
+ get { return false; }
+ }
+
#region DirectBaseTypes
IList directBaseTypes;
diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMember.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMember.cs
index f9ba5382f5..ff0caab320 100644
--- a/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMember.cs
+++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/SpecializedMember.cs
@@ -301,7 +301,11 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
public IAssembly ParentAssembly {
get { return baseMember.ParentAssembly; }
}
-
+
+ public bool IsSpecialized {
+ get { return true; }
+ }
+
public override bool Equals(object obj)
{
SpecializedMember other = obj as SpecializedMember;
diff --git a/ICSharpCode.NRefactory/TypeSystem/ParameterizedType.cs b/ICSharpCode.NRefactory/TypeSystem/ParameterizedType.cs
index f53a68dcc5..2901a74dd0 100644
--- a/ICSharpCode.NRefactory/TypeSystem/ParameterizedType.cs
+++ b/ICSharpCode.NRefactory/TypeSystem/ParameterizedType.cs
@@ -147,6 +147,12 @@ namespace ICSharpCode.NRefactory.TypeSystem
}
}
+ public bool IsParameterized {
+ get {
+ return true;
+ }
+ }
+
///
/// Same as 'parameterizedType.TypeArguments[index]', but is a bit more efficient (doesn't require the read-only wrapper).
///