コード例 #1
0
		/// <summary>	
		/// 由托管环境初始化的 <see cref="CQEventExport"/> 的新实例	
		/// </summary>	
		static CQEventExport ()	
		{	
			// 初始化 Costura.Fody	
			CosturaUtility.Initialize ();	
			
			Type appDataType = typeof (AppData);	
			appDataType.GetRuntimeProperty ("UnityContainer").GetSetMethod (true).Invoke (null, new object[] { new UnityContainer () });	
			// 调用方法进行注册	
			CQMain.Register (AppData.UnityContainer);	
			
			// 调用方法进行实例化	
			ResolveBackcall ();	
		}	
コード例 #2
0
        /// <summary>
        /// 由托管环境初始化的 <see cref="CQEventExport"/> 的新实例
        /// </summary>
        static CQEventExport()
        {
            // 初始化 Costura.Fody
            CosturaUtility.Initialize();

            Type type = typeof(Common.AppInfo);                 // 反射初始化容器

            type.GetProperty("Id", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "me.cqp.ritsukage.RitsukageBot" });
            type.GetProperty("ResultCode", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { 1 });
            type.GetProperty("ApiVersion", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { 9 });
            type.GetProperty("Name", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "Ritsukage Utsumabo" });
            type.GetProperty("Version", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { new Version("3.1.12.1302") });
            type.GetProperty("VersionId", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { 2 });
            type.GetProperty("Author", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "Ritsukage" });
            type.GetProperty("Description", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "小律影酷Q基础插件" });
            type.GetProperty("UnityContainer", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { new UnityContainer() });

            // 调用方法进行注册
            CQMain.Register(Common.AppInfo.UnityContainer);

            // 调用方法进行实例化
            ResolveBackcall();
        }
コード例 #3
0
        /// <summary>
        /// 由托管环境初始化的 <see cref="CQEventExport"/> 的新实例
        /// </summary>
        static CQEventExport()
        {
            // 初始化 Costura.Fody
            CosturaUtility.Initialize();

            Type type = typeof(Common.AppInfo);                 // 反射初始化容器

            type.GetProperty("Id", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "Native.Csharp" });
            type.GetProperty("ResultCode", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { 1 });
            type.GetProperty("ApiVersion", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { 9 });
            type.GetProperty("Name", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "酷Q样例应用 for C#" });
            type.GetProperty("Version", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { new Version("1.0.0") });
            type.GetProperty("VersionId", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { 1 });
            type.GetProperty("Author", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "JieGG" });
            type.GetProperty("Description", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "酷Q样例应用(V9应用机制)" });
            type.GetProperty("UnityContainer", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { new UnityContainer() });

            // 调用方法进行注册
            CQMain.Register(Common.AppInfo.UnityContainer);

            // 调用方法进行实例化
            ResolveBackcall();
        }
コード例 #4
0
        /// <summary>
        /// 由托管环境初始化的 <see cref="CQEventExport"/> 的新实例
        /// </summary>
        static CQEventExport()
        {
            // 初始化 Costura.Fody
            CosturaUtility.Initialize();

            Type type = typeof(Common.AppInfo);                 // 反射初始化容器

            type.GetProperty("Id", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "cx.rain.cqp.whatdidtoday" });
            type.GetProperty("ResultCode", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { 1 });
            type.GetProperty("ApiVersion", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { 9 });
            type.GetProperty("Name", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "今天做什么" });
            type.GetProperty("Version", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { new Version("1.0.0") });
            type.GetProperty("VersionId", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { 1 });
            type.GetProperty("Author", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "雨宫时雨" });
            type.GetProperty("Description", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "让创作者及时向群里汇报这一天做了什么,接受大家的监督,从此告别咕咕咕。" });
            type.GetProperty("UnityContainer", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { new UnityContainer() });

            // 调用方法进行注册
            CQMain.Register(Common.AppInfo.UnityContainer);

            // 调用方法进行实例化
            ResolveBackcall();
        }
コード例 #5
0
        /// <summary>
        /// 由托管环境初始化的 <see cref="CQEventExport"/> 的新实例
        /// </summary>
        static CQEventExport()
        {
            // 初始化 Costura.Fody
            CosturaUtility.Initialize();

            Type type = typeof(Common.AppInfo);                 // 反射初始化容器

            type.GetProperty("Id", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "io.github.buger404.intallk" });
            type.GetProperty("ResultCode", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { 1 });
            type.GetProperty("ApiVersion", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { 9 });
            type.GetProperty("Name", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "黑嘴群聊机器人" });
            type.GetProperty("Version", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { new Version("1.0.0") });
            type.GetProperty("VersionId", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { 1 });
            type.GetProperty("Author", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "Buger404" });
            type.GetProperty("Description", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { "专属黑嘴群聊机器人,活跃气氛,助推吹水" });
            type.GetProperty("UnityContainer", BindingFlags.Public | BindingFlags.Static).SetMethod.Invoke(null, new object[] { new UnityContainer() });

            // 调用方法进行注册
            CQMain.Register(Common.AppInfo.UnityContainer);

            // 调用方法进行实例化
            ResolveBackcall();
        }