/// <summary> /// /// </summary> /// <param name="service"></param> /// <param name="options"></param> public IPAddressMiddleware( IPAddressCnService service, IPAddressModuleOptions options) { this.service = service ?? throw new ArgumentNullException(nameof(service)); this.options = options ?? new IPAddressModuleOptions(); }
/// <summary> /// /// </summary> /// <param name="service"></param> /// <param name="options"></param> public IPAddressMiddleware( IPAddressCnService service, IOptions <IPAddressModuleOptions> options) { this.service = service ?? throw new ArgumentNullException(nameof(service)); this.options = options.Value; }