Permalink
Browse files

Added function to create a DA object to the refactoring context.

  • Loading branch information...
1 parent 484c142 commit 14ca306cadab1b79e99617a7bd4870564cf9e0a7 @mkrueger mkrueger committed Apr 8, 2012
Showing with 18 additions and 1 deletion.
  1. +18 −1 ICSharpCode.NRefactory.CSharp/Refactoring/BaseRefactoringContext.cs
View
19 ICSharpCode.NRefactory.CSharp/Refactoring/BaseRefactoringContext.cs
@@ -34,6 +34,7 @@
using ICSharpCode.NRefactory.TypeSystem.Implementation;
using ICSharpCode.NRefactory.Editor;
using System.ComponentModel.Design;
+using ICSharpCode.NRefactory.CSharp.Analysis;
namespace ICSharpCode.NRefactory.CSharp.Refactoring
{
@@ -119,7 +120,23 @@ public Conversion GetConversion (Expression expression)
return resolver.GetConversion(expression, cancellationToken);
}
#endregion
-
+
+ #region Code Analyzation
+ /// <summary>
+ /// Creates a new definite assignment analysis object with a given root statement.
+ /// </summary>
+ /// <returns>
+ /// The definite assignment analysis object.
+ /// </returns>
+ /// <param name='root'>
+ /// The root statement.
+ /// </param>
+ public DefiniteAssignmentAnalysis CreateDefiniteAssignmentAnalysis (Statement root)
+ {
+ return new DefiniteAssignmentAnalysis (root, resolver, CancellationToken);
+ }
+ #endregion
+
/// <summary>
/// Translates the english input string to the context language.
/// </summary>

0 comments on commit 14ca306

Please sign in to comment.