public static bool HasLegalNativeConfig(this TencentCloudClsSinkOptions options, bool onlyCheckCollConfig) { if (options == null) { return(false); } if (options.TencentCloudClsNativeConfigs.Any()) { return(options.TencentCloudClsNativeConfigs.All(o => !string.IsNullOrWhiteSpace(o.Key) && o.Value.IsValid())); } if (onlyCheckCollConfig) { return(false); } return(!string.IsNullOrWhiteSpace(options.RequestUri) && !string.IsNullOrWhiteSpace(options.SecretId) && !string.IsNullOrWhiteSpace(options.SecretKey) && !string.IsNullOrWhiteSpace(options.TopicId)); }
/// <summary> /// Create a new instance of <see cref="TencentCloudClsPayloadClientProvider"/>. /// </summary> /// <param name="settings"></param> /// <param name="loggingConfiguration"></param> public TencentCloudClsPayloadClientProvider(IOptions <TencentCloudClsSinkOptions> settings, LoggingConfiguration loggingConfiguration) { _sinkOptions = settings == null ? new TencentCloudClsSinkOptions() : settings.Value; _loggingConfiguration = loggingConfiguration ?? throw new ArgumentNullException(nameof(loggingConfiguration)); }