/// <summary> /// Sets the limit on all GetAllAsync responses with QueryableBaseRequest /// </summary> /// <param name="limit"></param> /// <returns></returns> public IMailChimpManager Configure(MailChimpConfiguration config) { this.Limit = config.Limit == 0 ? MailChimpConfiguration.DefaultLimit : config.Limit; this.ApiKey = string.IsNullOrWhiteSpace(config.ApiKey) ? this.ApiKey : config.ApiKey; typeof(MailChimpManager).GetProperties().Select(x => x.GetValue(this)).OfType <BaseLogic>().ToList().ForEach(x => x._limit = this.Limit); return(this); }
public static IMailChimpManager Create(MailChimpConfiguration config) { var mailChimpManager = (new MailChimpManager()).Configure(config); return(mailChimpManager); }