internal async Task PatchConnectedSystemAsync( string connectedSystemName, string entityClass, string entityId, Dictionary <string, object> patchObject, CancellationToken cancellationToken) { if (!ConnectedSystemManagers.TryGetValue(connectedSystemName, out var connectedSystemManager)) { throw new ConfigurationException($"Could not find Patch connected system manager for connected system {connectedSystemName}"); } await connectedSystemManager.PatchAsync( entityClass, entityId, patchObject, cancellationToken ).ConfigureAwait(false); }
internal async Task <object?> QueryConnectedSystemAsync( string connectedSystemName, QueryConfig queryConfig, string queryLookupField, bool valueIfZeroMatchesFoundSets, object?valueIfZeroMatchesFound, bool valueIfMultipleMatchesFoundSets, object?valueIfMultipleMatchesFound, CancellationToken cancellationToken) { if (!ConnectedSystemManagers.TryGetValue(connectedSystemName, out var connectedSystemManager)) { throw new ConfigurationException($"Could not find queryLookup() connected system manager for connected system {connectedSystemName}"); } return(await connectedSystemManager.QueryLookupAsync( queryConfig, queryLookupField, valueIfZeroMatchesFoundSets, valueIfZeroMatchesFound, valueIfMultipleMatchesFoundSets, valueIfMultipleMatchesFound, cancellationToken ).ConfigureAwait(false)); }