ArcObjects Library Reference (Location)  

IInitGeocodeServer.AdjustableProperties Property

The list of properties (comma delimited) that can be modified at runtime (for a given method).

[Visual Basic .NET]
Public Property AdjustableProperties As String
[C#]
public string AdjustableProperties {get; set;}
[C++]
HRESULT get_AdjustableProperties(
  BSTR* propertyList
);
[C++]
HRESULT put_AdjustableProperties(
  BSTR propertyList
);
[C++]

Parameters

propertyList [out, retval]   propertyList is a parameter of type BSTR propertyList [in]   propertyList is a parameter of type BSTR

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The IInitGeocodeServer interface is available only if the GeocodeServer was obtained for use in a stateful manner (i.e., either by co-creating the GeocodeServer object or by obtaining a reference using a GISServerConnection object.)

The AdjustableProperties method returns a comma-delimited string containing the list of properties that a user or developer can modify at runtime when using a GeocodeServer. Use this method to inspect and restrict the set of properties that users and developers can modify. Refer to the IGeocodeServer::GetLocatorProperties method for a list of property names that can be used.

The following example illustrates how to modify the set of adjustable properties so that users and developers cannot change the minimum candidate score used by the GeocodeServer at runtime:

Public Sub SetAdjustableProperties()
    Dim pGISServerConnection As esriServer.IGISServerConnection
    Dim pServerObjectManager As esriServer.IServerObjectManager
    Dim pServerContext As esriServer.IServerContext
    Dim pInitGeocodeServer As esriLocation.IInitGeocodeServer
    Dim varAdjustableProperties As Variant
    Dim strAdjustableProperties() As String
    Dim lngPropertyIndex As Long
    
    On Error GoTo ErrorHandler
    
    '+++ connect to an ArcGIS Server and get the server object manager
    Set pGISServerConnection = New esriServer.GISServerConnection
    pGISServerConnection.Connect ("napanee")
    Set pServerObjectManager = pGISServerConnection.ServerObjectManager
    
    '+++ get a GeocodeServer object from its server context
    Set pServerContext = pServerObjectManager.CreateServerContext("RedlandsStreets", "GeocodeServer")
    Set pInitGeocodeServer = pServerContext.ServerObject
    
    '+++ get the set of adjustable properties and remove the minimum candidate score
    varAdjustableProperties = Split(pInitGeocodeServer.AdjustableProperties, ",")
    For lngPropertyIndex = LBound(varAdjustableProperties) To UBound(varAdjustableProperties)
        If varAdjustableProperties(lngPropertyIndex) <> "MinimumCandidateScore" Then
            ReDim Preserve strAdjustableProperties(0 To UBound(strAdjustableProperties) + 1)
            strAdjustableProperties(UBound(strAdjustableProperties)) = _
                varAdjustableProperties(lngPropertyIndex)
        End If
    Next lngPropertyIndex
    pInitGeocodeServer.AdjustableProperties = Join(strAdjustableProperties, ",")
    
    '+++ release the server context after completing work with the GeocodeServer
    pServerContext.ReleaseContext
  
    Exit Sub
  
ErrorHandler:
    If Err.Number = 9 Then  '+++ subscript out of range error
        ReDim strAdjustableProperties(0 To 0)
        Resume Next
    End If
  
End Sub

See Also

IInitGeocodeServer Interface