ConfigurationHelperService.WriteConnectionStrings Method

Writes the connection strings to the specified configuration file after deleting any existing connection strings with the specified prefix.

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

Syntax

'Declaration
Public Sub WriteConnectionStrings ( _
    configFileName As String, _
    configDocData As DocData, _
    groupPrefix As String, _
    connectionStrings As ConnectionStringSettingsCollection _
)
public void WriteConnectionStrings(
    string configFileName,
    DocData configDocData,
    string groupPrefix,
    ConnectionStringSettingsCollection connectionStrings
)
public:
void WriteConnectionStrings(
    String^ configFileName, 
    DocData^ configDocData, 
    String^ groupPrefix, 
    ConnectionStringSettingsCollection^ connectionStrings
)
member WriteConnectionStrings : 
        configFileName:string * 
        configDocData:DocData * 
        groupPrefix:string * 
        connectionStrings:ConnectionStringSettingsCollection -> unit
public function WriteConnectionStrings(
    configFileName : String, 
    configDocData : DocData, 
    groupPrefix : String, 
    connectionStrings : ConnectionStringSettingsCollection
)

Parameters

  • configFileName
    Type: String

    The target configuration file.

  • groupPrefix
    Type: String

    The section of the file where the connectionStrings should be written.

Remarks

This first clears all existing strings in the groupPrefix section.

.NET Framework Security

See Also

Reference

ConfigurationHelperService Class

Microsoft.VisualStudio.Shell.Design.Serialization Namespace