load function

void load(
  1. PitelSipSettings src,
  2. PitelSipSettings? dst
)

Implementation

void load(PitelSipSettings src, PitelSipSettings? dst) {
  try {
    // Check Mandatory parameters.
    checks.mandatory.forEach((String parameter,
        Null Function(PitelSipSettings, PitelSipSettings?) fun) {
      logger.info('Check mandatory parameter => $parameter.');
      fun(src, dst);
    });

    // Check Optional parameters.
    checks.optional.forEach((String parameter,
        Null Function(PitelSipSettings, PitelSipSettings?) fun) {
      logger.debug('Check optional parameter => $parameter.');
      fun(src, dst);
    });
  } catch (e) {
    logger.error('Failed to load config: ${e.toString()}');
    rethrow;
  }
}