disableByClassId method

TSubsystemFactory<TSubsystem> disableByClassId(
  1. String classId
)

Marks a subsystem configuration as disabled so it will not be constructed.

Implementation

TSubsystemFactory<TSubsystem> disableByClassId(String classId) {
  final serviceParams = findServiceParametersByClassId(classId);
  if (serviceParams != null) {
    serviceParams.abortBuild();
    return this;
  } else {
    throw SubsystemNotFoundException(
      'Cannot disable subsystem: classId "$classId" not found in factory registrations',
      classId: classId,
    );
  }
}