示例#1
0
 /// <summary>
 /// Set the application entry point
 /// </summary>
 /// <param name="builder"></param>
 /// <typeparam name="T">The class containing the entry point</typeparam>
 /// <returns></returns>
 public static IApplicationBuilder UseMain <T>(this IApplicationBuilder builder) where T : IEntryPointClass
 {
     builder.BuildActionsCoordinator.AddAction(DefaultBuildActions.ConsoleMainBuildAction((container) =>
     {
         container.Resolve <T>().Start(container);
     }));
     return(builder);
 }
示例#2
0
 /// <summary>
 /// Set the application entry point
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="entryPoint">The class containing the entry point.</param>
 /// <returns></returns>
 public static IApplicationBuilder UseMain(this IApplicationBuilder builder,
                                           IEntryPointClass entryPoint)
 {
     builder.BuildActionsCoordinator.AddAction(DefaultBuildActions.ConsoleMainBuildAction(entryPoint.Start));
     return(builder);
 }
示例#3
0
 /// <summary>
 /// Set the application entry point
 /// </summary>
 /// <param name="builder"></param>
 /// <param name="entryPoint">Application main method</param>
 /// <returns></returns>
 public static IApplicationBuilder UseMain(this IApplicationBuilder builder,
                                           Action <IContainer> entryPoint)
 {
     builder.BuildActionsCoordinator.AddAction(DefaultBuildActions.ConsoleMainBuildAction(entryPoint));
     return(builder);
 }