コード例 #1
0
 /// <summary>
 /// Use the basic object mapper
 /// </summary>
 public static TBuilder UseBasicMapper <TBuilder>(this TBuilder builder) where TBuilder : IApplicationBuilder
 {
     builder.BuildActionsCoordinator.AddAction(DefaultBuildActions.MapperBuildAction((container) =>
     {
         container.RegisterInstance <IObjectMapper, BasicObjectMapper>();
     }));
     return(builder);
 }
コード例 #2
0
 /// <summary>
 /// Use the IL object mapper
 /// </summary>
 public static IApplicationBuilder UseILMapper(this IApplicationBuilder builder)
 {
     builder.BuildActionsCoordinator.AddAction(DefaultBuildActions.MapperBuildAction((container) =>
     {
         container.RegisterInstance <IObjectMapper, ILObjectsMapper>();
     }));
     return(builder);
 }