[MonoDevelop] CSharpCodeGenerator.AddGlobalNamespaceImport vs local

Mike Krüger mkrueger at xamarin.com
Thu Jun 21 19:27:24 UTC 2012


Hi

Forget about both - try to do all document changes with the ast of the file.
See: 
http://mikemdblog.blogspot.de/2012/04/how-to-write-c-issue-provider.html

Other than that the local import should add the using inside the 
namespace, if any.

Regards
Mike
> Hi,
>
> Can anyone tell me what the difference is between 
> AddGlobalNamespaceImport and AddLocalNamespaceImport? So far I've only 
> seen a situation where AddGlobalNamespaceImport is called.
>
> If I alter the code to call AddLocalNamespaceImport instead (just to 
> see what it produces), it seems to place the using statement in the 
> same place, but it indents it to the level as though it was inside the 
> namespace.
>
> If possible, could someone send me a quick example of what each should 
> produce?
>
> The reason I'm asking about this is that I'm wanting to add to the C# 
> policy so that you can get it to conform to StyleCop rules since 
> that's what I normally use.
>
> Cheers,
> Adam
>
>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monodevelop-list/attachments/20120621/a75a1a43/attachment.html>


More information about the Monodevelop-list mailing list