Пример #1
0
 public static SecurityProvider GetInstance()
 {
     if (instance == null)
     {
         Provider configuration = SecuritySection.Current.Provider;
         string providerNotLoadedMsg = string.Format("Security Provider {0} cannot be loaded!",
                                                     configuration.Type);
         try
         {
             instance = CreateInstance(configuration);
         }
         catch (Exception ex)
         {
             throw new Exception(providerNotLoadedMsg, ex);
         }
         if (instance == null)
             throw new Exception(providerNotLoadedMsg);
     }
     return instance;
 }
 public SecurityProviderSettingException(string setting, SecurityProvider provider)
     : base(string.Format("The setting {0} doesn't exist! Available settings: {1}",
                          setting, provider.SettingsKeys))
 {
 }