ExecutionPolicy Enumeration |
Controls how servers of multi-server external services are executed.
Namespace: Autodesk.Revit.DB.ExternalServiceAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic enum ExecutionPolicy
Public Enumeration ExecutionPolicy
public enum class ExecutionPolicy
MembersMember name | Value | Description |
---|
FirstApplicableServer | 0 |
This policy instructs to find the first applicable server,
which would be the first one that the service claims (by
returning True from the CanExecute method) it can be executed.
With that server the service will be called to execute it.
If the execution fails or if an unhandled exception is raised
from it the result will be ExternalServiceResult.Failed, otherwise
it will be ExternalServiceResult.Succeeded, unless no applicable
server can be found, which would cause returning ExternalServiceResult.Unhandled.
|
AllApplicableServers | 1 |
Under this policy the framework will call to execute a service with all
applicable servers, that is the servers that are currently set as active
and for which the service responds affirmatively to the CanExecute method.
If and only if the service can execute all applicable servers successfully
the execution returns ExternalServiceResult.Succeeded. If execution of
any applicable server fails, the execution loop breaks and the return
value will be ExternalServiceResult.Failed. If no applicable servers
can be found, the return value will be ExternalServiceResult.Unhandled.
|
See Also