DataConnectionProperties.ShouldPersistProperty Method
Indicates whether a property should be persisted when building a connection string.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Declaration
Protected Overridable Function ShouldPersistProperty ( _
propertyName As String _
) As Boolean
protected virtual bool ShouldPersistProperty(
string propertyName
)
protected:
virtual bool ShouldPersistProperty(
String^ propertyName
)
abstract ShouldPersistProperty :
propertyName:string -> bool
override ShouldPersistProperty :
propertyName:string -> bool
protected function ShouldPersistProperty(
propertyName : String
) : boolean
Parameters
propertyName
Type: System.StringThe name of a property.
Return Value
Type: System.Boolean
Returns false if the specified property is not recognized, is not set, or if it is set to the default value; otherwise, it returns true.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The Name parameter is null. |
Remarks
This method is called by the base implementation of the ToDisplayString and ToFullString methods to decide 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.