Adding a BaseList and Formatter

Topics: APIs
Aug 3, 2014 at 10:11 AM
Hello. First, thanks for all the amazing work that's going into Roslyn.

I think I might have stumbled upon a small issue in how the Formatter handles class BaseList. I have a class that I want to turn into a "INotifyPropertyChanged" (in a ICodeRefactoringProvider). Consider the following code:
if (declaration.BaseList == null)
   newDeclaration = newDeclaration.WithBaseList(
                                    new[] { SyntaxFactory.ParseTypeName("INotifyPropertyChanged") })));
"Declaration" is the ClassDeclarationSyntax defining the class I want to refactor. At the end of the execution, I am returning a new Solution like this:
return document.WithSyntaxRoot(
But the result is not exactly what I would have expected:
        public class Notification
: INotifyPropertyChanged
            . . . 
I haven't found a way to get around this problem. Is this a bug or did I just miss something with my code?

I am using the 0.6 version of the Roslyn assemblies with VS 2013.