Remove using directives from the generated C# code and fully qualify the use of all .NET framework types in order to minimize potential name collisions from input files defining types, namespace, etc with the same name as .NET framework members.
This commit is contained in:
parent
cb2df12630
commit
adb93980f2
14 changed files with 200 additions and 211 deletions
|
|
@ -149,7 +149,7 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_$module(
|
|||
static ExceptionArgumentDelegate argumentNullDelegate = new ExceptionArgumentDelegate(SetPendingArgumentNullException);
|
||||
static ExceptionArgumentDelegate argumentOutOfRangeDelegate = new ExceptionArgumentDelegate(SetPendingArgumentOutOfRangeException);
|
||||
|
||||
[DllImport("$dllimport", EntryPoint="SWIGRegisterExceptionCallbacks_$module")]
|
||||
[global::System.Runtime.InteropServices.DllImport("$dllimport", EntryPoint="SWIGRegisterExceptionCallbacks_$module")]
|
||||
public static extern void SWIGRegisterExceptionCallbacks_$module(
|
||||
ExceptionDelegate applicationDelegate,
|
||||
ExceptionDelegate arithmeticDelegate,
|
||||
|
|
@ -163,7 +163,7 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_$module(
|
|||
ExceptionDelegate overflowDelegate,
|
||||
ExceptionDelegate systemExceptionDelegate);
|
||||
|
||||
[DllImport("$dllimport", EntryPoint="SWIGRegisterExceptionArgumentCallbacks_$module")]
|
||||
[global::System.Runtime.InteropServices.DllImport("$dllimport", EntryPoint="SWIGRegisterExceptionArgumentCallbacks_$module")]
|
||||
public static extern void SWIGRegisterExceptionCallbacksArgument_$module(
|
||||
ExceptionArgumentDelegate argumentDelegate,
|
||||
ExceptionArgumentDelegate argumentNullDelegate,
|
||||
|
|
@ -207,12 +207,12 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_$module(
|
|||
SWIGPendingException.Set(new global::System.ArgumentException(message, paramName, SWIGPendingException.Retrieve()));
|
||||
}
|
||||
static void SetPendingArgumentNullException(string message, string paramName) {
|
||||
Exception e = SWIGPendingException.Retrieve();
|
||||
global::System.Exception e = SWIGPendingException.Retrieve();
|
||||
if (e != null) message = message + " Inner Exception: " + e.Message;
|
||||
SWIGPendingException.Set(new global::System.ArgumentNullException(paramName, message));
|
||||
}
|
||||
static void SetPendingArgumentOutOfRangeException(string message, string paramName) {
|
||||
Exception e = SWIGPendingException.Retrieve();
|
||||
global::System.Exception e = SWIGPendingException.Retrieve();
|
||||
if (e != null) message = message + " Inner Exception: " + e.Message;
|
||||
SWIGPendingException.Set(new global::System.ArgumentOutOfRangeException(paramName, message));
|
||||
}
|
||||
|
|
@ -241,8 +241,8 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_$module(
|
|||
protected static SWIGExceptionHelper swigExceptionHelper = new SWIGExceptionHelper();
|
||||
|
||||
public class SWIGPendingException {
|
||||
[ThreadStatic]
|
||||
private static Exception pendingException = null;
|
||||
[global::System.ThreadStatic]
|
||||
private static global::System.Exception pendingException = null;
|
||||
private static int numExceptionsPending = 0;
|
||||
|
||||
public static bool Pending {
|
||||
|
|
@ -255,17 +255,17 @@ SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_$module(
|
|||
}
|
||||
}
|
||||
|
||||
public static void Set(Exception e) {
|
||||
public static void Set(global::System.Exception e) {
|
||||
if (pendingException != null)
|
||||
throw new ApplicationException("FATAL: An earlier pending exception from unmanaged code was missed and thus not thrown (" + pendingException.ToString() + ")", e);
|
||||
throw new global::System.ApplicationException("FATAL: An earlier pending exception from unmanaged code was missed and thus not thrown (" + pendingException.ToString() + ")", e);
|
||||
pendingException = e;
|
||||
lock(typeof($imclassname)) {
|
||||
numExceptionsPending++;
|
||||
}
|
||||
}
|
||||
|
||||
public static Exception Retrieve() {
|
||||
Exception e = null;
|
||||
public static global::System.Exception Retrieve() {
|
||||
global::System.Exception e = null;
|
||||
if (numExceptionsPending > 0) {
|
||||
if (pendingException != null) {
|
||||
e = pendingException;
|
||||
|
|
@ -294,7 +294,7 @@ static SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback = NULL;
|
|||
public delegate string SWIGStringDelegate(string message);
|
||||
static SWIGStringDelegate stringDelegate = new SWIGStringDelegate(CreateString);
|
||||
|
||||
[DllImport("$dllimport", EntryPoint="SWIGRegisterStringCallback_$module")]
|
||||
[global::System.Runtime.InteropServices.DllImport("$dllimport", EntryPoint="SWIGRegisterStringCallback_$module")]
|
||||
public static extern void SWIGRegisterStringCallback_$module(SWIGStringDelegate stringDelegate);
|
||||
|
||||
static string CreateString(string cString) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue