/// <summary>
 /// Constructor overload implementation
 /// </summary>
 protected BasePresentation(AuthenticationProvider provider, IAuthenticationContext context, string message, ProviderPageMode suite, bool disableoptions = false)
 {
     this.Provider             = provider;
     this.Context              = new AuthenticationContext(context);
     this.Context.TargetUIMode = suite;
     this.Context.UIMessage    = message;
     this.IsPermanentFailure   = (this.Context.TargetUIMode == ProviderPageMode.DefinitiveError);
     this.IsMessage            = (this.Context.TargetUIMode != ProviderPageMode.DefinitiveError);
     this.DisableOptions       = disableoptions;
     this.Resources            = new ResourcesLocale(context.Lcid);
 }
        /// <summary>
        /// Constructor overload implementation
        /// </summary>
        public AdapterPresentation(AuthenticationProvider provider, IAuthenticationContext context, string message, ProviderPageMode suite, bool disableoptions = false)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("Provider");
            }
            if (provider.Config == null)
            {
                throw new ArgumentNullException("Config");
            }
            switch (provider.Config.UiKind)
            {
            case ADFSUserInterfaceKind.Default2019:
                _adapter = new AdapterPresentation2019(provider, context, message, suite, disableoptions);
                _adapter.UseUIPaginated = provider.Config.UseUIPaginated;
                break;

            default:
                _adapter = new AdapterPresentationDefault(provider, context, message, suite, disableoptions);
                _adapter.UseUIPaginated = false;
                break;
            }
        }