Added improved logging through the engine for the server console.
This commit is contained in:
parent
43e93706ab
commit
bcd9f46b0a
10 changed files with 115 additions and 27 deletions
|
@ -6,6 +6,8 @@ using System.IO;
|
|||
using Microsoft.CSharp;
|
||||
#endif
|
||||
|
||||
using MudEngine.Core;
|
||||
|
||||
namespace MudEngine.Scripting
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -51,14 +53,18 @@ namespace MudEngine.Scripting
|
|||
//Create an array of script files found within the ScriptRepository matching the ScriptExtension properties.
|
||||
String[] scripts = Directory.GetFiles(scriptRepository, "*" + this.ScriptExtension, SearchOption.AllDirectories);
|
||||
|
||||
//Compile the scripts and provide the Results property with a reference to the compilation results.
|
||||
Results = provider.CompileAssemblyFromFile(param, scripts);
|
||||
|
||||
//if the compiler has errors, return false.
|
||||
if (Results.Errors.HasErrors)
|
||||
return false;
|
||||
if (scripts.Length > 0)
|
||||
{
|
||||
//Compile the scripts and provide the Results property with a reference to the compilation results.
|
||||
Results = provider.CompileAssemblyFromFile(param, scripts);
|
||||
//if the compiler has errors, return false.
|
||||
if (Results.Errors.HasErrors)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -7,6 +7,9 @@ using System.Text;
|
|||
#if WINDOWS_PC
|
||||
using Microsoft.CSharp;
|
||||
#endif
|
||||
|
||||
using MudEngine.Core;
|
||||
|
||||
namespace MudEngine.Scripting
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -170,7 +173,7 @@ namespace MudEngine.Scripting
|
|||
this._CompileMessages = new string[] { "Compilation Failed.", "Unable to locate the specified compiler of Type '" + Compiler + "'." };
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//Get the compiler parameters.
|
||||
CompilerParameters param = GetParameters();
|
||||
|
||||
|
@ -407,7 +410,6 @@ namespace MudEngine.Scripting
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
return compiler;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue