attachToParent method

  1. @override
void attachToParent(
  1. Binding parent
)
override

Implementation

@override
void attachToParent(Binding parent) {
  super.attachToParent(parent);

  var _route = findAncestorBindingOfType<RouteBinding>();
  var _service = findAncestorBindingOfType<ServerBinding>();

  if (_route == null && _service == null) {
    throw UnsupportedError("Each Gateway must ancestor of Service or Route"
        "\nwhere:$_errorWhere");
  }
}