internal void RegisterOrchestrator(FunctionName orchestratorFunction, OrchestratorInfo orchestratorInfo) { if (!this.registeredOrchestrators.TryUpdate(orchestratorFunction, orchestratorInfo, null)) { if (!this.registeredOrchestrators.TryAdd(orchestratorFunction, orchestratorInfo)) { throw new ArgumentException( $"The orchestrator function named '{orchestratorFunction}' is already registered."); } } }
internal void RegisterOrchestrator(FunctionName orchestratorFunction, OrchestratorInfo orchestratorInfo) { if (!this.registeredOrchestrators.TryUpdate(orchestratorFunction, orchestratorInfo, null)) { this.TraceHelper.ExtensionInformationalEvent( this.Options.HubName, instanceId: string.Empty, functionName: orchestratorFunction.Name, message: $"Registering orchestrator function named {orchestratorFunction}.", writeToUserLogs: false); if (!this.registeredOrchestrators.TryAdd(orchestratorFunction, orchestratorInfo)) { throw new ArgumentException( $"The orchestrator function named '{orchestratorFunction}' is already registered."); } } }