System.Configuration.ClientSettingsStore.ClientSettingsConfigurationHost.InitForConfiguration C# (CSharp) Метод

InitForConfiguration() публичный Метод

public InitForConfiguration ( string &locationSubPath, string &configPath, string &locationConfigPath, IInternalConfigRoot configRoot ) : void
locationSubPath string
configPath string
locationConfigPath string
configRoot IInternalConfigRoot
Результат void
            public override void InitForConfiguration(ref string locationSubPath, out string configPath, out string locationConfigPath, 
                    IInternalConfigRoot configRoot, params object[] hostInitConfigurationParams) {
    
                ConfigurationUserLevel userLevel = (ConfigurationUserLevel) hostInitConfigurationParams[0];
                string desiredConfigPath = null;
                Host = (IInternalConfigHost) TypeUtil.CreateInstanceWithReflectionPermission(ClientConfigurationHostTypeName);

                switch (userLevel) {
                    case ConfigurationUserLevel.None:
                        desiredConfigPath = ClientHost.GetExeConfigPath();
                        break;
    
                    case ConfigurationUserLevel.PerUserRoaming:
                        desiredConfigPath = ClientHost.GetRoamingUserConfigPath();
                        break;
    
                    case ConfigurationUserLevel.PerUserRoamingAndLocal:
                        desiredConfigPath = ClientHost.GetLocalUserConfigPath();
                        break;
    
                    default: 
                        throw new ArgumentException(SR.GetString(SR.UnknownUserLevel));
                }
    
                
                Host.InitForConfiguration(ref locationSubPath, out configPath, out locationConfigPath, configRoot, null, null, desiredConfigPath);
            }