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
name
Type: System.StringThe name of a property.
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
- 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.