共用方式為


ConfigurationHelperService.ReadSettings Method

Reads settings from the appropriate section.

Namespace:  Microsoft.VisualStudio.Shell.Design.Serialization
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'宣告
<ConfigurationPermissionAttribute(SecurityAction.Assert, Unrestricted := True)> _
Public Function ReadSettings ( _
    fileMap As ExeConfigurationFileMap, _
    userLevel As ConfigurationUserLevel, _
    appConfigDocData As DocData, _
    sectionName As String, _
    isUserScoped As Boolean, _
    settings As SettingsPropertyCollection _
) As SettingsPropertyValueCollection
'用途
Dim instance As ConfigurationHelperService
Dim fileMap As ExeConfigurationFileMap
Dim userLevel As ConfigurationUserLevel
Dim appConfigDocData As DocData
Dim sectionName As String
Dim isUserScoped As Boolean
Dim settings As SettingsPropertyCollection
Dim returnValue As SettingsPropertyValueCollection

returnValue = instance.ReadSettings(fileMap, _
    userLevel, appConfigDocData, sectionName, _
    isUserScoped, settings)
[ConfigurationPermissionAttribute(SecurityAction.Assert, Unrestricted = true)]
public SettingsPropertyValueCollection ReadSettings(
    ExeConfigurationFileMap fileMap,
    ConfigurationUserLevel userLevel,
    DocData appConfigDocData,
    string sectionName,
    bool isUserScoped,
    SettingsPropertyCollection settings
)
[ConfigurationPermissionAttribute(SecurityAction::Assert, Unrestricted = true)]
public:
SettingsPropertyValueCollection^ ReadSettings(
    ExeConfigurationFileMap^ fileMap, 
    ConfigurationUserLevel userLevel, 
    DocData^ appConfigDocData, 
    String^ sectionName, 
    bool isUserScoped, 
    SettingsPropertyCollection^ settings
)
[<ConfigurationPermissionAttribute(SecurityAction.Assert, Unrestricted = true)>]
member ReadSettings : 
        fileMap:ExeConfigurationFileMap * 
        userLevel:ConfigurationUserLevel * 
        appConfigDocData:DocData * 
        sectionName:string * 
        isUserScoped:bool * 
        settings:SettingsPropertyCollection -> SettingsPropertyValueCollection 
public function ReadSettings(
    fileMap : ExeConfigurationFileMap, 
    userLevel : ConfigurationUserLevel, 
    appConfigDocData : DocData, 
    sectionName : String, 
    isUserScoped : boolean, 
    settings : SettingsPropertyCollection
) : SettingsPropertyValueCollection

Parameters

  • sectionName
    Type: System.String
    The name of the section of the configuration file.
  • isUserScoped
    Type: System.Boolean
    True if the section contains user-specific settings.

Return Value

Type: System.Configuration.SettingsPropertyValueCollection
SettingsPropertyValueCollection.

Remarks

If a setting already exists in settings, the value is updated.

.NET Framework Security

See Also

Reference

ConfigurationHelperService Class

ConfigurationHelperService Members

Microsoft.VisualStudio.Shell.Design.Serialization Namespace