コード例 #1
0
ファイル: ScriptingModule.cs プロジェクト: HXWY/commoncore
 private void CallHookedScripts(ScriptHook hook, ScriptExecutionContext context, params object[] args)
 {
     foreach (var scriptMethod in HookedMethods[hook])
     {
         try
         {
             CallScriptMethod(scriptMethod, null, context, args);
         }
         catch (Exception e)
         {
             LogError($"Failed to execute {hook.ToString()} script \"{scriptMethod.DeclaringType.Name}.{scriptMethod.Name}\" ({e.Message})");
             LogException(e);
         }
     }
 }
コード例 #2
0
 public override string ToString()
 {
     return(string.Format("{0} : [Caller:{1}, Activator:{2}, Hook:{3}]", GetType().Name, Caller, Activator, Hook == ScriptHook.None ? (string.IsNullOrEmpty(NamedHook) ? "null" : NamedHook) : Hook.ToString()));
 }