コード例 #1
0
 public static IWeChatServiceBuilder AddMessageNotifier <T>(this IWeChatServiceBuilder builder)
     where T : class, IMessageNotifier
 {
     builder.Services.Replace(ServiceDescriptor.Singleton <IMessageNotifier, T>());
     return(builder);
 }
コード例 #2
0
 public static IWeChatServiceBuilder AddRequestFilter <T>(this IWeChatServiceBuilder builder)
     where T : class, IWeChatRequestFilter
 {
     builder.Services.Replace(ServiceDescriptor.Singleton <IWeChatRequestFilter, T>());
     return(builder);
 }
コード例 #3
0
 public static IWeChatServiceBuilder AddTokenStore <T>(this IWeChatServiceBuilder builder)
     where T : class, ITokenStore
 {
     builder.Services.Replace(ServiceDescriptor.Singleton <ITokenStore, T>());
     return(builder);
 }