Beispiel #1
0
 static RoleManager()
 {
     Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
     if (config.AppSettings.Settings.AllKeys.Contains("RoleManagerProvider"))
     {
         try
         {
             Type type = System.Reflection.TypeDelegator.GetType(config.AppSettings.Settings["RoleManagerProvider"].Value);
             if (type != null)
             {
                 provider = (RoleManagerProvider)Activator.CreateInstance(type);
                 return;
             }
         }
         catch
         {
         }
     }
     provider = new DefaultRoleManager();
 }
Beispiel #2
0
        static RoleManager()
        {
            Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
            if (config.AppSettings.Settings.AllKeys.Contains("RoleManagerProvider"))
            {
                try
                {
                    Type type = System.Reflection.TypeDelegator.GetType(config.AppSettings.Settings["RoleManagerProvider"].Value);
                    if (type != null)
                    {
                        provider = (RoleManagerProvider)Activator.CreateInstance(type);
                        return;
                    }
                }
                catch
                {

                }
            }
            provider = new DefaultRoleManager();
        }