/// <summary> /// 添加服务运行时服务。 /// </summary> /// <param name="builder">服务构建者。</param> /// <returns>服务构建者。</returns> public static IServiceBuilder AddServiceRuntime(this IServiceBuilder builder) { builder.Services.RegisterType(typeof(DefaultServiceEntryLocate)).As(typeof(IServiceEntryLocate)).SingleInstance(); builder.Services.RegisterType(typeof(DefaultServiceExecutor)).As(typeof(IServiceExecutor)).SingleInstance(); return(builder.AddRuntime()); }