Share via


DataConnectionProperties.ShouldPersistProperty Method

Indicates whether a property should be persisted when building a connection string.

Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)

Syntax

'Declaration
Protected Overridable Function ShouldPersistProperty ( _
    name As String _
) As Boolean
protected virtual bool ShouldPersistProperty(
    string name
)
protected:
virtual bool ShouldPersistProperty(
    String^ name
)
abstract ShouldPersistProperty : 
        name:string -> bool 
override ShouldPersistProperty : 
        name:string -> bool 
protected function ShouldPersistProperty(
    name : String
) : boolean

Parameters

Return Value

Type: System.Boolean
false if the specified property is not recognized, is not set, or if it is set to the default value; otherwise, true.

Exceptions

Exception Condition
ArgumentNullException

The name parameter is nulla null reference (Nothing in Visual Basic).

Remarks

This method is called by the base implementation of the ToDisplayString and ToSafeString methods to determine whether a natively recognized property should be included in the connection string representation of the current DataConnectionProperties instance.

The base implementation of this method returns false if the specified property is not recognized, is not set, or is set to the default value; otherwise, it returns true.

.NET Framework Security

See Also

Reference

DataConnectionProperties Class

Microsoft.VisualStudio.Data.Framework Namespace