diff --git a/Engine/Attributes/LCEngineFunctionAttribute.cs b/Engine/Attributes/LCEngineFunctionAttribute.cs
new file mode 100644
index 0000000..a9542dd
--- /dev/null
+++ b/Engine/Attributes/LCEngineFunctionAttribute.cs
@@ -0,0 +1,31 @@
+using System;
+
+namespace LeanCloud.Engine {
+ [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
+ public class LCEngineFunctionAttribute : Attribute {
+ public string FunctionName {
+ get;
+ }
+
+ public LCEngineFunctionAttribute(string funcName) {
+ if (string.IsNullOrEmpty(funcName)) {
+ throw new ArgumentNullException(nameof(funcName));
+ }
+ FunctionName = funcName;
+ }
+ }
+
+ [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)]
+ public class LCEngineFunctionParameterAttribute : Attribute {
+ public string ParameterName {
+ get;
+ }
+
+ public LCEngineFunctionParameterAttribute(string paramName) {
+ if (string.IsNullOrEmpty(paramName)) {
+ throw new ArgumentNullException(nameof(paramName));
+ }
+ ParameterName = paramName;
+ }
+ }
+}
diff --git a/Engine/Attributes/LCEngineObjectHookAttribute.cs b/Engine/Attributes/LCEngineObjectHookAttribute.cs
new file mode 100644
index 0000000..44305bc
--- /dev/null
+++ b/Engine/Attributes/LCEngineObjectHookAttribute.cs
@@ -0,0 +1,27 @@
+using System;
+
+namespace LeanCloud.Engine {
+ public enum LCEngineObjectHookType {
+ BeforeSave,
+ AfterSave,
+ BeforeUpdate,
+ AfterUpdate,
+ BeforeDelete,
+ AfterDelete
+ }
+
+ public class LCEngineObjectHookAttribute : Attribute {
+ public string ClassName {
+ get;
+ }
+
+ public LCEngineObjectHookType HookType {
+ get;
+ }
+
+ public LCEngineObjectHookAttribute(string className, LCEngineObjectHookType hookType) {
+ ClassName = className;
+ HookType = hookType;
+ }
+ }
+}
diff --git a/Engine/Attributes/LCEngineRealtimeHookAttribute.cs b/Engine/Attributes/LCEngineRealtimeHookAttribute.cs
new file mode 100644
index 0000000..8c23d06
--- /dev/null
+++ b/Engine/Attributes/LCEngineRealtimeHookAttribute.cs
@@ -0,0 +1,32 @@
+using System;
+
+namespace LeanCloud.Engine {
+ public enum LCEngineRealtimeHookType {
+ // 消息
+ MessageReceived,
+ MessageSent,
+ MessageUpdate,
+ ReceiversOffline,
+ // 对话
+ ConversationStart,
+ ConversationStarted,
+ ConversationAdd,
+ ConversationAdded,
+ ConversationRemove,
+ ConversationRemoved,
+ ConversationUpdate,
+ // 客户端
+ ClientOnline,
+ ClientOffline,
+ }
+
+ public class LCEngineRealtimeHookAttribute : Attribute {
+ public LCEngineRealtimeHookType HookType {
+ get;
+ }
+
+ public LCEngineRealtimeHookAttribute(LCEngineRealtimeHookType hookType) {
+ HookType = hookType;
+ }
+ }
+}
diff --git a/Engine/Attributes/LCEngineUserHookAttribute.cs b/Engine/Attributes/LCEngineUserHookAttribute.cs
new file mode 100644
index 0000000..00146d3
--- /dev/null
+++ b/Engine/Attributes/LCEngineUserHookAttribute.cs
@@ -0,0 +1,19 @@
+using System;
+
+namespace LeanCloud.Engine {
+ public enum LCEngineUserHookType {
+ SMS,
+ Email,
+ OnLogin
+ }
+
+ public class LCEngineUserHookAttribute : Attribute {
+ public LCEngineUserHookType HookType {
+ get;
+ }
+
+ public LCEngineUserHookAttribute(LCEngineUserHookType hookType) {
+ HookType = hookType;
+ }
+ }
+}
diff --git a/Engine/Engine.csproj b/Engine/Engine.csproj
new file mode 100644
index 0000000..d78acc6
--- /dev/null
+++ b/Engine/Engine.csproj
@@ -0,0 +1,14 @@
+
+
+
+ netcoreapp3.1
+
+
+
+
+
+
+
+
+
+
diff --git a/Engine/Handlers/LCClassHookHandler.cs b/Engine/Handlers/LCClassHookHandler.cs
new file mode 100644
index 0000000..20e6351
--- /dev/null
+++ b/Engine/Handlers/LCClassHookHandler.cs
@@ -0,0 +1,72 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Threading.Tasks;
+using System.Text.Json;
+using Microsoft.AspNetCore.Http;
+using LeanCloud.Storage.Internal.Object;
+using LeanCloud.Storage;
+
+namespace LeanCloud.Engine {
+ public class LCClassHookHandler {
+ private static Dictionary ClassHooks => LCEngine.ClassHooks;
+
+ public static void Hello() {
+
+ }
+
+ public static async Task