ContextRule constructor

ContextRule({
  1. String? selector,
  2. Iterable<String>? requested,
  3. Iterable<String>? provided,
  4. Iterable<String>? allowedRequestExtensions,
  5. Iterable<String>? allowedResponseExtensions,
})

Implementation

factory ContextRule({
  $core.String? selector,
  $core.Iterable<$core.String>? requested,
  $core.Iterable<$core.String>? provided,
  $core.Iterable<$core.String>? allowedRequestExtensions,
  $core.Iterable<$core.String>? allowedResponseExtensions,
}) {
  final _result = create();
  if (selector != null) {
    _result.selector = selector;
  }
  if (requested != null) {
    _result.requested.addAll(requested);
  }
  if (provided != null) {
    _result.provided.addAll(provided);
  }
  if (allowedRequestExtensions != null) {
    _result.allowedRequestExtensions.addAll(allowedRequestExtensions);
  }
  if (allowedResponseExtensions != null) {
    _result.allowedResponseExtensions.addAll(allowedResponseExtensions);
  }
  return _result;
}