IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > IDataSourceKeyResolver Interface : GetKey Method |
'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)
IDataSourceKey GetKey( string keyName, string keyExtension, bool onServer )
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.
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