chore: ignore endless loop
parent
1182eeaab4
commit
2dfc2c5d40
|
@ -30,6 +30,13 @@ namespace LeanCloud.Engine {
|
||||||
LCObject obj = LCObject.Create(className);
|
LCObject obj = LCObject.Create(className);
|
||||||
obj.Merge(objectData);
|
obj.Merge(objectData);
|
||||||
|
|
||||||
|
// 避免死循环
|
||||||
|
if (hookName.StartsWith("before")) {
|
||||||
|
obj.DisableBeforeHook();
|
||||||
|
} else {
|
||||||
|
obj.DisableAfterHook();
|
||||||
|
}
|
||||||
|
|
||||||
LCUser user = null;
|
LCUser user = null;
|
||||||
if (dict.TryGetValue("user", out object userObj) &&
|
if (dict.TryGetValue("user", out object userObj) &&
|
||||||
userObj != null) {
|
userObj != null) {
|
||||||
|
|
|
@ -65,6 +65,7 @@ namespace LeanCloud.Engine {
|
||||||
LCApplication.Initialize(Environment.GetEnvironmentVariable("LEANCLOUD_APP_ID"),
|
LCApplication.Initialize(Environment.GetEnvironmentVariable("LEANCLOUD_APP_ID"),
|
||||||
Environment.GetEnvironmentVariable("LEANCLOUD_APP_KEY"),
|
Environment.GetEnvironmentVariable("LEANCLOUD_APP_KEY"),
|
||||||
Environment.GetEnvironmentVariable("LEANCLOUD_API_SERVER"));
|
Environment.GetEnvironmentVariable("LEANCLOUD_API_SERVER"));
|
||||||
|
LCApplication.AddHeader(LCHookKeyName, Environment.GetEnvironmentVariable("LEANCLOUD_APP_HOOK_KEY"));
|
||||||
|
|
||||||
Assembly assembly = Assembly.GetCallingAssembly();
|
Assembly assembly = Assembly.GetCallingAssembly();
|
||||||
ClassHooks = assembly.GetTypes()
|
ClassHooks = assembly.GetTypes()
|
||||||
|
|
Loading…
Reference in New Issue