IdeaBlade DevForce 2010 Help Reference
GetKey Method
See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > IDataSourceKeyResolver Interface : GetKey Method



keyName
Data source key name
keyExtension
Extension or empty string
onServer
True if called from the EntityServer
Returns the IdeaBlade.Core.IDataSourceKey for a given key name and extension.

Syntax

Visual Basic (Declaration) 
Function GetKey( _
   ByVal keyName As String, _
   ByVal keyExtension As String, _
   ByVal onServer As Boolean _
) As IDataSourceKey
Visual Basic (Usage)Copy Code
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)
C# 
IDataSourceKey GetKey( 
   string keyName,
   string keyExtension,
   bool onServer
)
C++/CLI 
IDataSourceKey^ GetKey( 
   String^ keyName,
   String^ keyExtension,
   bool 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 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.