Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /www/wwwroot/dev.zhalaotie.com/wp-includes/wp-db.php on line 3215

Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /www/wwwroot/dev.zhalaotie.com/wp-includes/wp-db.php on line 3215
Rhythm Framework 框架新特性 – 扎老铁
Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /www/wwwroot/dev.zhalaotie.com/wp-includes/wp-db.php on line 3215

Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /www/wwwroot/dev.zhalaotie.com/wp-includes/wp-db.php on line 3215
Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /www/wwwroot/dev.zhalaotie.com/wp-includes/wp-db.php on line 3215
class="post-53311 post type-post status-publish format-standard hentry">

Rhythm Framework 框架新特性

New feature:

add support for non-static EventProcessor (see NonStaticEventProcessor) & event listener with type/component depedency

using Rhythm;
using Rhythm.Foundation;
using Rhythm.ErrorHandling;
using Rhythm.Web;
using Rhythm.Startup;

namespace Rhythm.Sample.Web
{
    public class NonStaticEventProcessor
    {
        public IUserRepository Repos { get; set; }

        public void On(End<InitComponent<ServiceManager>> @event, WorkContext wc, IMembershipService ms)
        {
            System.Console.WriteLine(Repos);
            System.Console.WriteLine(ms);
            System.Console.WriteLine(wc);
        }
    }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Rhythm;
using Rhythm.Foundation;
using Rhythm.Data;
using Rhythm.Web;
using Rhythm.Startup;
using Rhythm.Security.AccessControl;
using Rhythm.Console;

namespace Rhythm.Sample.Web
{
    public class StartupEventProcessor
    {
  
        /// <summary>
        /// event listener with type/component depedency
        /// </summary>
        /// <param name="event"></param>
        /// <param name="wc"></param>
        /// <param name="ms"></param>
        public static void On(End<InitComponent<ServiceManager>> @event, WorkContext wc, IMembershipService ms)
        {
            System.Console.WriteLine(ms);
            System.Console.WriteLine(wc);
        }


        public static void On(End<InitComponent<ServiceManager>> @event)
        {
        }

    }
}

 

发表评论

电子邮件地址不会被公开。