DataConnectionProperties.ResolveSynonym Method
Attempts to resolves a synonym for the PropertyDescriptor associated with a base property by returning the base property descriptor.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Declaración
Protected Function ResolveSynonym ( _
name As String, _
setAsBaseName As Boolean _
) As PropertyDescriptor
protected PropertyDescriptor ResolveSynonym(
string name,
bool setAsBaseName
)
protected:
PropertyDescriptor^ ResolveSynonym(
String^ name,
bool setAsBaseName
)
member ResolveSynonym :
name:string *
setAsBaseName:bool -> PropertyDescriptor
protected function ResolveSynonym(
name : String,
setAsBaseName : boolean
) : PropertyDescriptor
Parameters
- name
Type: System.String
The name of a synonym.
- setAsBaseName
Type: System.Boolean
Indicates whether this name should be set as the base name for the property, if found.
Return Value
Type: System.ComponentModel.PropertyDescriptor
Returns the descriptor of the base property located for the specified synonym.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The name parameter is null. |
Remarks
Use this method when dealing with synonyms.
When you fail to locate a property by calling the GetProperty method, you should pass the name to this method in order to determine whether or not the name is a synonym for a known property.
In cases where a client tries to set the value of a property using a synonym for the actual property name, the base implementation of the class indexer passes true for the setAsBaseName parameter, indicating that the synonym name should become the new base name for the property. This causes the existing property to be removed and a new property to be added, using the synonym as the name.
.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.