IdeaBlade DevForce 2010 Help Reference
GetServiceKey Method
See Also  Send Feedback
IdeaBlade.Core Assembly > IdeaBlade.Core.Configuration Namespace > ObjectServerElement Class : GetServiceKey Method



name
throwIfNotFound
Return the ServiceKey with the given name.

Syntax

Visual Basic (Declaration) 
Public Function GetServiceKey( _
   ByVal name As String, _
   Optional ByVal throwIfNotFound As Boolean _
) As ServiceKeyElement
Visual Basic (Usage)Copy Code
Dim instance As ObjectServerElement
Dim name As String
Dim throwIfNotFound As Boolean
Dim value As ServiceKeyElement
 
value = instance.GetServiceKey(name, throwIfNotFound)
C# 
public ServiceKeyElement GetServiceKey( 
   string name,
   bool throwIfNotFound
)
C++/CLI 
public:
ServiceKeyElement^ GetServiceKey( 
   String^ name,
   bool throwIfNotFound
) 

Parameters

name
throwIfNotFound

Exceptions

ExceptionDescription
System.InvalidOperationExceptionThrown if no service keys are defined, or the key is not found

Remarks

If the name provided is null or an empty string then the default key is returned. This will throw an exception if the key is not found, or return null if the throwIfNotFound parameters is false.

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.