Visual Basic (Declaration) | |
---|---|
Function GetKey( _ ByVal keyName As String, _ ByVal keyExtension As String, _ ByVal onServer As Boolean _ ) As IDataSourceKey |
Visual Basic (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) |
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 desirednull
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 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