private void Authenticate(bool isFirstBoot, Action internalOnAuthenticated) { this.httpRequestHeaderDelegate = OnHttpRequest; this.httpResponseHandlingDelegate = HttpResponseHandling; this.assetBundleListGetRequestHeaderDelegate = OnAssetBundleListGetRequest; this.assetBundlePreloadListGetRequestHeaderDelegate = OnAssetBundlePreloadListGetRequest; this.assetBundleGetRequestHeaderDelegate = OnAssetBundleGetRequest; Action onAuthSucceeded = () => { internalOnAuthenticated(); onAuthenticated(); }; Action <int, string> onBootAuthenticationRetryFailed = (code, reason) => { onBootAuthFailed(code, reason); }; Action <int, string> onRefreshAuthenticationRetryFailed = (code, reason) => { onRefreshAuthFailed(code, reason); }; _autoyaAuthRouter = new AuthRouter( this.mainthreadDispatcher, onAuthSucceeded, onBootAuthenticationRetryFailed, onAuthSucceeded, onRefreshAuthenticationRetryFailed, isFirstBoot ); }
private void Authenticate(bool isFirstBoot, Action internalOnAuthenticated) { // setup request headers handling. this.httpRequestHeaderDelegate = OnHttpRequest; Action onAuthSucceeded = () => { internalOnAuthenticated(); onAuthenticated(); }; Action <int, string> onBootAuthenticationRetryFailed = (code, reason) => { onBootAuthFailed(code, reason); }; Action <int, string> onRefreshAuthenticationRetryFailed = (code, reason) => { onRefreshAuthFailed(code, reason); }; _autoyaAuthRouter = new AuthRouter( this.mainthreadDispatcher, onAuthSucceeded, onBootAuthenticationRetryFailed, onAuthSucceeded, onRefreshAuthenticationRetryFailed, isFirstBoot ); }