Browse Source

Fixed missing namespace problem.

pull/597/head
Abhinav Tripathi 10 years ago
parent
commit
e9152a79b5
  1. 3
      src/Generator/Generators/CSharp/CSharpMarshal.cs
  2. 4
      tests/CSharp/CSharp.cpp
  3. 16
      tests/CSharp/CSharp.h
  4. 2
      tests/Tests.h

3
src/Generator/Generators/CSharp/CSharpMarshal.cs

@ -501,8 +501,9 @@ namespace CppSharp.Generators.CSharp @@ -501,8 +501,9 @@ namespace CppSharp.Generators.CSharp
{
if (Context.Parameter.Usage == ParameterUsage.Out)
{
var qualifiedIdentifier = (@class.OriginalClass ?? @class).Visit(typePrinter);
Context.SupportBefore.WriteLine("var {0} = new {1}.Internal();",
Generator.GeneratedIdentifier(Context.ArgName), @class.Name);
Generator.GeneratedIdentifier(Context.ArgName), qualifiedIdentifier);
}
else
{

4
tests/CSharp/CSharp.cpp

@ -956,3 +956,7 @@ VirtualDtorAddedInDerived::~VirtualDtorAddedInDerived() @@ -956,3 +956,7 @@ VirtualDtorAddedInDerived::~VirtualDtorAddedInDerived()
}
bool VirtualDtorAddedInDerived::dtorCalled = false;
void NamespaceB::B::Function(CS_OUT NamespaceA::A &a)
{
}

16
tests/CSharp/CSharp.h

@ -855,3 +855,19 @@ public: @@ -855,3 +855,19 @@ public:
virtual ~VirtualDtorAddedInDerived();
static bool dtorCalled;
};
namespace NamespaceA
{
CS_VALUE_TYPE class DLL_API A
{
};
}
namespace NamespaceB
{
class DLL_API B
{
public:
void Function(CS_OUT NamespaceA::A &a);
};
}

2
tests/Tests.h

@ -24,4 +24,4 @@ @@ -24,4 +24,4 @@
#define CS_OUT
#define CS_IN_OUT
#define CS_VALUETYPE
#define CS_VALUE_TYPE

Loading…
Cancel
Save