DevForce Help Reference
GetKey Method (IDataSourceKeyResolver)


Data source key name
Extension or empty string
True if called from the EntityServer
Returns the IdeaBlade.Core.IDataSourceKey for a given key name and extension.
Syntax
'Declaration
 
Function GetKey( _
   ByVal keyName As String, _
   ByVal keyExtension As String, _
   ByVal onServer As Boolean _
) As IDataSourceKey
'Usage
 
Dim instance As IDataSourceKeyResolver
Dim keyName As String
Dim keyExtension As String
Dim onServer As Boolean
Dim value As IDataSourceKey
 
value = instance.GetKey(keyName, keyExtension, onServer)

Parameters

keyName
Data source key name
keyExtension
Extension or empty string
onServer
True if called from the EntityServer

Return Value

A data source key or null if default key resolution is desired
Remarks
If a null key is returned the DefaultDataSourceKeyResolver will attempt to resolve the key.

GetKey will be called once per keyName and keyExtension on both the client and server. If you need to secure your client connection information you may want to implement separate versions of this class on the client and server tiers.

The IDataSourceKey returned is stored in a map, and the same key is reused whenever the same key name and extension are encountered. Note that on the server this means that the same key will be used by any users of your application: user-specific keys are not supported.

Any exception thrown in your GetKey implementation will be returned to the calling client.

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IDataSourceKeyResolver Interface
IDataSourceKeyResolver Members

Send Feedback