From 2b53801510b8c388318c7ee85e48dbe3f07196f3 Mon Sep 17 00:00:00 2001 From: Dimitar Dobrev Date: Sat, 2 Nov 2013 17:56:43 +0200 Subject: [PATCH] Prefixed "System.Runtime.InteropServices" with "global::" to prevent name collision. Signed-off-by: Dimitar Dobrev --- src/Generator/Generators/CSharp/CSharpTextTemplate.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs index 69935700..86b8d4e4 100644 --- a/src/Generator/Generators/CSharp/CSharpTextTemplate.cs +++ b/src/Generator/Generators/CSharp/CSharpTextTemplate.cs @@ -1357,7 +1357,7 @@ namespace CppSharp.Generators.CSharp PushBlock(CSharpBlockKind.VTableDelegate); WriteLine("[SuppressUnmanagedCodeSecurity]"); - WriteLine("[UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.{0})]", + WriteLine("[UnmanagedFunctionPointerAttribute(global::System.Runtime.InteropServices.CallingConvention.{0})]", Helpers.ToCSharpCallConv(method.CallingConvention)); CSharpTypePrinterResult retType; @@ -1430,7 +1430,7 @@ namespace CppSharp.Generators.CSharp delegateName = delegateInstance + "Delegate"; delegateRaise = delegateInstance + "RaiseInstance"; - WriteLine("[UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.Cdecl)]"); + WriteLine("[UnmanagedFunctionPointerAttribute(global::System.Runtime.InteropServices.CallingConvention.Cdecl)]"); WriteLine("delegate void {0}({1});", delegateName, args); WriteLine("{0} {1};", delegateName, delegateRaise); NewLine(); @@ -2195,7 +2195,7 @@ namespace CppSharp.Generators.CSharp else if (typedef.Type.IsPointerTo(out functionType)) { PushBlock(CSharpBlockKind.Typedef); - WriteLine("[UnmanagedFunctionPointerAttribute(System.Runtime.InteropServices.CallingConvention.{0})]", + WriteLine("[UnmanagedFunctionPointerAttribute(global::System.Runtime.InteropServices.CallingConvention.{0})]", Helpers.ToCSharpCallConv(functionType.CallingConvention)); TypePrinter.PushContext(CSharpTypePrinterContextKind.Native); WriteLine("{0}unsafe {1};", @@ -2324,7 +2324,7 @@ namespace CppSharp.Generators.CSharp Write("[DllImport(\"{0}\", ", libName); var callConv = Helpers.ToCSharpCallConv(function.CallingConvention); - WriteLine("CallingConvention = System.Runtime.InteropServices.CallingConvention.{0},", + WriteLine("CallingConvention = global::System.Runtime.InteropServices.CallingConvention.{0},", callConv); WriteLineIndent("EntryPoint=\"{0}\")]", function.Mangled);