Browse Source

Add InsertAfter/InsertBefore to AstNodeCollection.

pull/100/head
Daniel Grunwald 15 years ago
parent
commit
c0a05d6672
  1. 10
      NRefactory/ICSharpCode.NRefactory/CSharp/Ast/AstNodeCollection.cs
  2. 2
      NRefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs
  3. 4
      NRefactory/ICSharpCode.NRefactory/TypeSystem/ITypeResolveContext.cs

10
NRefactory/ICSharpCode.NRefactory/CSharp/Ast/AstNodeCollection.cs

@ -193,5 +193,15 @@ namespace ICSharpCode.NRefactory.CSharp @@ -193,5 +193,15 @@ namespace ICSharpCode.NRefactory.CSharp
}
return false;
}
public void InsertAfter(T existingItem, T newItem)
{
node.InsertChildAfter(existingItem, newItem, role);
}
public void InsertBefore(T existingItem, T newItem)
{
node.InsertChildBefore(existingItem, newItem, role);
}
}
}

2
NRefactory/ICSharpCode.NRefactory/TypeSystem/CecilLoader.cs

@ -35,7 +35,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -35,7 +35,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
public bool IncludeInternalMembers { get; set; }
/// <summary>
/// Gets/Sets the documentation provider that is used to retrive the XML documentation for all members.
/// Gets/Sets the documentation provider that is used to retrieve the XML documentation for all members.
/// </summary>
public IDocumentationProvider DocumentationProvider { get; set; }

4
NRefactory/ICSharpCode.NRefactory/TypeSystem/ITypeResolveContext.cs

@ -44,7 +44,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -44,7 +44,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// <param name="nameComparer">Language-specific rules for how namespace names are compared</param>
/// <returns>List of classes within that namespace.</returns>
/// <remarks>
/// If this method is called within <c>using (pc.Synchronize())</c>, then the returned enumerable is valid
/// If this method is called within <c>using (var spc = pc.Synchronize())</c>, then the returned enumerable is valid
/// only until the end of the synchronize block.
/// </remarks>
IEnumerable<ITypeDefinition> GetClasses(string nameSpace, StringComparer nameComparer);
@ -53,7 +53,7 @@ namespace ICSharpCode.NRefactory.TypeSystem @@ -53,7 +53,7 @@ namespace ICSharpCode.NRefactory.TypeSystem
/// Retrieves all namespaces.
/// </summary>
/// <remarks>
/// If this method is called within <c>using (pc.Synchronize())</c>, then the returned enumerable is valid
/// If this method is called within <c>using (var spc = pc.Synchronize())</c>, then the returned enumerable is valid
/// only until the end of the synchronize block.
/// </remarks>
IEnumerable<string> GetNamespaces();

Loading…
Cancel
Save