ConfigurationHelperService.WriteSettings Method
Writes settings to the appropriate section after clearing existing settings.
Namespace: Microsoft.VisualStudio.Shell.Design.Serialization
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
'Declaration
Public Sub WriteSettings ( _
fileMap As ExeConfigurationFileMap, _
userLevel As ConfigurationUserLevel, _
appConfigDocData As DocData, _
sectionName As String, _
isUserScoped As Boolean, _
values As SettingsPropertyValueCollection _
)
'Usage
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 values As SettingsPropertyValueCollection
instance.WriteSettings(fileMap, userLevel, _
appConfigDocData, sectionName, isUserScoped, _
values)
public void WriteSettings(
ExeConfigurationFileMap fileMap,
ConfigurationUserLevel userLevel,
DocData appConfigDocData,
string sectionName,
bool isUserScoped,
SettingsPropertyValueCollection values
)
public:
void WriteSettings(
ExeConfigurationFileMap^ fileMap,
ConfigurationUserLevel userLevel,
DocData^ appConfigDocData,
String^ sectionName,
bool isUserScoped,
SettingsPropertyValueCollection^ values
)
member WriteSettings :
fileMap:ExeConfigurationFileMap *
userLevel:ConfigurationUserLevel *
appConfigDocData:DocData *
sectionName:string *
isUserScoped:bool *
values:SettingsPropertyValueCollection -> unit
public function WriteSettings(
fileMap : ExeConfigurationFileMap,
userLevel : ConfigurationUserLevel,
appConfigDocData : DocData,
sectionName : String,
isUserScoped : boolean,
values : SettingsPropertyValueCollection
)
Parameters
- userLevel
Type: System.Configuration.ConfigurationUserLevel
ConfigurationUserLevel.
- appConfigDocData
Type: Microsoft.VisualStudio.Shell.Design.Serialization.DocData
The DocData for the configuration file.
- sectionName
Type: System.String
The name of the section to write to.
- isUserScoped
Type: System.Boolean
true if the settings are user-specific, otherwise false.
- values
Type: System.Configuration.SettingsPropertyValueCollection
The SettingsPropertyValueCollection from which to read the settings.
Remarks
If values is nulla null reference (Nothing in Visual Basic) or empty, the settings will be cleared.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
ConfigurationHelperService Class