private static Test.TestIntfPrx createTestIntfPrx(List <Test.RemoteObjectAdapterPrx> adapters) { List <Endpoint> endpoints = new List <Endpoint>(); Test.TestIntfPrx obj = null; IEnumerator <Test.RemoteObjectAdapterPrx> p = adapters.GetEnumerator(); while (p.MoveNext()) { obj = p.Current.getTestIntf(); foreach (Endpoint e in obj.Endpoints) { endpoints.Add(e); } } Debug.Assert(obj != null); return(obj.Clone(endpoints: endpoints.ToArray())); }