public async ValueTask FindObjectByIdAsync( string domainId, Identity id, string?facet, IFindObjectByIdReplyPrx reply, Current current, CancellationToken cancel) { if (domainId != _domainId) { return; // Ignore } if (await _registryServant.FindObjectAsync(id, facet, cancel).ConfigureAwait(false) is IObjectPrx proxy) { // Reply to the multicast request using the given proxy. try { await reply.FoundObjectByIdAsync(id, proxy, cancel : cancel).ConfigureAwait(false); } catch (Exception ex) { current.Communicator.Logger.Warning( $"{_pluginName} failed to send foundObjectById to `{reply}':\n{ex}"); } } }
public async ValueTask FindObjectByIdAsync( string domainId, Identity id, string?facet, IFindObjectByIdReplyPrx reply, Current current, CancellationToken cancel) { if (domainId != _domainId) { return; // Ignore } if (await _registryServant.FindObjectAsync(id, facet, cancel).ConfigureAwait(false) is IObjectPrx proxy) { // Reply to the multicast request using the given proxy. try { if (reply.InvocationMode == InvocationMode.Datagram) { reply = reply.Clone(preferNonSecure: NonSecure.Always); } await reply.FoundObjectByIdAsync(id, proxy, cancel : cancel).ConfigureAwait(false); } catch (Exception ex) { current.Communicator.Logger.Warning( $"Ice discovery failed to send foundObjectById to `{reply}':\n{ex}"); } } }