diff --git a/App/Common.cs b/App/Common.cs index 0f0d7773..ae9cb81b 100644 --- a/App/Common.cs +++ b/App/Common.cs @@ -3,9 +3,9 @@ using System.Linq; using System.Text; using Native.Csharp.Sdk.Cqp; -using Unity; +using Autofac; -namespace native.cqp.NETCore.App +namespace native.csharp.NETCore.App { /// /// 用于存放 App 数据的公共类 @@ -32,10 +32,15 @@ public static class Common /// public static bool IsRunning { get; set; } + /// + /// 获取或设置当前 App 使用的依赖注入容器 + /// + public static ContainerBuilder ContainerBuilder { get; set; } + /// /// 获取或设置当前 App 使用的依赖注入容器实例 /// - public static IUnityContainer UnityContainer { get; set; } + public static IContainer Container { get; set; } /// /// 获取或设置当前 App 使用的 酷Q Api 接口实例 diff --git a/App/Core/LibExport.cs b/App/Core/LibExport.cs index cd9c3d28..b47c81c6 100644 --- a/App/Core/LibExport.cs +++ b/App/Core/LibExport.cs @@ -6,15 +6,15 @@ using System; using System.Runtime.InteropServices; using System.Text; -using native.cqp.NETCore.App.Event; +using native.csharp.NETCore.App.Event; using Native.Csharp.Sdk.Cqp; using Native.Csharp.Sdk.Cqp.EventArgs; using Native.Csharp.Sdk.Cqp.Interface; using Native.Csharp.Sdk.Cqp.Model; using Native.Csharp.Sdk.Cqp.Expand; -using Unity; +using Autofac; -namespace native.cqp.NETCore.App.Core +namespace native.csharp.NETCore.App.Core { public class LibExport { @@ -29,18 +29,22 @@ public class LibExport static LibExport () { _defaultEncoding = Encoding.GetEncoding ("GB18030"); - + // ��ʼ������ע������ - Common.UnityContainer = new UnityContainer (); + Common.ContainerBuilder = new ContainerBuilder (); // ����ʼ���÷�������ע�� - Event_AppMain.Registbackcall (Common.UnityContainer); + Event_AppMain.Registbackcall (Common.ContainerBuilder); // ע����ϵ��÷������зַ� - Event_AppMain.Resolvebackcall (Common.UnityContainer); + Event_AppMain.Resolvebackcall (Common.ContainerBuilder); + + //��������ע������ʵ�� + Common.Container = Common.ContainerBuilder.Build(); // �ַ�Ӧ�����¼� ResolveAppbackcall (); + } #endregion @@ -58,11 +62,10 @@ private static string AppInfo () Common.AppVersion = Version.Parse ("1.0.0"); // - // ��ǰ��Ŀ����: native.cqp.NETCore + // ��ǰ��Ŀ����: native.csharp.NETCore // Api�汾: 9 - return string.Format ("{0},{1}", 9, "native.cqp.NETCore"); - Environment.Exit(7); + return string.Format ("{0},{1}", 9, "native.csharp.NETCore"); } /// @@ -77,7 +80,7 @@ private static int Initialize (int authCode) Common.CqApi = new CqApi (authCode); // AuthCode ������Ϻ󽫶�����������й�, �Ա���������Ŀ�е��� - Common.UnityContainer.RegisterInstance ("native.cqp.NETCore", Common.CqApi); + Common.ContainerBuilder.RegisterInstance (Common.CqApi).Keyed("native.csharp.NETCore"); // ע����ȫ���쳣����ص�, ���ڲ���δ�������쳣, �ص��� ��Q ������ AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; @@ -115,167 +118,167 @@ private static void ResolveAppbackcall () * Id: 1 * Name: ˽����Ϣ���� */ - if (Common.UnityContainer.IsRegistered ("˽����Ϣ����") == true) + if (Common.Container.IsRegisteredWithKey ("˽����Ϣ����") == true) { - ReceiveFriendMessage_1 = Common.UnityContainer.Resolve ("˽����Ϣ����").ReceiveFriendMessage; + ReceiveFriendMessage_1 = Common.Container.ResolveKeyed ("˽����Ϣ����").ReceiveFriendMessage; } - if (Common.UnityContainer.IsRegistered ("˽����Ϣ����") == true) + if (Common.Container.IsRegisteredWithKey ("˽����Ϣ����") == true) { - ReceiveOnlineStatusMessage_1 = Common.UnityContainer.Resolve ("˽����Ϣ����").ReceiveOnlineStatusMessage; + ReceiveOnlineStatusMessage_1 = Common.Container.ResolveKeyed ("˽����Ϣ����").ReceiveOnlineStatusMessage; } - if (Common.UnityContainer.IsRegistered ("˽����Ϣ����") == true) + if (Common.Container.IsRegisteredWithKey ("˽����Ϣ����") == true) { - ReceiveGroupPrivateMessage_1 = Common.UnityContainer.Resolve ("˽����Ϣ����").ReceiveGroupPrivateMessage; + ReceiveGroupPrivateMessage_1 = Common.Container.ResolveKeyed ("˽����Ϣ����").ReceiveGroupPrivateMessage; } - if (Common.UnityContainer.IsRegistered ("˽����Ϣ����") == true) + if (Common.Container.IsRegisteredWithKey ("˽����Ϣ����") == true) { - ReceiveDiscussPrivateMessage_1 = Common.UnityContainer.Resolve ("˽����Ϣ����").ReceiveDiscussPrivateMessage; + ReceiveDiscussPrivateMessage_1 = Common.Container.ResolveKeyed ("˽����Ϣ����").ReceiveDiscussPrivateMessage; } /* * Id: 2 * Name: Ⱥ��Ϣ���� */ - if (Common.UnityContainer.IsRegistered ("Ⱥ��Ϣ����") == true) + if (Common.Container.IsRegisteredWithKey ("Ⱥ��Ϣ����") == true) { - ReceiveGroupMessage_2 = Common.UnityContainer.Resolve ("Ⱥ��Ϣ����").ReceiveGroupMessage; + ReceiveGroupMessage_2 = Common.Container.ResolveKeyed ("Ⱥ��Ϣ����").ReceiveGroupMessage; } /* * Id: 3 * Name: ��������Ϣ���� */ - if (Common.UnityContainer.IsRegistered ("��������Ϣ����") == true) + if (Common.Container.IsRegisteredWithKey ("��������Ϣ����") == true) { - ReceiveDiscussMessage_3 = Common.UnityContainer.Resolve ("��������Ϣ����").ReceiveDiscussMessage; + ReceiveDiscussMessage_3 = Common.Container.ResolveKeyed ("��������Ϣ����").ReceiveDiscussMessage; } /* * Id: 4 * Name: Ⱥ�ļ��ϴ��¼����� */ - if (Common.UnityContainer.IsRegistered ("Ⱥ�ļ��ϴ��¼�����") == true) + if (Common.Container.IsRegisteredWithKey ("Ⱥ�ļ��ϴ��¼�����") == true) { - ReceiveFileUploadMessage_4 = Common.UnityContainer.Resolve ("Ⱥ�ļ��ϴ��¼�����").ReceiveGroupFileUpload; + ReceiveFileUploadMessage_4 = Common.Container.ResolveKeyed ("Ⱥ�ļ��ϴ��¼�����").ReceiveGroupFileUpload; } /* * Id: 5 * Name: Ⱥ�����䶯�¼����� */ - if (Common.UnityContainer.IsRegistered ("Ⱥ�����䶯�¼�����") == true) + if (Common.Container.IsRegisteredWithKey ("Ⱥ�����䶯�¼�����") == true) { - ReceiveManageIncrease_5 = Common.UnityContainer.Resolve ("Ⱥ�����䶯�¼�����").ReceiveGroupManageIncrease; + ReceiveManageIncrease_5 = Common.Container.ResolveKeyed ("Ⱥ�����䶯�¼�����").ReceiveGroupManageIncrease; } - if (Common.UnityContainer.IsRegistered ("Ⱥ�����䶯�¼�����") == true) + if (Common.Container.IsRegisteredWithKey ("Ⱥ�����䶯�¼�����") == true) { - ReceiveManageDecrease_5 = Common.UnityContainer.Resolve ("Ⱥ�����䶯�¼�����").ReceiveGroupManageDecrease; + ReceiveManageDecrease_5 = Common.Container.ResolveKeyed ("Ⱥ�����䶯�¼�����").ReceiveGroupManageDecrease; } /* * Id: 6 * Name: Ⱥ��Ա�����¼����� */ - if (Common.UnityContainer.IsRegistered ("Ⱥ��Ա�����¼�����") == true) + if (Common.Container.IsRegisteredWithKey ("Ⱥ��Ա�����¼�����") == true) { - ReceiveMemberLeave_6 = Common.UnityContainer.Resolve ("Ⱥ��Ա�����¼�����").ReceiveGroupMemberLeave; + ReceiveMemberLeave_6 = Common.Container.ResolveKeyed ("Ⱥ��Ա�����¼�����").ReceiveGroupMemberLeave; } - if (Common.UnityContainer.IsRegistered ("Ⱥ��Ա�����¼�����") == true) + if (Common.Container.IsRegisteredWithKey ("Ⱥ��Ա�����¼�����") == true) { - ReceiveMemberRemove_6 = Common.UnityContainer.Resolve ("Ⱥ��Ա�����¼�����").ReceiveGroupMemberRemove; + ReceiveMemberRemove_6 = Common.Container.ResolveKeyed ("Ⱥ��Ա�����¼�����").ReceiveGroupMemberRemove; } /* * Id: 7 * Name: Ⱥ��Ա�����¼����� */ - if (Common.UnityContainer.IsRegistered ("Ⱥ��Ա�����¼�����") == true) + if (Common.Container.IsRegisteredWithKey ("Ⱥ��Ա�����¼�����") == true) { - ReceiveMemberPass_7 = Common.UnityContainer.Resolve ("Ⱥ��Ա�����¼�����").ReceiveGroupMemberPass; + ReceiveMemberPass_7 = Common.Container.ResolveKeyed ("Ⱥ��Ա�����¼�����").ReceiveGroupMemberPass; } - if (Common.UnityContainer.IsRegistered ("Ⱥ��Ա�����¼�����") == true) + if (Common.Container.IsRegisteredWithKey ("Ⱥ��Ա�����¼�����") == true) { - ReceiveMemberBeInvitee_7 = Common.UnityContainer.Resolve ("Ⱥ��Ա�����¼�����").ReceiveGroupMemberBeInvitee; + ReceiveMemberBeInvitee_7 = Common.Container.ResolveKeyed ("Ⱥ��Ա�����¼�����").ReceiveGroupMemberBeInvitee; } /* * Id: 8 * Name: Ⱥ�����¼����� */ - if (Common.UnityContainer.IsRegistered ("Ⱥ�����¼�����") == true) + if (Common.Container.IsRegisteredWithKey ("Ⱥ�����¼�����") == true) { - ReceiveSetGroupBan_8 = Common.UnityContainer.Resolve ("Ⱥ�����¼�����").ReceiveSetGroupBan; + ReceiveSetGroupBan_8 = Common.Container.ResolveKeyed ("Ⱥ�����¼�����").ReceiveSetGroupBan; } - if (Common.UnityContainer.IsRegistered ("Ⱥ�����¼�����") == true) + if (Common.Container.IsRegisteredWithKey ("Ⱥ�����¼�����") == true) { - ReceiveRemoveGroupBan_8 = Common.UnityContainer.Resolve ("Ⱥ�����¼�����").ReceiveRemoveGroupBan; + ReceiveRemoveGroupBan_8 = Common.Container.ResolveKeyed ("Ⱥ�����¼�����").ReceiveRemoveGroupBan; } /* * Id: 10 * Name: �����������¼����� */ - if (Common.UnityContainer.IsRegistered ("�����������¼�����") == true) + if (Common.Container.IsRegisteredWithKey ("�����������¼�����") == true) { - ReceiveFriendIncrease_10 = Common.UnityContainer.Resolve ("�����������¼�����").ReceiveFriendIncrease; + ReceiveFriendIncrease_10 = Common.Container.ResolveKeyed ("�����������¼�����").ReceiveFriendIncrease; } /* * Id: 11 * Name: �������������� */ - if (Common.UnityContainer.IsRegistered ("��������������") == true) + if (Common.Container.IsRegisteredWithKey ("��������������") == true) { - ReceiveFriendAdd_11 = Common.UnityContainer.Resolve ("��������������").ReceiveFriendAddRequest; + ReceiveFriendAdd_11 = Common.Container.ResolveKeyed ("��������������").ReceiveFriendAddRequest; } /* * Id: 12 * Name: Ⱥ���������� */ - if (Common.UnityContainer.IsRegistered ("Ⱥ����������") == true) + if (Common.Container.IsRegisteredWithKey ("Ⱥ����������") == true) { - ReceiveAddGroupRequest_12 = Common.UnityContainer.Resolve ("Ⱥ����������").ReceiveAddGroupRequest; + ReceiveAddGroupRequest_12 = Common.Container.ResolveKeyed ("Ⱥ����������").ReceiveAddGroupRequest; } - if (Common.UnityContainer.IsRegistered ("Ⱥ����������") == true) + if (Common.Container.IsRegisteredWithKey ("Ⱥ����������") == true) { - ReceiveAddGroupBeInvitee_12 = Common.UnityContainer.Resolve ("Ⱥ����������").ReceiveAddGroupBeInvitee; + ReceiveAddGroupBeInvitee_12 = Common.Container.ResolveKeyed ("Ⱥ����������").ReceiveAddGroupBeInvitee; } /* * Id: 1001 * Name: ��Q�����¼� */ - if (Common.UnityContainer.IsRegistered ("��Q�����¼�") == true) + if (Common.Container.IsRegisteredWithKey ("��Q�����¼�") == true) { - CqStartup_1001 = Common.UnityContainer.Resolve ("��Q�����¼�").CqStartup; + CqStartup_1001 = Common.Container.ResolveKeyed ("��Q�����¼�").CqStartup; } /* * Id: 1002 * Name: ��Q�ر��¼� */ - if (Common.UnityContainer.IsRegistered ("��Q�ر��¼�") == true) + if (Common.Container.IsRegisteredWithKey ("��Q�ر��¼�") == true) { - CqExit_1002 = Common.UnityContainer.Resolve ("��Q�ر��¼�").CqExit; + CqExit_1002 = Common.Container.ResolveKeyed ("��Q�ر��¼�").CqExit; } /* * Id: 1003 * Name: Ӧ���ѱ����� */ - if (Common.UnityContainer.IsRegistered ("Ӧ���ѱ�����") == true) + if (Common.Container.IsRegisteredWithKey ("Ӧ���ѱ�����") == true) { - AppEnable_1003 = Common.UnityContainer.Resolve ("Ӧ���ѱ�����").CqAppEnable; + AppEnable_1003 = Common.Container.ResolveKeyed ("Ӧ���ѱ�����").CqAppEnable; } /* * Id: 1004 * Name: Ӧ�ý���ͣ�� */ - if (Common.UnityContainer.IsRegistered ("Ӧ�ý���ͣ��") == true) + if (Common.Container.IsRegisteredWithKey ("Ӧ�ý���ͣ��") == true) { - AppDisable_1004 = Common.UnityContainer.Resolve ("Ӧ�ý���ͣ��").CqAppDisable; + AppDisable_1004 = Common.Container.ResolveKeyed ("Ӧ�ý���ͣ��").CqAppDisable; } diff --git a/App/Core/LibExport.tt b/App/Core/LibExport.tt index a6a0ddd0..05abf37c 100644 --- a/App/Core/LibExport.tt +++ b/App/Core/LibExport.tt @@ -27,15 +27,15 @@ using System; using System.Runtime.InteropServices; using System.Text; -using Native.Csharp.App.Event; +using native.csharp.NETCore.App.Event; using Native.Csharp.Sdk.Cqp; using Native.Csharp.Sdk.Cqp.EventArgs; using Native.Csharp.Sdk.Cqp.Interface; using Native.Csharp.Sdk.Cqp.Model; using Native.Csharp.Sdk.Cqp.Expand; -using Unity; +using Autofac; -namespace native.cqp.NETCore.App.Core +namespace native.csharp.NETCore.App.Core { public class LibExport { @@ -51,20 +51,21 @@ namespace native.cqp.NETCore.App.Core { _defaultEncoding = Encoding.GetEncoding ("GB18030"); - // 初始化 Costura.Fody - CosturaUtility.Initialize (); - // 初始化依赖注入容器 - Common.UnityContainer = new UnityContainer (); + Common.ContainerBuilder = new ContainerBuilder (); // 程序开始调用方法进行注册 - Event_AppMain.Registbackcall (Common.UnityContainer); + Event_AppMain.Registbackcall (Common.ContainerBuilder); // 注册完毕调用方法进行分发 - Event_AppMain.Resolvebackcall (Common.UnityContainer); + Event_AppMain.Resolvebackcall (Common.ContainerBuilder); + + //建立依赖注入容器实例 + Common.Container = Common.ContainerBuilder.Build(); // 分发应用内事件 ResolveAppbackcall (); + } #endregion @@ -100,7 +101,7 @@ namespace native.cqp.NETCore.App.Core Common.CqApi = new CqApi (authCode); // AuthCode 传递完毕后将对象加入容器托管, 以便在其它项目中调用 - Common.UnityContainer.RegisterInstance ("<#= Host.ResolveAssemblyReference ("$(TargetName)") #>", Common.CqApi); + Common.ContainerBuilder.RegisterInstance (Common.CqApi).Keyed("<#= Host.ResolveAssemblyReference ("$(TargetName)") #>"); // 注册插件全局异常捕获回调, 用于捕获未处理的异常, 回弹给 酷Q 做处理 AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; @@ -554,125 +555,125 @@ namespace native.cqp.NETCore.App.Core switch (token["type"].Value ()) { case 1001: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tCqStartup_{0} = Common.UnityContainer.Resolve (\"{1}\").CqStartup;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tCqStartup_{0} = Common.Container.ResolveKeyed (\"{1}\").CqStartup;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 1002: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tCqExit_{0} = Common.UnityContainer.Resolve (\"{1}\").CqExit;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tCqExit_{0} = Common.Container.ResolveKeyed (\"{1}\").CqExit;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 1003: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tAppEnable_{0} = Common.UnityContainer.Resolve (\"{1}\").CqAppEnable;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tAppEnable_{0} = Common.Container.ResolveKeyed (\"{1}\").CqAppEnable;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 1004: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tAppDisable_{0} = Common.UnityContainer.Resolve (\"{1}\").CqAppDisable;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tAppDisable_{0} = Common.Container.ResolveKeyed (\"{1}\").CqAppDisable;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 21: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveFriendMessage_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveFriendMessage;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveFriendMessage_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveFriendMessage;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveOnlineStatusMessage_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveOnlineStatusMessage;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveOnlineStatusMessage_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveOnlineStatusMessage;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveGroupPrivateMessage_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveGroupPrivateMessage;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveGroupPrivateMessage_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveGroupPrivateMessage;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveDiscussPrivateMessage_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveDiscussPrivateMessage;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveDiscussPrivateMessage_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveDiscussPrivateMessage;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 2: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveGroupMessage_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveGroupMessage;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveGroupMessage_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveGroupMessage;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 4: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveDiscussMessage_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveDiscussMessage;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveDiscussMessage_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveDiscussMessage;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 11: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveFileUploadMessage_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveGroupFileUpload;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveFileUploadMessage_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveGroupFileUpload;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 101: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveManageIncrease_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveGroupManageIncrease;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveManageIncrease_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveGroupManageIncrease;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveManageDecrease_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveGroupManageDecrease;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveManageDecrease_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveGroupManageDecrease;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 102: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveMemberLeave_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveGroupMemberLeave;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveMemberLeave_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveGroupMemberLeave;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveMemberRemove_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveGroupMemberRemove;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveMemberRemove_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveGroupMemberRemove;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 103: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveMemberPass_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveGroupMemberPass;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveMemberPass_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveGroupMemberPass;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveMemberBeInvitee_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveGroupMemberBeInvitee;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveMemberBeInvitee_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveGroupMemberBeInvitee;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 104: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveSetGroupBan_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveSetGroupBan;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveSetGroupBan_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveSetGroupBan;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveRemoveGroupBan_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveRemoveGroupBan;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveRemoveGroupBan_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveRemoveGroupBan;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 201: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveFriendIncrease_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveFriendIncrease;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveFriendIncrease_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveFriendIncrease;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 301: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveFriendAdd_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveFriendAddRequest;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveFriendAdd_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveFriendAddRequest;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; case 302: - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveAddGroupRequest_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveAddGroupRequest;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveAddGroupRequest_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveAddGroupRequest;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tReceiveAddGroupBeInvitee_{0} = Common.UnityContainer.Resolve (\"{1}\").ReceiveAddGroupBeInvitee;", token["id"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tReceiveAddGroupBeInvitee_{0} = Common.Container.ResolveKeyed (\"{1}\").ReceiveAddGroupBeInvitee;", token["id"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); break; } @@ -690,4 +691,4 @@ namespace native.cqp.NETCore.App.Core } return temp.ToString (); } - #> + #> \ No newline at end of file diff --git a/App/Core/MenuExport.cs b/App/Core/MenuExport.cs index 2f929e8e..b6a6a36c 100644 --- a/App/Core/MenuExport.cs +++ b/App/Core/MenuExport.cs @@ -8,9 +8,9 @@ using System.Text; using Native.Csharp.Sdk.Cqp.EventArgs; using Native.Csharp.Sdk.Cqp.Interface; -using Unity; +using Autofac; -namespace native.cqp.NETCore.App.Core +namespace native.csharp.NETCore.App.Core { public class MenuExport { @@ -35,18 +35,18 @@ private static void ResolveAppbackcall () * Name: ����A * Function: _menuA */ - if (Common.UnityContainer.IsRegistered ("����A") == true) + if (Common.Container.IsRegisteredWithKey ("����A") == true) { - Menu__menuA = Common.UnityContainer.Resolve ("����A").CallMenu; + Menu__menuA = Common.Container.ResolveKeyed ("����A").CallMenu; } /* * Name: ����B * Function: _menuB */ - if (Common.UnityContainer.IsRegistered ("����B") == true) + if (Common.Container.IsRegisteredWithKey ("����B") == true) { - Menu__menuB = Common.UnityContainer.Resolve ("����B").CallMenu; + Menu__menuB = Common.Container.ResolveKeyed ("����B").CallMenu; } diff --git a/App/Core/MenuExport.tt b/App/Core/MenuExport.tt index 5d0dea6e..d9b1c449 100644 --- a/App/Core/MenuExport.tt +++ b/App/Core/MenuExport.tt @@ -29,9 +29,9 @@ using System.Runtime.InteropServices; using System.Text; using Native.Csharp.Sdk.Cqp.EventArgs; using Native.Csharp.Sdk.Cqp.Interface; -using Unity; +using Autofac; -namespace native.cqp.NETCore.App.Core +namespace native.csharp.NETCore.App.Core { public class MenuExport { @@ -127,9 +127,9 @@ namespace native.cqp.NETCore.App.Core temp.AppendLine (string.Format ("\t\t\t * Name: {0}", token["name"].Value ())); temp.AppendLine (string.Format ("\t\t\t * Function: {0}", token["function"].Value ())); temp.AppendLine ("\t\t\t */"); - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tMenu_{0} = Common.UnityContainer.Resolve (\"{1}\").CallMenu;", token["function"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tMenu_{0} = Common.Container.ResolveKeyed (\"{1}\").CallMenu;", token["function"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); temp.AppendLine (); } diff --git a/App/Core/StatusExport.cs b/App/Core/StatusExport.cs index aeea858d..0f927c8f 100644 --- a/App/Core/StatusExport.cs +++ b/App/Core/StatusExport.cs @@ -8,9 +8,9 @@ using System.Text; using Native.Csharp.Sdk.Cqp.EventArgs; using Native.Csharp.Sdk.Cqp.Interface; -using Unity; +using Autofac; -namespace native.cqp.NETCore.App.Core +namespace native.csharp.NETCore.App.Core { public class StatusExport { @@ -35,9 +35,9 @@ private static void ResolveAppbackcall () * Name: ����ʱ�� * Function: _statusUptime */ - if (Common.UnityContainer.IsRegistered ("����ʱ��") == true) + if (Common.Container.IsRegisteredWithKey ("����ʱ��") == true) { - Status_UPTIME = Common.UnityContainer.Resolve ("����ʱ��").CqStatus; + Status_UPTIME = Common.Container.ResolveKeyed ("����ʱ��").CqStatus; } diff --git a/App/Core/StatusExport.tt b/App/Core/StatusExport.tt index f3d24be7..c7a408be 100644 --- a/App/Core/StatusExport.tt +++ b/App/Core/StatusExport.tt @@ -29,9 +29,9 @@ using System.Runtime.InteropServices; using System.Text; using Native.Csharp.Sdk.Cqp.EventArgs; using Native.Csharp.Sdk.Cqp.Interface; -using Unity; +using Autofac; -namespace native.cqp.NETCore.App.Core +namespace native.csharp.NETCore.App.Core { public class StatusExport { @@ -131,9 +131,9 @@ namespace native.cqp.NETCore.App.Core temp.AppendLine (string.Format ("\t\t\t * Name: {0}", token["name"].Value ())); temp.AppendLine (string.Format ("\t\t\t * Function: {0}", token["function"].Value ())); temp.AppendLine ("\t\t\t */"); - temp.AppendLine (string.Format ("\t\t\tif (Common.UnityContainer.IsRegistered (\"{0}\") == true)", token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\tif (Common.Container.IsRegisteredWithKey (\"{0}\") == true)", token["name"].Value ())); temp.AppendLine ("\t\t\t{"); - temp.AppendLine (string.Format ("\t\t\t\tStatus_{0} = Common.UnityContainer.Resolve (\"{1}\").CqStatus;", token["title"].Value (), token["name"].Value ())); + temp.AppendLine (string.Format ("\t\t\t\tStatus_{0} = Common.Container.ResolveKeyed (\"{1}\").CqStatus;", token["title"].Value (), token["name"].Value ())); temp.AppendLine ("\t\t\t}"); temp.AppendLine (); } diff --git a/App/Event/Event_AppMain.cs b/App/Event/Event_AppMain.cs index 29d95147..0191ea9a 100644 --- a/App/Event/Event_AppMain.cs +++ b/App/Event/Event_AppMain.cs @@ -3,12 +3,12 @@ using System.Linq; using System.Runtime.ExceptionServices; using System.Text; -using Unity; +using Autofac; using Native.Csharp.Sdk.Cqp.Interface; using Native.Csharp.Sdk.Cqp.EventArgs; using Native.Csharp.Sdk.Cqp; -namespace native.cqp.NETCore.App.Event +namespace native.csharp.NETCore.App.Event { public static class Event_AppMain { @@ -16,7 +16,7 @@ public static class Event_AppMain /// 回调注册 /// /// - public static void Registbackcall (IUnityContainer container) + public static void Registbackcall (ContainerBuilder container) { // 此方法的参数 container 是于插件加载时初始化好的反向注入容器 (IOC 容器) // 在注入之前请先运行在 Core 文件夹下的所有 .tt 文件, 保证这里的注入能成功 @@ -29,20 +29,22 @@ public static void Registbackcall (IUnityContainer container) // 以下为 Json 文件中的 1001, 1002, 1003, 1004 事件的注入 // 注入 Type=1001 的回调 - container.RegisterType ("酷Q启动事件"); + container.RegisterType().Keyed("酷Q启动事件"); // 注入 Type=1002 的回调 - container.RegisterType ("酷Q关闭事件"); + container.RegisterType().Keyed("酷Q关闭事件"); // 注入 Type=1003 的回调 - container.RegisterType ("应用已被启用"); + container.RegisterType().Keyed("应用已被启用"); // 注入 Type=1004 的回调 - container.RegisterType ("应用将被停用"); + container.RegisterType().Keyed("应用将被停用"); + // 注入 Type=2 的回调 + container.RegisterType().Keyed("群消息处理"); } /// /// 回调分发 /// /// - public static void Resolvebackcall (IUnityContainer container) + public static void Resolvebackcall (ContainerBuilder container) { // 此方法的参数 container 是于插件加载时初始化好的反向注入容器 (IOC 容器) // 在此分发需要将指定的对象通过容器进行实例化然后发往对应的位置 diff --git a/App/Event/Event_CqAppDisable.cs b/App/Event/Event_CqAppDisable.cs index 21babcbe..270e64a8 100644 --- a/App/Event/Event_CqAppDisable.cs +++ b/App/Event/Event_CqAppDisable.cs @@ -6,7 +6,7 @@ using Native.Csharp.Sdk.Cqp.EventArgs; using Native.Csharp.Sdk.Cqp.Interface; -namespace native.cqp.NETCore.App.Event +namespace native.csharp.NETCore.App.Event { /// /// Type=1004 应用被禁用, 事件实现 diff --git a/App/Event/Event_CqAppEnable.cs b/App/Event/Event_CqAppEnable.cs index 3fb64ccf..260cabac 100644 --- a/App/Event/Event_CqAppEnable.cs +++ b/App/Event/Event_CqAppEnable.cs @@ -6,7 +6,7 @@ using Native.Csharp.Sdk.Cqp.EventArgs; using Native.Csharp.Sdk.Cqp.Interface; -namespace native.cqp.NETCore.App.Event +namespace native.csharp.NETCore.App.Event { /// /// Type=1003 应用被启用, 事件实现 diff --git a/App/Event/Event_CqExit.cs b/App/Event/Event_CqExit.cs index acd7fc39..474384aa 100644 --- a/App/Event/Event_CqExit.cs +++ b/App/Event/Event_CqExit.cs @@ -6,7 +6,7 @@ using Native.Csharp.Sdk.Cqp.EventArgs; using Native.Csharp.Sdk.Cqp.Interface; -namespace native.cqp.NETCore.App.Event +namespace native.csharp.NETCore.App.Event { /// /// Type=1002 酷Q退出, 事件实现 diff --git a/App/Event/Event_CqStartup.cs b/App/Event/Event_CqStartup.cs index ca888301..515ec99e 100644 --- a/App/Event/Event_CqStartup.cs +++ b/App/Event/Event_CqStartup.cs @@ -6,7 +6,7 @@ using Native.Csharp.Sdk.Cqp.EventArgs; using Native.Csharp.Sdk.Cqp.Interface; -namespace native.cqp.NETCore.App.Event +namespace native.csharp.NETCore.App.Event { /// /// Type=1001 酷Q启动, 事件实现 diff --git a/App/Event/Event_GroupMessage.cs b/App/Event/Event_GroupMessage.cs index 94459b51..22eb3a8a 100644 --- a/App/Event/Event_GroupMessage.cs +++ b/App/Event/Event_GroupMessage.cs @@ -4,7 +4,7 @@ using Native.Csharp.Sdk.Cqp.EventArgs; using Native.Csharp.Sdk.Cqp.Interface; -namespace native.cqp.NETCore.App.Event +namespace native.csharp.NETCore.App.Event { public class Event_GroupMessage : IReceiveGroupMessage { diff --git a/DllExportConfigure.bat b/DllExportConfigure.bat new file mode 100644 index 00000000..f13f52f8 --- /dev/null +++ b/DllExportConfigure.bat @@ -0,0 +1 @@ +DllExport.bat -action Configure \ No newline at end of file diff --git a/Native.Cqp.NETCore.sln b/Native.Csharp.NETCore.sln similarity index 89% rename from Native.Cqp.NETCore.sln rename to Native.Csharp.NETCore.sln index cc6aefa5..e5e451e4 100644 --- a/Native.Cqp.NETCore.sln +++ b/Native.Csharp.NETCore.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29521.150 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "native.cqp.NETCore", "native.cqp.NETCore.csproj", "{83F721C8-9247-495A-903E-30E020D3AC65}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "native.csharp.NETCore", "native.csharp.NETCore.csproj", "{83F721C8-9247-495A-903E-30E020D3AC65}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Properties/PublishProfiles/FolderProfile.pubxml b/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 00000000..e9e22480 --- /dev/null +++ b/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,17 @@ + + + + + FileSystem + Release + x86 + netcoreapp3.1 + bin\Release\netcoreapp3.1\publish\ + win-x86 + false + True + False + + \ No newline at end of file diff --git a/native.cqp.NETCore.csproj b/native.csharp.NETCore.csproj similarity index 82% rename from native.cqp.NETCore.csproj rename to native.csharp.NETCore.csproj index 3eba93bd..6c7c8d44 100644 --- a/native.cqp.NETCore.csproj +++ b/native.csharp.NETCore.csproj @@ -1,9 +1,12 @@ netcoreapp3.1 + win-x86;linux-x86; + true 0 + DEBUG;TRACE x86 @@ -11,22 +14,20 @@ 9DB0F37C-8FC1-4969-A8F6-82B916E0C7C2 DllExport.dll - native.cqp.NETCore + native.csharp.NETCore true x86 0 false - false + true false 20000 2 + + - - - - @@ -41,10 +42,10 @@ TextTemplatingFileGenerator StatusExport.cs - + Always - + Always @@ -75,12 +76,6 @@ False - - - - - - @@ -91,4 +86,10 @@ + + + + + + \ No newline at end of file diff --git a/native.cqp.NETCore.json b/native.csharp.NETCore.json similarity index 100% rename from native.cqp.NETCore.json rename to native.csharp.NETCore.json diff --git a/packages/DllExport.1.7.0-beta/gcache/metacor/native.cqp.NETCore/DllExport.dll b/packages/DllExport.1.7.0-beta/gcache/metacor/native.cqp.NETCore/DllExport.dll deleted file mode 100644 index e36b0dcf..00000000 Binary files a/packages/DllExport.1.7.0-beta/gcache/metacor/native.cqp.NETCore/DllExport.dll and /dev/null differ diff --git a/packages/DllExport.1.7.0-beta/gcache/metacor/native.csharp.NETCore/DllExport.dll b/packages/DllExport.1.7.0-beta/gcache/metacor/native.csharp.NETCore/DllExport.dll new file mode 100644 index 00000000..5e66241a Binary files /dev/null and b/packages/DllExport.1.7.0-beta/gcache/metacor/native.csharp.NETCore/DllExport.dll differ diff --git a/packages/DllExport.1.7.0-beta/gcache/metalib/native.cqp.NETCore/DllExport.dll.ddNSi b/packages/DllExport.1.7.0-beta/gcache/metacor/native.csharp.NETCore/DllExport.dll.ddNSi similarity index 66% rename from packages/DllExport.1.7.0-beta/gcache/metalib/native.cqp.NETCore/DllExport.dll.ddNSi rename to packages/DllExport.1.7.0-beta/gcache/metacor/native.csharp.NETCore/DllExport.dll.ddNSi index d575e70f..778483d9 100644 Binary files a/packages/DllExport.1.7.0-beta/gcache/metalib/native.cqp.NETCore/DllExport.dll.ddNSi and b/packages/DllExport.1.7.0-beta/gcache/metacor/native.csharp.NETCore/DllExport.dll.ddNSi differ diff --git a/packages/DllExport.1.7.0-beta/gcache/metacor/native.cqp.NETCore/DllExport.xml b/packages/DllExport.1.7.0-beta/gcache/metacor/native.csharp.NETCore/DllExport.xml similarity index 72% rename from packages/DllExport.1.7.0-beta/gcache/metacor/native.cqp.NETCore/DllExport.xml rename to packages/DllExport.1.7.0-beta/gcache/metacor/native.csharp.NETCore/DllExport.xml index 52fa79d6..57607c10 100644 --- a/packages/DllExport.1.7.0-beta/gcache/metacor/native.cqp.NETCore/DllExport.xml +++ b/packages/DllExport.1.7.0-beta/gcache/metacor/native.csharp.NETCore/DllExport.xml @@ -4,7 +4,7 @@ DllExport - + To export this as __cdecl C-exported function. Named as current method where is used attribute. [.NET DllExport] @@ -13,7 +13,7 @@ https://github.com/3F/DllExport/issues/16 - + Specified calling convention. @@ -25,22 +25,22 @@ https://github.com/3F/Conari also uses __cdecl by default - + Optional name for C-exported function. - + Optional name for C-exported function. Specified calling convention. __cdecl is the default convention in .NET DllExport. - + Optional name for C-exported function. - + Specified calling convention. __cdecl is the default convention in .NET DllExport. - + To export this as __cdecl C-exported function. Named as current method where is used attribute. diff --git a/packages/DllExport.1.7.0-beta/gcache/metalib/native.cqp.NETCore/DllExport.dll b/packages/DllExport.1.7.0-beta/gcache/metalib/native.csharp.NETCore/DllExport.dll similarity index 57% rename from packages/DllExport.1.7.0-beta/gcache/metalib/native.cqp.NETCore/DllExport.dll rename to packages/DllExport.1.7.0-beta/gcache/metalib/native.csharp.NETCore/DllExport.dll index 6a7a7b9e..791fb08e 100644 Binary files a/packages/DllExport.1.7.0-beta/gcache/metalib/native.cqp.NETCore/DllExport.dll and b/packages/DllExport.1.7.0-beta/gcache/metalib/native.csharp.NETCore/DllExport.dll differ diff --git a/packages/DllExport.1.7.0-beta/gcache/metacor/native.cqp.NETCore/DllExport.dll.ddNSi b/packages/DllExport.1.7.0-beta/gcache/metalib/native.csharp.NETCore/DllExport.dll.ddNSi similarity index 66% rename from packages/DllExport.1.7.0-beta/gcache/metacor/native.cqp.NETCore/DllExport.dll.ddNSi rename to packages/DllExport.1.7.0-beta/gcache/metalib/native.csharp.NETCore/DllExport.dll.ddNSi index d575e70f..778483d9 100644 Binary files a/packages/DllExport.1.7.0-beta/gcache/metacor/native.cqp.NETCore/DllExport.dll.ddNSi and b/packages/DllExport.1.7.0-beta/gcache/metalib/native.csharp.NETCore/DllExport.dll.ddNSi differ diff --git a/packages/DllExport.1.7.0-beta/gcache/metalib/native.cqp.NETCore/DllExport.xml b/packages/DllExport.1.7.0-beta/gcache/metalib/native.csharp.NETCore/DllExport.xml similarity index 72% rename from packages/DllExport.1.7.0-beta/gcache/metalib/native.cqp.NETCore/DllExport.xml rename to packages/DllExport.1.7.0-beta/gcache/metalib/native.csharp.NETCore/DllExport.xml index 52fa79d6..57607c10 100644 --- a/packages/DllExport.1.7.0-beta/gcache/metalib/native.cqp.NETCore/DllExport.xml +++ b/packages/DllExport.1.7.0-beta/gcache/metalib/native.csharp.NETCore/DllExport.xml @@ -4,7 +4,7 @@ DllExport - + To export this as __cdecl C-exported function. Named as current method where is used attribute. [.NET DllExport] @@ -13,7 +13,7 @@ https://github.com/3F/DllExport/issues/16 - + Specified calling convention. @@ -25,22 +25,22 @@ https://github.com/3F/Conari also uses __cdecl by default - + Optional name for C-exported function. - + Optional name for C-exported function. Specified calling convention. __cdecl is the default convention in .NET DllExport. - + Optional name for C-exported function. - + Specified calling convention. __cdecl is the default convention in .NET DllExport. - + To export this as __cdecl C-exported function. Named as current method where is used attribute.