private void HandleResult(GuestControllerResult <SiteConfigurationResponse> gcResult, Action <IInternalGetRegistrationConfigurationResult> callback)
    {
        SiteConfigurationResponse response = gcResult.Response;

        if (!gcResult.Success)
        {
            callback(new GetRegistrationConfigurationResult(success: false, null));
            return;
        }
        IInternalGetRegistrationConfigurationResult regConfigResult = GuestControllerErrorParser.GetRegConfigResult(response.error);

        if (regConfigResult != null)
        {
            callback(regConfigResult);
            return;
        }
        if (!ValidateResponse(response))
        {
            callback(new GetRegistrationConfigurationResult(success: false, null));
            return;
        }
        RegistrationConfiguration configuration = new RegistrationConfiguration(response.data, ageBandBuilder);

        callback(new GetRegistrationConfigurationResult(success: true, configuration));
    }
 private static bool ValidateResponse(SiteConfigurationResponse response)
 {
     return(ValidateResponseNotNull(response.data) && ValidateAgeBandKey(response.data.compliance.defaultAgeBand) && GetDefaultAgeBand(response.data.compliance) != null && GetDefaultLegalGroup(response.data) != null);
 }