예제 #1
0
 public SpearClient(SpearOption option)
 {
     _option  = option;
     _logger  = CurrentIocManager.CreateLogger <SpearClient>();
     _headers = new Dictionary <string, string>();
 }
 public static IServiceCollection AddSpear(this IServiceCollection services, SpearOption option = null)
 {
     option = option ?? new SpearOption();
     services.TryAddSingleton(provider => new SpearClient(option));
     return(services);
 }