private void HandleGetRegistrationConfiguration(IInternalGetRegistrationConfigurationResult result, ISession session, GuestApiErrorCollection errors, Action <BuildLegalMarketingErrorsResult> successCallback, Action failureCallback) { IInternalRegistrationConfiguration internalConfiguration = result.InternalConfiguration; if (!result.Success || internalConfiguration == null) { session.Dispose(); failureCallback(); return; } int age = CalculateAge(session.LocalUser.RegistrationProfile.DateOfBirth); internalConfiguration.GetUpdateAgeBand(session.LocalUser.RegistrationProfile.AgeBandKey, age, languagePreference, delegate(IGetAgeBandResult bandResult) { if (!bandResult.Success) { session.Dispose(); failureCallback(); } else { FindMatches(bandResult.AgeBand, errors, successCallback, failureCallback); } }); }
public GetRegistrationConfigurationResult(bool success, IInternalRegistrationConfiguration configuration) { Success = success; InternalConfiguration = configuration; }