AzureMobileAuthN.SampleApp.WindowsPhone.Setup.InitializeLastChance C# (CSharp) Method

InitializeLastChance() protected method

protected InitializeLastChance ( ) : void
return void
        protected override void InitializeLastChance()
        {
            base.InitializeLastChance();

            // now let's tell setup that whenever anyone asks for an IAuthNProvider
            // from this client application, give them this same single instance (Singleton)
            // of AuthenticationProvider:

            // original approach used in N+31 sample
            // TODO: but should I be using new instances for login code with dynamic syntax?
            Mvx.RegisterSingleton<IAuthNProvider>
                (new AuthenticationProvider());

            // TODO:  Which is better in this case? This "Lazy" one or the one above?
            // Mvx.RegisterSingleton<IAuthenticationProvider>(() => new AuthenticationProvider());
        }