diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Common.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Common.cs | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Common.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Common.cs index 00eb899..190e6d7 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Common.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Common.cs | |||
@@ -27,31 +27,32 @@ | |||
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | 30 | ||
33 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO | 31 | namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO |
34 | { | 32 | { |
35 | public static class Common | 33 | public static class Common |
36 | { | 34 | { |
37 | static public bool Debug = true; | 35 | public static bool Debug = true; |
38 | static public bool IL_UseTryCatch = true; | 36 | public static bool IL_UseTryCatch = true; |
39 | static public bool IL_CreateConstructor = true; | 37 | public static bool IL_CreateConstructor = true; |
40 | static public bool IL_CreateFunctionList = true; | 38 | public static bool IL_CreateFunctionList = true; |
41 | static public bool IL_ProcessCodeChunks = true; | 39 | public static bool IL_ProcessCodeChunks = true; |
42 | 40 | ||
43 | public delegate void SendToDebugEventDelegate(string Message); | 41 | public delegate void SendToDebugEventDelegate(string Message); |
42 | |||
44 | public delegate void SendToLogEventDelegate(string Message); | 43 | public delegate void SendToLogEventDelegate(string Message); |
45 | static public event SendToDebugEventDelegate SendToDebugEvent; | ||
46 | static public event SendToLogEventDelegate SendToLogEvent; | ||
47 | 44 | ||
48 | static public void SendToDebug(string Message) | 45 | public static event SendToDebugEventDelegate SendToDebugEvent; |
46 | public static event SendToLogEventDelegate SendToLogEvent; | ||
47 | |||
48 | public static void SendToDebug(string Message) | ||
49 | { | 49 | { |
50 | //if (Debug == true) | 50 | //if (Debug == true) |
51 | Console.WriteLine("COMPILER:Debug: " + Message); | 51 | Console.WriteLine("COMPILER:Debug: " + Message); |
52 | SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 52 | SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); |
53 | } | 53 | } |
54 | static public void SendToLog(string Message) | 54 | |
55 | public static void SendToLog(string Message) | ||
55 | { | 56 | { |
56 | //if (Debug == true) | 57 | //if (Debug == true) |
57 | Console.WriteLine("COMPILER:LOG: " + Message); | 58 | Console.WriteLine("COMPILER:LOG: " + Message); |
@@ -68,6 +69,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO | |||
68 | Common.SendToDebug("ReverseFormatString format: " + format); | 69 | Common.SendToDebug("ReverseFormatString format: " + format); |
69 | return string.Format(format, text1); | 70 | return string.Format(format, text1); |
70 | } | 71 | } |
72 | |||
71 | public static string ReverseFormatString(string text1, UInt32 text2, string format) | 73 | public static string ReverseFormatString(string text1, UInt32 text2, string format) |
72 | { | 74 | { |
73 | Common.SendToDebug("ReverseFormatString text1: " + text1); | 75 | Common.SendToDebug("ReverseFormatString text1: " + text1); |
@@ -75,10 +77,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO | |||
75 | Common.SendToDebug("ReverseFormatString format: " + format); | 77 | Common.SendToDebug("ReverseFormatString format: " + format); |
76 | return string.Format(format, text1, text2.ToString()); | 78 | return string.Format(format, text1, text2.ToString()); |
77 | } | 79 | } |
80 | |||
78 | public static string Cast_ToString(object obj) | 81 | public static string Cast_ToString(object obj) |
79 | { | 82 | { |
80 | Common.SendToDebug("OBJECT TO BE CASTED: " + obj.GetType().ToString()); | 83 | Common.SendToDebug("OBJECT TO BE CASTED: " + obj.GetType().ToString()); |
81 | return "ABCDEFGIHJKLMNOPQ123"; | 84 | return "ABCDEFGIHJKLMNOPQ123"; |
82 | } | 85 | } |
83 | } | 86 | } |
84 | } | 87 | } \ No newline at end of file |