#68 [c#] enhancement to C# namespace support


Submiitter: mtraudt@quantifisolutions.com

The attached patch allows the user to specify on a per-
class basis the target namespace for C# proxy classes.
A new feature is defined: "cs:namespace". Class-
specific namespaces override the default namespace
passed via the command-line.

Note that all references to proxy classes (e.g. method
parameters) are fully qualified with the correct
namespace. Therefore, no additional "using" statements
are required.


  • Nobody/Anonymous

    modified version of csharp.cxx plus sample code to demonstrate feature

  • William Fulton

    William Fulton - 2004-03-13

    Logged In: YES

    Thanks for the patch. It needs a bit of extending before I
    can comit it. In particular the new directive needs to work
    for type wrapper classes as well as proxy classes. One other
    minor detail is that for consistency the using statements
    should be generated either inside or outside of the
    namespace scope for all the different types of classes,
    namely type wrapper, proxy, intermediary and module classes.
    The patch looks as though it changes this for the proxy classes.

    I suspect the following will be okay, but tests are needed
    to see whether it is possible to use the new directive for
    selected classes when different invocations of SWIG are used
    and the targeted classes are %import ed into a different

  • William Fulton

    William Fulton - 2004-03-15
    • assigned_to: nobody --> wsfulton
  • abv

    abv - 2006-06-23

    Logged In: YES

    Dear William,

    Sorry for troubling, but could you please comment on the
    current status of that patch? I believe this functionality
    would be quite useful (I need it, actually). Can I help in
    finalising/testing the patch?

    Best Regards,

  • William Fulton

    William Fulton - 2006-06-23

    Logged In: YES

    This patch will be good to add, but I just havn't got around
    to dealing with it. If you can modify the patch and update
    it for the current cvs version or 1.3.29 and address the
    issues mentioned, I'll find some time to take a look. I'll
    need tests too, so if you can add in a test-suite test with
    a C# runtime test, that will save me from doing it.

  • Olly Betts

    Olly Betts - 2006-09-25
    • summary: enhancement to C# namespace support --> [c#] enhancement to C# namespace support

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks