< Summary

Information
Class: Ice.ObjectPrxHelperBase.InvokeTaskCompletionCallback
Assembly: Ice
File(s): /_/csharp/src/Ice/Proxy.cs
Tag: 91_21789722663
Line coverage
87%
Covered lines: 7
Uncovered lines: 1
Coverable lines: 8
Total lines: 1820
Line coverage: 87.5%
Branch coverage
50%
Covered branches: 3
Total branches: 6
Branch coverage: 50%
Method coverage
100%
Covered methods: 3
Total methods: 3
Method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
handleInvokeSent(...)50%6.29680%
handleInvokeResponse(...)100%11100%

File(s)

/_/csharp/src/Ice/Proxy.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3#nullable enable
 4
 5using Ice.Internal;
 6using System.ComponentModel;
 7using System.Diagnostics.CodeAnalysis;
 8
 9namespace Ice;
 10
 11/// <summary>
 12/// The base interface of all Ice proxies.
 13/// </summary>
 14public interface ObjectPrx : IEquatable<ObjectPrx>
 15{
 16    /// <summary>
 17    /// Gets the communicator that created this proxy.
 18    /// </summary>
 19    /// <returns>The communicator that created this proxy.</returns>
 20    Communicator ice_getCommunicator();
 21
 22    /// <summary>
 23    /// Tests whether this object supports a specific Slice interface.
 24    /// </summary>
 25    /// <param name="id">The type ID of the Slice interface to test against.</param>
 26    /// <param name="context">The request context.</param>
 27    /// <returns><see langword="true"/> if the target object implements the Slice interface specified by <paramref name=
 28    /// or implements a derived interface, and <see langword="false"/> otherwise.</returns>
 29    bool ice_isA(string id, Dictionary<string, string>? context = null);
 30
 31    /// <summary>
 32    /// Tests whether this object supports a specific Slice interface.
 33    /// </summary>
 34    /// <param name="id">The type ID of the Slice interface to test against.</param>
 35    /// <param name="context">The request context.</param>
 36    /// <param name="progress">Sent progress provider.</param>
 37    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 38    /// <returns>A task that will complete with <see langword="true"/> if the target object implements the Slice
 39    /// interface specified by <paramref name="id"/> or implements a derived interface, and <see langword="false"/>
 40    /// otherwise.</returns>
 41    Task<bool> ice_isAAsync(
 42        string id,
 43        Dictionary<string, string>? context = null,
 44        IProgress<bool>? progress = null,
 45        CancellationToken cancel = default);
 46
 47    /// <summary>
 48    /// Tests whether the target object of this proxy can be reached.
 49    /// </summary>
 50    /// <param name="context">The request context.</param>
 51    void ice_ping(Dictionary<string, string>? context = null);
 52
 53    /// <summary>
 54    /// Tests whether the target object of this proxy can be reached.
 55    /// </summary>
 56    /// <param name="context">The request context.</param>
 57    /// <param name="progress">Sent progress provider.</param>
 58    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 59    /// <returns>A task that completes when the invocation completes.</returns>
 60    Task ice_pingAsync(
 61        Dictionary<string, string>? context = null,
 62        IProgress<bool>? progress = null,
 63        CancellationToken cancel = default);
 64
 65    /// <summary>
 66    /// Returns the Slice interfaces supported by this object as a list of Slice type IDs.
 67    /// </summary>
 68    /// <param name="context">The request context.</param>
 69    /// <returns>The Slice type IDs of the interfaces supported by this object, in alphabetical order.</returns>
 70    string[] ice_ids(Dictionary<string, string>? context = null);
 71
 72    /// <summary>
 73    /// Returns the Slice interfaces supported by this object as a list of Slice type IDs.
 74    /// </summary>
 75    /// <param name="context">The request context.</param>
 76    /// <param name="progress">Sent progress provider.</param>
 77    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 78    /// <returns>A task that will complete with The Slice type IDs of the interfaces supported by this object,
 79    /// in alphabetical order.</returns>
 80    Task<string[]> ice_idsAsync(
 81        Dictionary<string, string>? context = null,
 82        IProgress<bool>? progress = null,
 83        CancellationToken cancel = default);
 84
 85    /// <summary>
 86    /// Gets the Slice type ID of the most-derived interface supported by the target object of this proxy.
 87    /// </summary>
 88    /// <param name="context">The request context.</param>
 89    /// <returns>The Slice type ID of the most-derived interface.</returns>
 90    string ice_id(Dictionary<string, string>? context = null);
 91
 92    /// <summary>
 93    /// Gets the Slice type ID of the most-derived interface supported by the target object of this proxy.
 94    /// </summary>
 95    /// <param name="context">The request context.</param>
 96    /// <param name="progress">Sent progress provider.</param>
 97    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 98    /// <returns>The task object representing the asynchronous operation.</returns>
 99    Task<string> ice_idAsync(
 100        Dictionary<string, string>? context = null,
 101        IProgress<bool>? progress = null,
 102        CancellationToken cancel = default);
 103
 104    /// <summary>
 105    /// Invokes an operation dynamically.
 106    /// </summary>
 107    /// <param name="operation">The name of the operation to invoke.</param>
 108    /// <param name="mode">The operation mode (normal or idempotent).</param>
 109    /// <param name="inEncaps">The encoded in-parameters for the operation.</param>
 110    /// <param name="outEncaps">The encoded out-parameters and return value
 111    /// for the operation. The return value follows any out-parameters.</param>
 112    /// <param name="context">The request context.</param>
 113    /// <returns>If the operation completed successfully, the return value is <see langword="true"/>.
 114    /// If the operation raises a user exception, the return value is <see langword="false"/>; in this case,
 115    /// <paramref name="outEncaps"/> contains the encoded user exception. If the operation raises a run-time exception,
 116    /// it throws it directly.</returns>
 117    bool ice_invoke(
 118        string operation,
 119        OperationMode mode,
 120        byte[] inEncaps,
 121        out byte[] outEncaps,
 122        Dictionary<string, string>? context = null);
 123
 124    /// <summary>
 125    /// Invokes an operation dynamically.
 126    /// </summary>
 127    /// <param name="operation">The name of the operation to invoke.</param>
 128    /// <param name="mode">The operation mode (normal or idempotent).</param>
 129    /// <param name="inEncaps">The encoded in-parameters for the operation.</param>
 130    /// <param name="context">The request context.</param>
 131    /// <param name="progress">Sent progress provider.</param>
 132    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 133    /// <returns>The task object representing the asynchronous operation.</returns>
 134    Task<Object_Ice_invokeResult>
 135    ice_invokeAsync(
 136        string operation,
 137        OperationMode mode,
 138        byte[] inEncaps,
 139        Dictionary<string, string>? context = null,
 140        IProgress<bool>? progress = null,
 141        CancellationToken cancel = default);
 142
 143    /// <summary>
 144    /// Gets the identity embedded in this proxy.
 145    /// <returns>The identity of the target object.</returns>
 146    /// </summary>
 147    Identity ice_getIdentity();
 148
 149    /// <summary>
 150    /// Creates a new proxy that is identical to this proxy, except for the per-proxy context.
 151    /// <param name="newIdentity">The identity for the new proxy.</param>
 152    /// <returns>The proxy with the new identity.</returns>
 153    /// </summary>
 154    ObjectPrx ice_identity(Identity newIdentity);
 155
 156    /// <summary>
 157    /// Gets the per-proxy context for this proxy.
 158    /// </summary>
 159    /// <returns>The per-proxy context. If the proxy does not have a per-proxy (implicit) context, the return value
 160    /// is null.</returns>
 161    Dictionary<string, string> ice_getContext();
 162
 163    /// <summary>
 164    /// Creates a new proxy that is identical to this proxy, except for the per-proxy context.
 165    /// </summary>
 166    /// <param name="newContext">The context for the new proxy.</param>
 167    /// <returns>The proxy with the new per-proxy context.</returns>
 168    ObjectPrx ice_context(Dictionary<string, string> newContext);
 169
 170    /// <summary>
 171    /// Gets the facet for this proxy.
 172    /// </summary>
 173    /// <returns>The facet for this proxy. If the proxy uses the default facet, the return value is the
 174    /// empty string.</returns>
 175    string ice_getFacet();
 176
 177    /// <summary>
 178    /// Creates a new proxy that is identical to this proxy, except for the facet.
 179    /// </summary>
 180    /// <param name="newFacet">The facet for the new proxy.</param>
 181    /// <returns>The proxy with the new facet.</returns>
 182    ObjectPrx ice_facet(string newFacet);
 183
 184    /// <summary>
 185    /// Gets the adapter ID for this proxy.
 186    /// </summary>
 187    /// <returns>The adapter ID. If the proxy does not have an adapter ID, the return value is the
 188    /// empty string.</returns>
 189    string ice_getAdapterId();
 190
 191    /// <summary>
 192    /// Creates a new proxy that is identical to this proxy, except for the adapter ID.
 193    /// </summary>
 194    /// <param name="newAdapterId">The adapter ID for the new proxy.</param>
 195    /// <returns>The proxy with the new adapter ID.</returns>
 196    ObjectPrx ice_adapterId(string newAdapterId);
 197
 198    /// <summary>
 199    /// Gets the endpoints used by this proxy.
 200    /// </summary>
 201    /// <returns>The endpoints used by this proxy.</returns>
 202    Endpoint[] ice_getEndpoints();
 203
 204    /// <summary>
 205    /// Creates a new proxy that is identical to this proxy, except for the endpoints.
 206    /// </summary>
 207    /// <param name="newEndpoints">The endpoints for the new proxy.</param>
 208    /// <returns>The proxy with the new endpoints.</returns>
 209    ObjectPrx ice_endpoints(Endpoint[] newEndpoints);
 210
 211    /// <summary>
 212    /// Gets the locator cache timeout of this proxy.
 213    /// </summary>
 214    /// <returns>The locator cache timeout value.</returns>
 215    TimeSpan ice_getLocatorCacheTimeout();
 216
 217    /// <summary>
 218    /// Creates a new proxy that is identical to this proxy, except for the locator cache timeout.
 219    /// </summary>
 220    /// <param name="newTimeout">The new locator cache timeout (in seconds).</param>
 221    ObjectPrx ice_locatorCacheTimeout(int newTimeout);
 222
 223    /// <summary>
 224    /// Creates a new proxy that is identical to this proxy, except for the locator cache timeout.
 225    /// </summary>
 226    /// <param name="newTimeout">The new locator cache timeout.</param>
 227    ObjectPrx ice_locatorCacheTimeout(TimeSpan newTimeout);
 228
 229    /// <summary>
 230    /// Creates a new proxy that is identical to this proxy, except for the invocation timeout.
 231    /// </summary>
 232    /// <param name="newTimeout">The new invocation timeout (in milliseconds).</param>
 233    ObjectPrx ice_invocationTimeout(int newTimeout);
 234
 235    /// <summary>
 236    /// Creates a new proxy that is identical to this proxy, except for the invocation timeout.
 237    /// </summary>
 238    /// <param name="newTimeout">The new invocation timeout.</param>
 239    ObjectPrx ice_invocationTimeout(TimeSpan newTimeout);
 240
 241    /// <summary>
 242    /// Gets the invocation timeout of this proxy.
 243    /// </summary>
 244    /// <returns>The invocation timeout value.</returns>
 245    TimeSpan ice_getInvocationTimeout();
 246
 247    /// <summary>
 248    /// Returns whether this proxy caches connections.
 249    /// </summary>
 250    /// <returns><see langword="true"/> if this proxy caches connections; <see langword="false"/> otherwise.</returns>
 251    bool ice_isConnectionCached();
 252
 253    /// <summary>
 254    /// Creates a new proxy that is identical to this proxy, except for connection caching.
 255    /// </summary>
 256    /// <param name="newCache"><see langword="true"/> if the new proxy should cache connections;
 257    /// <see langword="false"/> otherwise.</param>
 258    /// <returns>The new proxy with the specified caching policy.</returns>
 259    ObjectPrx ice_connectionCached(bool newCache);
 260
 261    /// <summary>
 262    /// Returns how this proxy selects endpoints (randomly or ordered).
 263    /// </summary>
 264    /// <returns>The endpoint selection policy.</returns>
 265    EndpointSelectionType ice_getEndpointSelection();
 266
 267    /// <summary>
 268    /// Creates a new proxy that is identical to this proxy, except for the endpoint selection policy.
 269    /// </summary>
 270    /// <param name="newType">The new endpoint selection policy.</param>
 271    /// <returns>The new proxy with the specified endpoint selection policy.</returns>
 272    ObjectPrx ice_endpointSelection(EndpointSelectionType newType);
 273
 274    /// <summary>
 275    /// Creates a new proxy that is identical to this proxy, except for the encoding used to marshal
 276    /// parameters.
 277    /// </summary>
 278    /// <param name="encodingVersion">The encoding version to use to marshal requests parameters.</param>
 279    /// <returns>The new proxy with the specified encoding version.</returns>
 280    ObjectPrx ice_encodingVersion(EncodingVersion encodingVersion);
 281
 282    /// <summary>
 283    /// Gets the encoding version used to marshal requests parameters.
 284    /// </summary>
 285    /// <returns>The encoding version.</returns>
 286    EncodingVersion ice_getEncodingVersion();
 287
 288    /// <summary>
 289    /// Gets the router for this proxy.
 290    /// </summary>
 291    /// <returns>The router for the proxy. If no router is configured for the proxy, the return value
 292    /// is null.</returns>
 293    RouterPrx? ice_getRouter();
 294
 295    /// <summary>
 296    /// Creates a new proxy that is identical to this proxy, except for the router.
 297    /// </summary>
 298    /// <param name="router">The router for the new proxy.</param>
 299    /// <returns>The new proxy with the specified router.</returns>
 300    ObjectPrx ice_router(RouterPrx? router);
 301
 302    /// <summary>
 303    /// Gets the locator for this proxy.
 304    /// </summary>
 305    /// <returns>The locator for this proxy. If no locator is configured, the return value is null.</returns>
 306    LocatorPrx? ice_getLocator();
 307
 308    /// <summary>
 309    /// Creates a new proxy that is identical to this proxy, except for the locator.
 310    /// </summary>
 311    /// <param name="locator">The locator for the new proxy.</param>
 312    /// <returns>The new proxy with the specified locator.</returns>
 313    ObjectPrx ice_locator(LocatorPrx? locator);
 314
 315    /// <summary>
 316    /// Returns whether this proxy uses collocation optimization.
 317    /// </summary>
 318    /// <returns><see langword="true"/> if the proxy uses collocation optimization;
 319    /// <see langword="false"/> otherwise.</returns>
 320    bool ice_isCollocationOptimized();
 321
 322    /// <summary>
 323    /// Creates a new proxy that is identical to this proxy, except for collocation optimization.
 324    /// </summary>
 325    /// <param name="collocated"><see langword="true"/> if the new proxy enables collocation optimization;
 326    /// <see langword="false"/> otherwise.</param>
 327    /// <returns>The new proxy the specified collocation optimization.</returns>
 328    ObjectPrx ice_collocationOptimized(bool collocated);
 329
 330    /// <summary>
 331    /// Creates a new proxy that is identical to this proxy, but uses twoway invocations.
 332    /// </summary>
 333    /// <returns>A new proxy that uses twoway invocations.</returns>
 334    ObjectPrx ice_twoway();
 335
 336    /// <summary>
 337    /// Returns whether this proxy uses twoway invocations.
 338    /// </summary>
 339    /// <returns><see langword="true"/> if this proxy uses twoway invocations;
 340    /// <see langword="false"/> otherwise.</returns>
 341    bool ice_isTwoway();
 342
 343    /// <summary>
 344    /// Creates a new proxy that is identical to this proxy, but uses oneway invocations.
 345    /// </summary>
 346    /// <returns>A new proxy that uses oneway invocations.</returns>
 347    ObjectPrx ice_oneway();
 348
 349    /// <summary>
 350    /// Returns whether this proxy uses oneway invocations.
 351    /// </summary>
 352    /// <returns><see langword="true"/> if this proxy uses oneway invocations;
 353    /// <see langword="false"/> otherwise.</returns>
 354    bool ice_isOneway();
 355
 356    /// <summary>
 357    /// Creates a new proxy that is identical to this proxy, but uses batch oneway invocations.
 358    /// </summary>
 359    /// <returns>A new proxy that uses batch oneway invocations.</returns>
 360    ObjectPrx ice_batchOneway();
 361
 362    /// <summary>
 363    /// Returns whether this proxy uses batch oneway invocations.
 364    /// </summary>
 365    /// <returns><see langword="true"/> if this proxy uses batch oneway invocations;
 366    /// <see langword="false"/> otherwise.</returns>
 367    bool ice_isBatchOneway();
 368
 369    /// <summary>
 370    /// Creates a new proxy that is identical to this proxy, but uses datagram invocations.
 371    /// </summary>
 372    /// <returns>A new proxy that uses datagram invocations.</returns>
 373    ObjectPrx ice_datagram();
 374
 375    /// <summary>
 376    /// Returns whether this proxy uses datagram invocations.
 377    /// </summary>
 378    /// <returns><see langword="true"/> if this proxy uses datagram invocations;
 379    /// <see langword="false"/> otherwise.</returns>
 380    bool ice_isDatagram();
 381
 382    /// <summary>
 383    /// Creates a new proxy that is identical to this proxy, but uses batch datagram invocations.
 384    /// </summary>
 385    /// <returns>A new proxy that uses batch datagram invocations.</returns>
 386    ObjectPrx ice_batchDatagram();
 387
 388    /// <summary>
 389    /// Returns whether this proxy uses batch datagram invocations.
 390    /// </summary>
 391    /// <returns><see langword="true"/> if this proxy uses batch datagram invocations;
 392    /// <see langword="false"/> otherwise.</returns>
 393    bool ice_isBatchDatagram();
 394
 395    /// <summary>
 396    /// Creates a new proxy that is identical to this proxy, except for compression.
 397    /// </summary>
 398    /// <param name="compress"><see langword="true"/> enables compression for the new proxy;
 399    /// <see langword="false"/> disables compression.</param>
 400    /// <returns>A new proxy with the specified compression setting.</returns>
 401    ObjectPrx ice_compress(bool compress);
 402
 403    /// <summary>
 404    /// Gets the compression override setting of this proxy.
 405    /// </summary>
 406    /// <returns>The compression override setting. If null is returned, no override is set. Otherwise, <see langword="tr
 407    /// if compression is enabled, <see langword="false"/> otherwise.</returns>
 408    bool? ice_getCompress();
 409
 410    /// <summary>
 411    /// Creates a new proxy that is identical to this proxy, except for its connection ID.
 412    /// </summary>
 413    /// <param name="connectionId">The connection ID for the new proxy. An empty string removes the
 414    /// connection ID.</param>
 415    /// <returns>A new proxy with the specified connection ID.</returns>
 416    ObjectPrx ice_connectionId(string connectionId);
 417
 418    /// <summary>
 419    /// Gets the connection id of this proxy.
 420    /// </summary>
 421    /// <returns>The connection id.</returns>
 422    string ice_getConnectionId();
 423
 424    /// <summary>
 425    /// Returns a proxy that is identical to this proxy, except it's a fixed proxy bound
 426    /// the given connection.
 427    /// </summary>
 428    /// <param name="connection">The fixed proxy connection.</param>
 429    /// <returns>A fixed proxy bound to the given connection.</returns>
 430    ObjectPrx ice_fixed(Ice.Connection connection);
 431
 432    /// <summary>
 433    /// Returns whether this proxy is a fixed proxy.
 434    /// </summary>
 435    /// <returns><see langword="true"/> if this is a fixed proxy; <see langword="false"/> otherwise.</returns>
 436    bool ice_isFixed();
 437
 438    /// <summary>
 439    /// Gets the connection to the server that hosts the target object. This method establishes the connection to the
 440    /// server if it is not already established.
 441    /// </summary>
 442    /// <returns>The connection to the server that hosts the target object, or null when this proxy uses collocation
 443    /// optimization to communicate with the target object.</returns>
 444    Connection? ice_getConnection();
 445
 446    /// <summary>
 447    /// Gets the connection to the server that hosts the target object. This method establishes the connection to the
 448    /// server if it is not already established.
 449    /// </summary>
 450    /// <param name="progress">Sent progress provider.</param>
 451    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 452    /// <returns>The connection to the server that hosts the target object, or null when this proxy uses collocation
 453    /// optimization to communicate with the target object.</returns>
 454    Task<Connection?> ice_getConnectionAsync(IProgress<bool>? progress = null, CancellationToken cancel = default);
 455
 456    /// <summary>
 457    /// Gets the cached Connection for this proxy. If the proxy does not yet have an established
 458    /// connection, it does not attempt to create a connection.
 459    /// </summary>
 460    /// <returns>The cached Connection for this proxy (null if the proxy does not have
 461    /// an established connection).</returns>
 462    Connection? ice_getCachedConnection();
 463
 464    /// <summary>
 465    /// Flushes any pending batched requests for this proxy. The call blocks until the flush is complete.
 466    /// </summary>
 467    void ice_flushBatchRequests();
 468
 469    /// <summary>
 470    /// Asynchronously flushes any pending batched requests for this proxy.
 471    /// </summary>
 472    /// <param name="progress">Sent progress provider.</param>
 473    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 474    /// <returns>The task object representing the asynchronous operation.</returns>
 475    Task ice_flushBatchRequestsAsync(
 476        IProgress<bool>? progress = null,
 477        CancellationToken cancel = default);
 478
 479    /// <summary>
 480    /// Write a proxy to the output stream.
 481    /// </summary>
 482    /// <param name="os">Output stream object to write the proxy.</param>
 483    [EditorBrowsable(EditorBrowsableState.Never)]
 484    void iceWrite(OutputStream os);
 485
 486    /// <summary>
 487    /// Returns a scheduler object that uses the Ice thread pool.
 488    /// </summary>
 489    /// <returns>The task scheduler object.</returns>
 490    TaskScheduler ice_scheduler();
 491}
 492
 493/// <summary>
 494/// Represent the result of the ice_invokeAsync operation.
 495/// </summary>
 496public record struct Object_Ice_invokeResult(bool returnValue, byte[] outEncaps);
 497
 498/// <summary>
 499/// Base class of all object proxies.
 500/// </summary>
 501public abstract class ObjectPrxHelperBase : ObjectPrx
 502{
 503    public static bool operator ==(ObjectPrxHelperBase? lhs, ObjectPrxHelperBase? rhs) =>
 504        lhs is not null ? lhs.Equals(rhs) : rhs is null;
 505
 506    public static bool operator !=(ObjectPrxHelperBase? lhs, ObjectPrxHelperBase? rhs) => !(lhs == rhs);
 507
 508    /// <summary>
 509    /// Returns whether this proxy equals the passed object. Two proxies are equal if they are equal in all
 510    /// respects, that is, if their object identity, endpoints timeout settings, and so on are all equal.
 511    /// </summary>
 512    /// <param name="other">The proxy to compare this proxy with.</param>
 513    /// <returns><see langword="true"/> if this proxy is equal to <paramref name="other"/>;
 514    /// <see langword="false"/> otherwise.</returns>
 515    public bool Equals(ObjectPrx? other) =>
 516        other is not null && _reference == ((ObjectPrxHelperBase)other)._reference;
 517
 518    public override bool Equals(object? obj) => Equals(obj as ObjectPrx);
 519
 520    /// <summary>
 521    /// Returns a hash code for this proxy.
 522    /// </summary>
 523    /// <returns>The hash code.</returns>
 524    public override int GetHashCode() => _reference.GetHashCode();
 525
 526    /// <summary>
 527    /// Gets the communicator that created this proxy.
 528    /// </summary>
 529    /// <returns>The communicator that created this proxy.</returns>
 530    public Communicator ice_getCommunicator() => _reference.getCommunicator();
 531
 532    /// <summary>
 533    /// Gets the stringified form of this proxy.
 534    /// </summary>
 535    /// <returns>The stringified proxy.</returns>
 536    public override string ToString() => _reference.ToString();
 537
 538    /// <summary>
 539    /// Tests whether this object supports a specific Slice interface.
 540    /// </summary>
 541    /// <param name="id">The type ID of the Slice interface to test against.</param>
 542    /// <param name="context">The request context.</param>
 543    /// <returns><see langword="true"/> if the target object has the interface specified by id or derives
 544    /// from the interface specified by id.</returns>
 545    public bool ice_isA(string id, Dictionary<string, string>? context = null)
 546    {
 547        try
 548        {
 549            return iceI_ice_isAAsync(id, context, synchronous: true, progress: null, CancellationToken.None).Result;
 550        }
 551        catch (AggregateException ex)
 552        {
 553            throw ex.InnerException!;
 554        }
 555    }
 556
 557    /// <summary>
 558    /// Tests whether this object supports a specific Slice interface.
 559    /// </summary>
 560    /// <param name="id">The type ID of the Slice interface to test against.</param>
 561    /// <param name="context">The request context.</param>
 562    /// <param name="progress">Sent progress provider.</param>
 563    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 564    /// <returns>The task object representing the asynchronous operation.</returns>
 565    public Task<bool> ice_isAAsync(
 566        string id,
 567        Dictionary<string, string>? context = null,
 568        IProgress<bool>? progress = null,
 569        CancellationToken cancel = default) => iceI_ice_isAAsync(id, context, synchronous: false, progress, cancel);
 570
 571    private Task<bool>
 572    iceI_ice_isAAsync(
 573        string id,
 574        Dictionary<string, string>? context,
 575        bool synchronous,
 576        IProgress<bool>? progress,
 577        CancellationToken cancel)
 578    {
 579        iceCheckTwowayOnly(_ice_isA_name);
 580        var completed = new OperationTaskCompletionCallback<bool>(progress, cancel);
 581        iceI_ice_isA(id, context, completed, synchronous);
 582        return completed.Task;
 583    }
 584
 585    private const string _ice_isA_name = "ice_isA";
 586
 587    private void iceI_ice_isA(
 588        string id,
 589        Dictionary<string, string>? context,
 590        OutgoingAsyncCompletionCallback completed,
 591        bool synchronous)
 592    {
 593        iceCheckAsyncTwowayOnly(_ice_isA_name);
 594        getOutgoingAsync<bool>(completed).invoke(
 595            _ice_isA_name,
 596            OperationMode.Idempotent,
 597            FormatType.CompactFormat,
 598            context,
 599            synchronous,
 600            (OutputStream os) => os.writeString(id),
 601            null,
 602            (InputStream iss) => iss.readBool());
 603    }
 604
 605    /// <summary>
 606    /// Tests whether the target object of this proxy can be reached.
 607    /// </summary>
 608    /// <param name="context">The request context.</param>
 609    public void ice_ping(Dictionary<string, string>? context = null)
 610    {
 611        try
 612        {
 613            iceI_ice_pingAsync(context, synchronous: true, progress: null, CancellationToken.None).Wait();
 614        }
 615        catch (AggregateException ex)
 616        {
 617            throw ex.InnerException!;
 618        }
 619    }
 620
 621    /// <summary>
 622    /// Tests whether the target object of this proxy can be reached.
 623    /// </summary>
 624    /// <param name="context">The request context.</param>
 625    /// <param name="progress">Sent progress provider.</param>
 626    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 627    /// <returns>The task object representing the asynchronous operation.</returns>
 628    public Task ice_pingAsync(
 629        Dictionary<string, string>? context = null,
 630        IProgress<bool>? progress = null,
 631        CancellationToken cancel = default) => iceI_ice_pingAsync(context, synchronous: false, progress, cancel);
 632
 633    private Task
 634    iceI_ice_pingAsync(
 635        Dictionary<string, string>? context,
 636        bool synchronous,
 637        IProgress<bool>? progress,
 638        CancellationToken cancel)
 639    {
 640        var completed = new OperationTaskCompletionCallback<object>(progress, cancel);
 641        iceI_ice_ping(context, completed, synchronous);
 642        return completed.Task;
 643    }
 644
 645    private const string _ice_ping_name = "ice_ping";
 646
 647    private void iceI_ice_ping(
 648        Dictionary<string, string>? context,
 649        OutgoingAsyncCompletionCallback completed,
 650        bool synchronous)
 651    {
 652        getOutgoingAsync<object>(completed).invoke(
 653            _ice_ping_name,
 654            OperationMode.Idempotent,
 655            FormatType.CompactFormat,
 656            context,
 657            synchronous);
 658    }
 659
 660    /// <summary>
 661    /// Gets the Slice type IDs of the interfaces supported by the target object of this proxy.
 662    /// </summary>
 663    /// <param name="context">The request context.</param>
 664    /// <returns>The Slice type IDs of the interfaces supported by the target object, in alphabetical order.</returns>
 665    public string[] ice_ids(Dictionary<string, string>? context = null)
 666    {
 667        try
 668        {
 669            return iceI_ice_idsAsync(context, synchronous: true, progress: null, CancellationToken.None).Result;
 670        }
 671        catch (AggregateException ex)
 672        {
 673            throw ex.InnerException!;
 674        }
 675    }
 676
 677    /// <summary>
 678    /// Gets the Slice type IDs of the interfaces supported by the target object of this proxy.
 679    /// </summary>
 680    /// <param name="context">The request context.</param>
 681    /// <param name="progress">Sent progress provider.</param>
 682    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 683    /// <returns>The task object representing the asynchronous operation.</returns>
 684    public Task<string[]>
 685    ice_idsAsync(
 686        Dictionary<string, string>? context = null,
 687        IProgress<bool>? progress = null,
 688        CancellationToken cancel = default) => iceI_ice_idsAsync(context, synchronous: false, progress, cancel);
 689
 690    private Task<string[]> iceI_ice_idsAsync(
 691        Dictionary<string, string>? context,
 692        bool synchronous,
 693        IProgress<bool>? progress,
 694        CancellationToken cancel)
 695    {
 696        iceCheckTwowayOnly(_ice_ids_name);
 697        var completed = new OperationTaskCompletionCallback<string[]>(progress, cancel);
 698        iceI_ice_ids(context, completed, synchronous);
 699        return completed.Task;
 700    }
 701
 702    private const string _ice_ids_name = "ice_ids";
 703
 704    private void iceI_ice_ids(
 705        Dictionary<string, string>? context,
 706        OutgoingAsyncCompletionCallback completed,
 707        bool synchronous)
 708    {
 709        iceCheckAsyncTwowayOnly(_ice_ids_name);
 710        getOutgoingAsync<string[]>(completed).invoke(
 711            _ice_ids_name,
 712            OperationMode.Idempotent,
 713            FormatType.CompactFormat,
 714            context,
 715            synchronous,
 716            read: (InputStream iss) => iss.readStringSeq());
 717    }
 718
 719    /// <summary>
 720    /// Gets the Slice type ID of the most-derived interface supported by the target object of this proxy.
 721    /// </summary>
 722    /// <param name="context">The request context.</param>
 723    /// <returns>The Slice type ID of the most-derived interface.</returns>
 724    public string ice_id(Dictionary<string, string>? context = null)
 725    {
 726        try
 727        {
 728            return iceI_ice_idAsync(context, synchronous: true, progress: null, CancellationToken.None).Result;
 729        }
 730        catch (AggregateException ex)
 731        {
 732            throw ex.InnerException!;
 733        }
 734    }
 735
 736    /// <summary>
 737    /// Gets the Slice type ID of the most-derived interface supported by the target object of this proxy.
 738    /// </summary>
 739    /// <param name="context">The request context.</param>
 740    /// <param name="progress">Sent progress provider.</param>
 741    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 742    /// <returns>The task object representing the asynchronous operation.</returns>
 743    public Task<string> ice_idAsync(
 744        Dictionary<string, string>? context = null,
 745        IProgress<bool>? progress = null,
 746        CancellationToken cancel = default) => iceI_ice_idAsync(context, synchronous: false, progress, cancel);
 747
 748    private Task<string>
 749    iceI_ice_idAsync(
 750        Dictionary<string, string>? context,
 751        bool synchronous,
 752        IProgress<bool>? progress,
 753        CancellationToken cancel)
 754    {
 755        iceCheckTwowayOnly(_ice_id_name);
 756        var completed = new OperationTaskCompletionCallback<string>(progress, cancel);
 757        iceI_ice_id(context, completed, synchronous);
 758        return completed.Task;
 759    }
 760
 761    private const string _ice_id_name = "ice_id";
 762
 763    private void iceI_ice_id(
 764        Dictionary<string, string>? context,
 765        OutgoingAsyncCompletionCallback completed,
 766        bool synchronous)
 767    {
 768        getOutgoingAsync<string>(completed).invoke(
 769            _ice_id_name,
 770            OperationMode.Idempotent,
 771            FormatType.CompactFormat,
 772            context,
 773            synchronous,
 774            read: (InputStream iss) => iss.readString());
 775    }
 776
 777    /// <summary>
 778    /// Invokes an operation dynamically.
 779    /// </summary>
 780    /// <param name="operation">The name of the operation to invoke.</param>
 781    /// <param name="mode">The operation mode (normal or idempotent).</param>
 782    /// <param name="inEncaps">The encoded in-parameters for the operation.</param>
 783    /// <param name="outEncaps">The encoded out-parameters and return value
 784    /// for the operation. The return value follows any out-parameters.</param>
 785    /// <param name="context">The request context.</param>
 786    /// <returns>If the operation completed successfully, the return value is <see langword="true"/>.
 787    /// If the operation raises a user exception, the return value is <see langword="false"/>; in this case,
 788    /// <paramref name="outEncaps"/> contains the encoded user exception.
 789    /// If the operation raises a run-time exception, it throws it directly.</returns>
 790    public bool ice_invoke(
 791        string operation,
 792        OperationMode mode,
 793        byte[] inEncaps,
 794        out byte[] outEncaps,
 795        Dictionary<string, string>? context = null)
 796    {
 797        try
 798        {
 799            Object_Ice_invokeResult result = iceI_ice_invokeAsync(
 800                operation,
 801                mode,
 802                inEncaps,
 803                context,
 804                synchronous: true,
 805                progress: null,
 806                CancellationToken.None).Result;
 807            outEncaps = result.outEncaps;
 808            return result.returnValue;
 809        }
 810        catch (AggregateException ex)
 811        {
 812            throw ex.InnerException!;
 813        }
 814    }
 815
 816    /// <summary>
 817    /// Invokes an operation dynamically.
 818    /// </summary>
 819    /// <param name="operation">The name of the operation to invoke.</param>
 820    /// <param name="mode">The operation mode (normal or idempotent).</param>
 821    /// <param name="inEncaps">The encoded in-parameters for the operation.</param>
 822    /// <param name="context">The request context.</param>
 823    /// <param name="progress">Sent progress provider.</param>
 824    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 825    /// <returns>The task object representing the asynchronous operation.</returns>
 826    public Task<Object_Ice_invokeResult>
 827    ice_invokeAsync(
 828        string operation,
 829        OperationMode mode,
 830        byte[] inEncaps,
 831        Dictionary<string, string>? context = null,
 832        IProgress<bool>? progress = null,
 833        CancellationToken cancel = default) =>
 834            iceI_ice_invokeAsync(operation, mode, inEncaps, context, synchronous: false, progress, cancel);
 835
 836    private Task<Object_Ice_invokeResult>
 837    iceI_ice_invokeAsync(
 838        string operation,
 839        OperationMode mode,
 840        byte[] inEncaps,
 841        Dictionary<string, string>? context,
 842        bool synchronous,
 843        IProgress<bool>? progress,
 844        CancellationToken cancel)
 845    {
 846        var completed = new InvokeTaskCompletionCallback(progress, cancel);
 847        iceI_ice_invoke(operation, mode, inEncaps, context, completed, synchronous);
 848        return completed.Task;
 849    }
 850
 851    private void iceI_ice_invoke(
 852        string operation,
 853        OperationMode mode,
 854        byte[] inEncaps,
 855        Dictionary<string, string>? context,
 856        OutgoingAsyncCompletionCallback completed,
 857        bool synchronous) => getInvokeOutgoingAsync(completed).invoke(operation, mode, inEncaps, context, synchronous);
 858
 859    /// <summary>
 860    /// Gets the identity embedded in this proxy.
 861    /// </summary>
 862    /// <returns>The identity of the target object.</returns>
 863    public Identity ice_getIdentity() => _reference.getIdentity() with { };
 864
 865    /// <summary>
 866    /// Creates a new proxy that is identical to this proxy, except for the proxy identity.
 867    /// </summary>
 868    /// <param name="newIdentity">The identity for the new proxy.</param>
 869    /// <returns>The new proxy with the specified identity.</returns>
 870    /// <exception cref="ArgumentException">If the name of the new identity is empty.</exception>
 871    public ObjectPrx ice_identity(Identity newIdentity)
 872    {
 873        if (newIdentity.name.Length == 0)
 874        {
 875            throw new ArgumentException("The name of an Ice object identity cannot be empty.", nameof(newIdentity));
 876        }
 877        if (newIdentity == _reference.getIdentity())
 878        {
 879            return this;
 880        }
 881        else
 882        {
 883            return new ObjectPrxHelper(_reference.changeIdentity(newIdentity));
 884        }
 885    }
 886
 887    /// <summary>
 888    /// Gets the per-proxy context for this proxy.
 889    /// </summary>
 890    /// <returns>The per-proxy context. If the proxy does not have a per-proxy (implicit) context, the return value
 891    /// is null.</returns>
 892    public Dictionary<string, string> ice_getContext() => new Dictionary<string, string>(_reference.getContext());
 893
 894    /// <summary>
 895    /// Creates a new proxy that is identical to this proxy, except for the per-proxy context.
 896    /// </summary>
 897    /// <param name="newContext">The context for the new proxy.</param>
 898    /// <returns>The proxy with the new per-proxy context.</returns>
 899    public ObjectPrx ice_context(Dictionary<string, string> newContext) =>
 900        iceNewInstance(_reference.changeContext(newContext));
 901
 902    /// <summary>
 903    /// Gets the facet for this proxy.
 904    /// </summary>
 905    /// <returns>The facet for this proxy. If the proxy uses the default facet, the return value is the
 906    /// empty string.</returns>
 907    public string ice_getFacet() => _reference.getFacet();
 908
 909    /// <summary>
 910    /// Creates a new proxy that is identical to this proxy, except for the facet.
 911    /// </summary>
 912    /// <param name="newFacet">The facet for the new proxy.</param>
 913    /// <returns>The proxy with the new facet.</returns>
 914    public ObjectPrx ice_facet(string newFacet)
 915    {
 916        newFacet ??= "";
 917
 918        if (newFacet == _reference.getFacet())
 919        {
 920            return this;
 921        }
 922        else
 923        {
 924            return new ObjectPrxHelper(_reference.changeFacet(newFacet));
 925        }
 926    }
 927
 928    /// <summary>
 929    /// Gets the adapter ID for this proxy.
 930    /// </summary>
 931    /// <returns>The adapter ID. If the proxy does not have an adapter ID, the return value is the
 932    /// empty string.</returns>
 933    public string ice_getAdapterId() => _reference.getAdapterId();
 934
 935    /// <summary>
 936    /// Creates a new proxy that is identical to this proxy, except for the adapter ID.
 937    /// </summary>
 938    /// <param name="newAdapterId">The adapter ID for the new proxy.</param>
 939    /// <returns>The new proxy with the specified adapter ID.</returns>
 940    public ObjectPrx ice_adapterId(string newAdapterId)
 941    {
 942        newAdapterId ??= "";
 943
 944        if (newAdapterId == _reference.getAdapterId())
 945        {
 946            return this;
 947        }
 948        else
 949        {
 950            return iceNewInstance(_reference.changeAdapterId(newAdapterId));
 951        }
 952    }
 953
 954    /// <summary>
 955    /// Gets the endpoints used by this proxy.
 956    /// </summary>
 957    /// <returns>The endpoints used by this proxy.</returns>
 958    public Endpoint[] ice_getEndpoints() => (Endpoint[])_reference.getEndpoints().Clone();
 959
 960    /// <summary>
 961    /// Creates a new proxy that is identical to this proxy, except for the endpoints.
 962    /// </summary>
 963    /// <param name="newEndpoints">The endpoints for the new proxy.</param>
 964    /// <returns>The new proxy with the specified endpoints.</returns>
 965    public ObjectPrx ice_endpoints(Endpoint[] newEndpoints)
 966    {
 967        newEndpoints ??= [];
 968
 969        if (_reference.getEndpoints().SequenceEqual(newEndpoints))
 970        {
 971            return this;
 972        }
 973        else
 974        {
 975            var endpoints = new EndpointI[newEndpoints.Length];
 976            for (int i = 0; i < newEndpoints.Length; ++i)
 977            {
 978                endpoints[i] = (EndpointI)newEndpoints[i];
 979            }
 980            return iceNewInstance(_reference.changeEndpoints(endpoints));
 981        }
 982    }
 983
 984    /// <summary>
 985    /// Gets the locator cache timeout of this proxy.
 986    /// </summary>
 987    /// <returns>The locator cache timeout value.</returns>
 988    public TimeSpan ice_getLocatorCacheTimeout() => _reference.getLocatorCacheTimeout();
 989
 990    /// <summary>
 991    /// Creates a new proxy that is identical to this proxy, except for the locator cache timeout.
 992    /// </summary>
 993    /// <param name="newTimeout">The new locator cache timeout (in seconds).</param>
 994    /// <returns>The new proxy with the specified locator cache timeout.</returns>
 995    public ObjectPrx ice_locatorCacheTimeout(int newTimeout) =>
 996        ice_locatorCacheTimeout(TimeSpan.FromSeconds(newTimeout));
 997
 998    /// <summary>
 999    /// Creates a new proxy that is identical to this proxy, except for the locator cache timeout.
 1000    /// </summary>
 1001    /// <param name="newTimeout">The new locator cache timeout.</param>
 1002    /// <returns>The new proxy with the specified locator cache timeout.</returns>
 1003    public ObjectPrx ice_locatorCacheTimeout(TimeSpan newTimeout)
 1004    {
 1005        if (newTimeout == _reference.getLocatorCacheTimeout())
 1006        {
 1007            return this;
 1008        }
 1009        else
 1010        {
 1011            return iceNewInstance(_reference.changeLocatorCacheTimeout(newTimeout));
 1012        }
 1013    }
 1014
 1015    /// <summary>
 1016    /// Gets the invocation timeout of this proxy.
 1017    /// </summary>
 1018    /// <returns>The invocation timeout value.</returns>
 1019    public TimeSpan ice_getInvocationTimeout() => _reference.getInvocationTimeout();
 1020
 1021    /// <summary>
 1022    /// Creates a new proxy that is identical to this proxy, except for the invocation timeout.
 1023    /// </summary>
 1024    /// <param name="newTimeout">The new invocation timeout (in milliseconds).</param>
 1025    /// <returns>The new proxy with the specified invocation timeout.</returns>
 1026    public ObjectPrx ice_invocationTimeout(int newTimeout) =>
 1027        ice_invocationTimeout(TimeSpan.FromMilliseconds(newTimeout));
 1028
 1029    /// <summary>
 1030    /// Creates a new proxy that is identical to this proxy, except for the invocation timeout.
 1031    /// </summary>
 1032    /// <param name="newTimeout">The new invocation timeout.</param>
 1033    /// <returns>The new proxy with the specified invocation timeout.</returns>
 1034    public ObjectPrx ice_invocationTimeout(TimeSpan newTimeout)
 1035    {
 1036        if (newTimeout == _reference.getInvocationTimeout())
 1037        {
 1038            return this;
 1039        }
 1040        else
 1041        {
 1042            return iceNewInstance(_reference.changeInvocationTimeout(newTimeout));
 1043        }
 1044    }
 1045
 1046    /// <summary>
 1047    /// Returns whether this proxy caches connections.
 1048    /// </summary>
 1049    /// <returns><see langword="true"/> if this proxy caches connections; <see langword="false"/> otherwise.</returns>
 1050    public bool ice_isConnectionCached() => _reference.getCacheConnection();
 1051
 1052    /// <summary>
 1053    /// Creates a new proxy that is identical to this proxy, except for connection caching.
 1054    /// </summary>
 1055    /// <param name="newCache"><see langword="true"/> if the new proxy should cache connections;
 1056    /// <see langword="false"/>, otherwise.</param>
 1057    /// <returns>The new proxy with the specified caching policy.</returns>
 1058    public ObjectPrx ice_connectionCached(bool newCache)
 1059    {
 1060        if (newCache == _reference.getCacheConnection())
 1061        {
 1062            return this;
 1063        }
 1064        else
 1065        {
 1066            return iceNewInstance(_reference.changeCacheConnection(newCache));
 1067        }
 1068    }
 1069
 1070    /// <summary>
 1071    /// Returns how this proxy selects endpoints (randomly or ordered).
 1072    /// </summary>
 1073    /// <returns>The endpoint selection policy.</returns>
 1074    public EndpointSelectionType ice_getEndpointSelection() => _reference.getEndpointSelection();
 1075
 1076    /// <summary>
 1077    /// Creates a new proxy that is identical to this proxy, except for the endpoint selection policy.
 1078    /// </summary>
 1079    /// <param name="newType">The new endpoint selection policy.</param>
 1080    /// <returns>The new proxy with the specified endpoint selection policy.</returns>
 1081    public ObjectPrx ice_endpointSelection(EndpointSelectionType newType)
 1082    {
 1083        if (newType == _reference.getEndpointSelection())
 1084        {
 1085            return this;
 1086        }
 1087        else
 1088        {
 1089            return iceNewInstance(_reference.changeEndpointSelection(newType));
 1090        }
 1091    }
 1092
 1093    /// <summary>
 1094    /// Creates a new proxy that is identical to this proxy, except for the encoding used to marshal
 1095    /// parameters.
 1096    /// </summary>
 1097    /// <param name="encodingVersion">The encoding version to use to marshal requests parameters.</param>
 1098    /// <returns>The new proxy with the specified encoding version.</returns>
 1099    public ObjectPrx ice_encodingVersion(EncodingVersion encodingVersion)
 1100    {
 1101        if (encodingVersion == _reference.getEncoding())
 1102        {
 1103            return this;
 1104        }
 1105        else
 1106        {
 1107            return iceNewInstance(_reference.changeEncoding(encodingVersion));
 1108        }
 1109    }
 1110
 1111    /// <summary>
 1112    /// Gets the encoding version used to marshal requests parameters.
 1113    /// </summary>
 1114    /// <returns>The encoding version.</returns>
 1115    public EncodingVersion ice_getEncodingVersion() => _reference.getEncoding();
 1116
 1117    /// <summary>
 1118    /// Gets the router for this proxy.
 1119    /// </summary>
 1120    /// <returns>The router for the proxy. If no router is configured for the proxy, the return value
 1121    /// is null.</returns>
 1122    public RouterPrx? ice_getRouter()
 1123    {
 1124        RouterInfo ri = _reference.getRouterInfo();
 1125        return ri?.getRouter();
 1126    }
 1127
 1128    /// <summary>
 1129    /// Creates a new proxy that is identical to this proxy, except for the router.
 1130    /// </summary>
 1131    /// <param name="router">The router for the new proxy.</param>
 1132    /// <returns>The new proxy with the specified router.</returns>
 1133    public ObjectPrx ice_router(RouterPrx? router)
 1134    {
 1135        if (router == _reference.getRouterInfo()?.getRouter())
 1136        {
 1137            return this;
 1138        }
 1139        else
 1140        {
 1141            return iceNewInstance(_reference.changeRouter(router));
 1142        }
 1143    }
 1144
 1145    /// <summary>
 1146    /// Gets the locator for this proxy.
 1147    /// </summary>
 1148    /// <returns>The locator for this proxy. If no locator is configured, the return value is null.</returns>
 1149    public LocatorPrx? ice_getLocator()
 1150    {
 1151        LocatorInfo li = _reference.getLocatorInfo();
 1152        return li?.getLocator();
 1153    }
 1154
 1155    /// <summary>
 1156    /// Creates a new proxy that is identical to this proxy, except for the locator.
 1157    /// </summary>
 1158    /// <param name="locator">The locator for the new proxy.</param>
 1159    /// <returns>The new proxy with the specified locator.</returns>
 1160    public ObjectPrx ice_locator(LocatorPrx? locator)
 1161    {
 1162        if (locator == _reference.getLocatorInfo()?.getLocator())
 1163        {
 1164            return this;
 1165        }
 1166        else
 1167        {
 1168            return iceNewInstance(_reference.changeLocator(locator));
 1169        }
 1170    }
 1171
 1172    /// <summary>
 1173    /// Returns whether this proxy uses collocation optimization.
 1174    /// </summary>
 1175    /// <returns><see langword="true"/> if the proxy uses collocation optimization;
 1176    /// <see langword="false"/>, otherwise.</returns>
 1177    public bool ice_isCollocationOptimized() => _reference.getCollocationOptimized();
 1178
 1179    /// <summary>
 1180    /// Creates a new proxy that is identical to this proxy, except for collocation optimization.
 1181    /// </summary>
 1182    /// <param name="collocated"><see langword="true"/> if the new proxy enables collocation optimization;
 1183    /// <see langword="false"/>, otherwise.</param>
 1184    /// <returns>The new proxy the specified collocation optimization.</returns>
 1185    public ObjectPrx ice_collocationOptimized(bool collocated)
 1186    {
 1187        if (collocated == _reference.getCollocationOptimized())
 1188        {
 1189            return this;
 1190        }
 1191        else
 1192        {
 1193            return iceNewInstance(_reference.changeCollocationOptimized(collocated));
 1194        }
 1195    }
 1196
 1197    /// <summary>
 1198    /// Creates a new proxy that is identical to this proxy, but uses twoway invocations.
 1199    /// </summary>
 1200    /// <returns>A new proxy that uses twoway invocations.</returns>
 1201    public ObjectPrx ice_twoway()
 1202    {
 1203        if (_reference.isTwoway)
 1204        {
 1205            return this;
 1206        }
 1207        else
 1208        {
 1209            return iceNewInstance(_reference.changeMode(Reference.Mode.ModeTwoway));
 1210        }
 1211    }
 1212
 1213    /// <summary>
 1214    /// Returns whether this proxy uses twoway invocations.
 1215    /// </summary>
 1216    /// <returns><see langword="true"/> if this proxy uses twoway invocations;
 1217    /// <see langword="false"/> otherwise.</returns>
 1218    public bool ice_isTwoway() => _reference.isTwoway;
 1219
 1220    /// <summary>
 1221    /// Creates a new proxy that is identical to this proxy, but uses oneway invocations.
 1222    /// </summary>
 1223    /// <returns>A new proxy that uses oneway invocations.</returns>
 1224    public ObjectPrx ice_oneway()
 1225    {
 1226        if (_reference.getMode() == Reference.Mode.ModeOneway)
 1227        {
 1228            return this;
 1229        }
 1230        else
 1231        {
 1232            return iceNewInstance(_reference.changeMode(Reference.Mode.ModeOneway));
 1233        }
 1234    }
 1235
 1236    /// <summary>
 1237    /// Returns whether this proxy uses oneway invocations.
 1238    /// </summary>
 1239    /// <returns><see langword="true"/> if this proxy uses oneway invocations;
 1240    /// <see langword="false"/> otherwise.</returns>
 1241    public bool ice_isOneway() => _reference.getMode() == Reference.Mode.ModeOneway;
 1242
 1243    /// <summary>
 1244    /// Creates a new proxy that is identical to this proxy, but uses batch oneway invocations.
 1245    /// </summary>
 1246    /// <returns>A new proxy that uses batch oneway invocations.</returns>
 1247    public ObjectPrx ice_batchOneway()
 1248    {
 1249        if (_reference.getMode() == Reference.Mode.ModeBatchOneway)
 1250        {
 1251            return this;
 1252        }
 1253        else
 1254        {
 1255            return iceNewInstance(_reference.changeMode(Reference.Mode.ModeBatchOneway));
 1256        }
 1257    }
 1258
 1259    /// <summary>
 1260    /// Returns whether this proxy uses batch oneway invocations.
 1261    /// </summary>
 1262    /// <returns><see langword="true"/> if this proxy uses batch oneway invocations;
 1263    /// <see langword="false"/> otherwise.</returns>
 1264    public bool ice_isBatchOneway() => _reference.getMode() == Reference.Mode.ModeBatchOneway;
 1265
 1266    /// <summary>
 1267    /// Creates a new proxy that is identical to this proxy, but uses datagram invocations.
 1268    /// </summary>
 1269    /// <returns>A new proxy that uses datagram invocations.</returns>
 1270    public ObjectPrx ice_datagram()
 1271    {
 1272        if (_reference.getMode() == Reference.Mode.ModeDatagram)
 1273        {
 1274            return this;
 1275        }
 1276        else
 1277        {
 1278            return iceNewInstance(_reference.changeMode(Reference.Mode.ModeDatagram));
 1279        }
 1280    }
 1281
 1282    /// <summary>
 1283    /// Returns whether this proxy uses datagram invocations.
 1284    /// </summary>
 1285    /// <returns><see langword="true"/> if this proxy uses datagram invocations;
 1286    /// <see langword="false"/> otherwise.</returns>
 1287    public bool ice_isDatagram() => _reference.getMode() == Reference.Mode.ModeDatagram;
 1288
 1289    /// <summary>
 1290    /// Creates a new proxy that is identical to this proxy, but uses batch datagram invocations.
 1291    /// </summary>
 1292    /// <returns>A new proxy that uses batch datagram invocations.</returns>
 1293    public ObjectPrx ice_batchDatagram()
 1294    {
 1295        if (_reference.getMode() == Reference.Mode.ModeBatchDatagram)
 1296        {
 1297            return this;
 1298        }
 1299        else
 1300        {
 1301            return iceNewInstance(_reference.changeMode(Reference.Mode.ModeBatchDatagram));
 1302        }
 1303    }
 1304
 1305    /// <summary>
 1306    /// Returns whether this proxy uses batch datagram invocations.
 1307    /// </summary>
 1308    /// <returns><see langword="true"/> if this proxy uses batch datagram invocations;
 1309    /// <see langword="false"/>, otherwise.</returns>
 1310    public bool ice_isBatchDatagram() => _reference.getMode() == Reference.Mode.ModeBatchDatagram;
 1311
 1312    /// <summary>
 1313    /// Creates a new proxy that is identical to this proxy, except for compression.
 1314    /// </summary>
 1315    /// <param name="compress"><see langword="true"/> enables compression for the new proxy;
 1316    /// <see langword="false"/> disables compression.</param>
 1317    /// <returns>A new proxy with the specified compression setting.</returns>
 1318    public ObjectPrx ice_compress(bool compress)
 1319    {
 1320        if (compress == _reference.getCompress())
 1321        {
 1322            return this;
 1323        }
 1324        else
 1325        {
 1326            return iceNewInstance(_reference.changeCompress(compress));
 1327        }
 1328    }
 1329
 1330    /// <summary>
 1331    /// Obtains the compression override setting of this proxy.
 1332    /// </summary>
 1333    /// <returns>The compression override setting. If no optional value is present, no override is
 1334    /// set. Otherwise, <see langword="true"/> if compression is enabled, <see langword="false"/> otherwise.</returns>
 1335    public bool? ice_getCompress() => _reference.getCompress();
 1336
 1337    /// <summary>
 1338    /// Creates a new proxy that is identical to this proxy, except for its connection ID.
 1339    /// </summary>
 1340    /// <param name="connectionId">The connection ID for the new proxy. An empty string removes the
 1341    /// connection ID.</param>
 1342    /// <returns>A new proxy with the specified connection ID.</returns>
 1343    public ObjectPrx ice_connectionId(string connectionId)
 1344    {
 1345        if (connectionId == _reference.getConnectionId())
 1346        {
 1347            return this;
 1348        }
 1349        else
 1350        {
 1351            return iceNewInstance(_reference.changeConnectionId(connectionId));
 1352        }
 1353    }
 1354
 1355    /// <summary>
 1356    /// Gets the connection id of this proxy.
 1357    /// </summary>
 1358    /// <returns>The connection id.</returns>
 1359    public string ice_getConnectionId() => _reference.getConnectionId();
 1360
 1361    /// <summary>
 1362    /// Returns a proxy that is identical to this proxy, except it's a fixed proxy bound
 1363    /// the given connection.
 1364    /// </summary>
 1365    /// <param name="connection">The fixed proxy connection.</param>
 1366    /// <returns>A fixed proxy bound to the given connection.</returns>
 1367    public ObjectPrx ice_fixed(Ice.Connection connection)
 1368    {
 1369        if (connection is null)
 1370        {
 1371            throw new ArgumentException("invalid null connection passed to ice_fixed");
 1372        }
 1373        if (!(connection is Ice.ConnectionI))
 1374        {
 1375            throw new ArgumentException("invalid connection passed to ice_fixed");
 1376        }
 1377
 1378        if (connection == _reference.getConnection())
 1379        {
 1380            return this;
 1381        }
 1382        else
 1383        {
 1384            return iceNewInstance(_reference.changeConnection((Ice.ConnectionI)connection));
 1385        }
 1386    }
 1387
 1388    /// <summary>
 1389    /// Returns whether this proxy is a fixed proxy.
 1390    /// </summary>
 1391    /// <returns><see langword="true"/> if this is a fixed proxy; <see langword="false"/> otherwise.</returns>
 1392    public bool ice_isFixed() => _reference is Ice.Internal.FixedReference;
 1393
 1394    public class GetConnectionTaskCompletionCallback : TaskCompletionCallback<Connection?>
 1395    {
 1396        public GetConnectionTaskCompletionCallback(
 1397            IProgress<bool>? progress = null,
 1398            CancellationToken cancellationToken = default)
 1399            : base(progress, cancellationToken)
 1400        {
 1401        }
 1402
 1403        public override void handleInvokeResponse(bool ok, OutgoingAsyncBase og) =>
 1404            SetResult(((ProxyGetConnection)og).getConnection());
 1405    }
 1406
 1407    public Connection? ice_getConnection()
 1408    {
 1409        try
 1410        {
 1411            var completed = new GetConnectionTaskCompletionCallback();
 1412            iceI_ice_getConnection(completed, true);
 1413            return completed.Task.Result;
 1414        }
 1415        catch (AggregateException ex)
 1416        {
 1417            throw ex.InnerException!;
 1418        }
 1419    }
 1420
 1421    public Task<Connection?> ice_getConnectionAsync(IProgress<bool>? progress, CancellationToken cancel)
 1422    {
 1423        var completed = new GetConnectionTaskCompletionCallback(progress, cancel);
 1424        iceI_ice_getConnection(completed, false);
 1425        return completed.Task;
 1426    }
 1427
 1428    private const string _ice_getConnection_name = "ice_getConnection";
 1429
 1430    private void iceI_ice_getConnection(OutgoingAsyncCompletionCallback completed, bool synchronous)
 1431    {
 1432        var outgoing = new ProxyGetConnection(this, completed);
 1433        outgoing.invoke(_ice_getConnection_name, synchronous);
 1434    }
 1435
 1436    /// <summary>
 1437    /// Gets the cached Connection for this proxy. If the proxy does not yet have an established
 1438    /// connection, it does not attempt to create a connection.
 1439    /// </summary>
 1440    /// <returns>The cached Connection for this proxy (null if the proxy does not have
 1441    /// an established connection).</returns>
 1442    public Connection? ice_getCachedConnection() => _requestHandlerCache.cachedConnection;
 1443
 1444    /// <summary>
 1445    /// Flushes any pending batched requests for this communicator. The call blocks until the flush is complete.
 1446    /// </summary>
 1447    public void ice_flushBatchRequests()
 1448    {
 1449        try
 1450        {
 1451            var completed = new FlushBatchTaskCompletionCallback();
 1452            iceI_ice_flushBatchRequests(completed, true);
 1453            completed.Task.Wait();
 1454        }
 1455        catch (AggregateException ex)
 1456        {
 1457            throw ex.InnerException!;
 1458        }
 1459    }
 1460
 1461    internal const string _ice_flushBatchRequests_name = "ice_flushBatchRequests";
 1462
 1463    public Task ice_flushBatchRequestsAsync(
 1464        IProgress<bool>? progress = null,
 1465        CancellationToken cancel = default)
 1466    {
 1467        var completed = new FlushBatchTaskCompletionCallback(progress, cancel);
 1468        iceI_ice_flushBatchRequests(completed, false);
 1469        return completed.Task;
 1470    }
 1471
 1472    private void iceI_ice_flushBatchRequests(OutgoingAsyncCompletionCallback completed, bool synchronous)
 1473    {
 1474        var outgoing = new ProxyFlushBatchAsync(this, completed);
 1475        outgoing.invoke(_ice_flushBatchRequests_name, synchronous);
 1476    }
 1477
 1478    public System.Threading.Tasks.TaskScheduler ice_scheduler() => _reference.getThreadPool();
 1479
 1480    [EditorBrowsable(EditorBrowsableState.Never)]
 1481    public void iceWrite(OutputStream os)
 1482    {
 1483        Identity.ice_write(os, _reference.getIdentity());
 1484        _reference.streamWrite(os);
 1485    }
 1486
 1487    internal Reference iceReference() => _reference;
 1488
 1489    [EditorBrowsable(EditorBrowsableState.Never)]
 1490    public void iceCheckTwowayOnly(string name)
 1491    {
 1492        //
 1493        // No mutex lock necessary, there is nothing mutable in this
 1494        // operation.
 1495        //
 1496
 1497        if (!ice_isTwoway())
 1498        {
 1499            throw new TwowayOnlyException(name);
 1500        }
 1501    }
 1502
 1503    [EditorBrowsable(EditorBrowsableState.Never)]
 1504    public void iceCheckAsyncTwowayOnly(string name)
 1505    {
 1506        //
 1507        // No mutex lock necessary, there is nothing mutable in this
 1508        // operation.
 1509        //
 1510
 1511        if (!ice_isTwoway())
 1512        {
 1513            throw new ArgumentException("`" + name + "' can only be called with a twoway proxy");
 1514        }
 1515    }
 1516
 1517    internal RequestHandlerCache iceGetRequestHandlerCache() => _requestHandlerCache;
 1518
 1519    protected ObjectPrxHelperBase(ObjectPrx proxy)
 1520    {
 1521        // We don't supported decorated proxies here.
 1522        var helper = (ObjectPrxHelperBase)proxy;
 1523
 1524        _reference = helper._reference;
 1525        _requestHandlerCache = helper._requestHandlerCache;
 1526    }
 1527
 1528    protected OutgoingAsyncT<T>
 1529    getOutgoingAsync<T>(OutgoingAsyncCompletionCallback completed)
 1530    {
 1531        bool haveEntry = false;
 1532        InputStream? iss = null;
 1533        OutputStream? os = null;
 1534
 1535        if (_reference.getInstance().cacheMessageBuffers() > 0)
 1536        {
 1537            lock (_mutex)
 1538            {
 1539                if (_streamCache != null && _streamCache.Count > 0)
 1540                {
 1541                    haveEntry = true;
 1542                    iss = _streamCache.First!.Value.iss;
 1543                    os = _streamCache.First.Value.os;
 1544
 1545                    _streamCache.RemoveFirst();
 1546                }
 1547            }
 1548        }
 1549        if (!haveEntry)
 1550        {
 1551            return new OutgoingAsyncT<T>(this, completed);
 1552        }
 1553        else
 1554        {
 1555            return new OutgoingAsyncT<T>(this, completed, os, iss);
 1556        }
 1557    }
 1558
 1559    private class InvokeOutgoingAsyncT : OutgoingAsync
 1560    {
 1561        public InvokeOutgoingAsyncT(
 1562            ObjectPrxHelperBase prx,
 1563            OutgoingAsyncCompletionCallback completionCallback,
 1564            OutputStream? os = null,
 1565            InputStream? iss = null)
 1566            : base(prx, completionCallback, os, iss)
 1567        {
 1568        }
 1569
 1570        public void invoke(
 1571            string operation,
 1572            OperationMode mode,
 1573            byte[] inParams,
 1574            Dictionary<string, string>? context,
 1575            bool synchronous)
 1576        {
 1577            try
 1578            {
 1579                prepare(operation, mode, context);
 1580                if (inParams is null || inParams.Length == 0)
 1581                {
 1582                    os_.writeEmptyEncapsulation(encoding_);
 1583                }
 1584                else
 1585                {
 1586                    os_.writeEncapsulation(inParams);
 1587                }
 1588                invoke(operation, synchronous);
 1589            }
 1590            catch (Exception ex)
 1591            {
 1592                abort(ex);
 1593            }
 1594        }
 1595
 1596        public Object_Ice_invokeResult
 1597        getResult(bool ok)
 1598        {
 1599            try
 1600            {
 1601                var ret = new Object_Ice_invokeResult();
 1602                if (proxy_.iceReference().isTwoway)
 1603                {
 1604                    ret.outEncaps = is_.readEncapsulation(out _);
 1605                }
 1606                else
 1607                {
 1608                    ret.outEncaps = [];
 1609                }
 1610                ret.returnValue = ok;
 1611                return ret;
 1612            }
 1613            finally
 1614            {
 1615                cacheMessageBuffers();
 1616            }
 1617        }
 1618    }
 1619
 1620    private class InvokeTaskCompletionCallback : TaskCompletionCallback<Object_Ice_invokeResult>
 1621    {
 1622        public InvokeTaskCompletionCallback(IProgress<bool>? progress, CancellationToken cancellationToken)
 11623            : base(progress, cancellationToken)
 1624        {
 11625        }
 1626
 1627        public override void handleInvokeSent(
 1628            bool sentSynchronously,
 1629            bool done,
 1630            bool alreadySent,
 1631            OutgoingAsyncBase og)
 1632        {
 11633            if (progress_ != null && !alreadySent)
 1634            {
 01635                progress_.Report(sentSynchronously);
 1636            }
 11637            if (done)
 1638            {
 11639                SetResult(new Object_Ice_invokeResult(true, []));
 1640            }
 11641        }
 1642
 1643        public override void handleInvokeResponse(bool ok, OutgoingAsyncBase og) =>
 11644            SetResult(((InvokeOutgoingAsyncT)og).getResult(ok));
 1645    }
 1646
 1647    private InvokeOutgoingAsyncT
 1648    getInvokeOutgoingAsync(OutgoingAsyncCompletionCallback completed)
 1649    {
 1650        bool haveEntry = false;
 1651        InputStream? iss = null;
 1652        OutputStream? os = null;
 1653
 1654        if (_reference.getInstance().cacheMessageBuffers() > 0)
 1655        {
 1656            lock (_mutex)
 1657            {
 1658                if (_streamCache != null && _streamCache.Count > 0)
 1659                {
 1660                    haveEntry = true;
 1661                    iss = _streamCache.First!.Value.iss;
 1662                    os = _streamCache.First.Value.os;
 1663
 1664                    _streamCache.RemoveFirst();
 1665                }
 1666            }
 1667        }
 1668        if (!haveEntry)
 1669        {
 1670            return new InvokeOutgoingAsyncT(this, completed);
 1671        }
 1672        else
 1673        {
 1674            return new InvokeOutgoingAsyncT(this, completed, os, iss);
 1675        }
 1676    }
 1677
 1678    internal void cacheMessageBuffers(InputStream iss, OutputStream os)
 1679    {
 1680        lock (_mutex)
 1681        {
 1682            _streamCache ??= new LinkedList<(InputStream, OutputStream)>();
 1683            _streamCache.AddLast((iss, os));
 1684        }
 1685    }
 1686
 1687    /// <summary>
 1688    /// Initializes a new instance of the <see cref="ObjectPrxHelperBase" /> class.
 1689    /// </summary>
 1690    /// <param name="reference">The reference for the new proxy.</param>
 1691    [EditorBrowsable(EditorBrowsableState.Never)]
 1692    protected ObjectPrxHelperBase(Reference reference)
 1693    {
 1694        _reference = reference;
 1695        _requestHandlerCache = new RequestHandlerCache(reference);
 1696    }
 1697
 1698    /// <summary>
 1699    /// Constructs a new proxy instance.
 1700    /// </summary>
 1701    /// <param name="reference">The reference for the new proxy.</param>
 1702    /// <returns>The new proxy instance.</returns>
 1703    [EditorBrowsable(EditorBrowsableState.Never)]
 1704    protected abstract ObjectPrxHelperBase iceNewInstance(Reference reference);
 1705
 1706    private readonly Reference _reference;
 1707    private readonly RequestHandlerCache _requestHandlerCache;
 1708    private LinkedList<(InputStream iss, OutputStream os)>? _streamCache;
 1709    private readonly object _mutex = new();
 1710}
 1711
 1712/// <summary>
 1713/// Base class for all proxy helpers.
 1714/// </summary>
 1715public class ObjectPrxHelper : ObjectPrxHelperBase
 1716{
 1717    /// <summary>
 1718    /// Creates a new proxy that implements <see cref="ObjectPrx" />.
 1719    /// </summary>
 1720    /// <param name="communicator">The communicator of the new proxy.</param>
 1721    /// <param name="proxyString">The string representation of the proxy.</param>
 1722    /// <returns>The new proxy.</returns>
 1723    /// <exception name="ParseException">Thrown when <paramref name="proxyString" /> is not a valid proxy string.
 1724    /// </exception>
 1725    public static ObjectPrx createProxy(Communicator communicator, string proxyString)
 1726    {
 1727        Reference? reference = communicator.instance.referenceFactory().create(proxyString, "");
 1728
 1729        return reference is not null ?
 1730            new ObjectPrxHelper(reference) :
 1731            throw new ParseException("Invalid empty proxy string.");
 1732    }
 1733
 1734    /// <summary>
 1735    /// Creates a new proxy from an existing proxy after confirming the target object's type via a remote invocation.
 1736    /// </summary>
 1737    /// <param name="proxy">The source proxy.</param>
 1738    /// <param name="context">The request context.</param>
 1739    /// <returns>A new proxy with the requested type, or null if the target object does not support the requested type.
 1740    /// </returns>
 1741    public static ObjectPrx? checkedCast(ObjectPrx? proxy, Dictionary<string, string>? context = null) =>
 1742        proxy is not null && proxy.ice_isA("::Ice::Object", context) ? proxy : null;
 1743
 1744    /// <summary>
 1745    /// Creates a new proxy from an existing proxy after confirming the target object's type via a remote invocation.
 1746    /// </summary>
 1747    /// <param name="proxy">The source proxy (can be null).</param>
 1748    /// <param name="facet">A facet name.</param>
 1749    /// <param name="context">The request context.</param>
 1750    /// <returns>A new proxy with the requested type and facet, or null if the target facet does not support the
 1751    /// requested type.</returns>
 1752    public static ObjectPrx? checkedCast(ObjectPrx? proxy, string facet, Dictionary<string, string>? context = null) =>
 1753        checkedCast(proxy?.ice_facet(facet), context);
 1754
 1755    /// <summary>
 1756    /// Creates a new proxy from an existing proxy after confirming the target object's type via a remote invocation.
 1757    /// </summary>
 1758    /// <param name="proxy">The source proxy.</param>
 1759    /// <param name="context">The request context.</param>
 1760    /// <param name="progress">Sent progress provider.</param>
 1761    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 1762    /// <returns>A new proxy with the requested type, or null if the target object does not support the requested type.
 1763    /// </returns>
 1764    public static async Task<ObjectPrx?> checkedCastAsync(
 1765        ObjectPrx proxy,
 1766        Dictionary<string, string>? context = null,
 1767        IProgress<bool>? progress = null,
 1768        CancellationToken cancel = default) =>
 1769       await proxy.ice_isAAsync("::Ice::Object", context, progress, cancel).ConfigureAwait(false) ? proxy : null;
 1770
 1771    /// <summary>
 1772    /// Creates a new proxy from an existing proxy after confirming the target object's type via a remote invocation.
 1773    /// </summary>
 1774    /// <param name="proxy">The source proxy.</param>
 1775    /// <param name="facet">A facet name.</param>
 1776    /// <param name="context">The request context.</param>
 1777    /// <param name="progress">Sent progress provider.</param>
 1778    /// <param name="cancel">A cancellation token that receives the cancellation requests.</param>
 1779    /// <returns>A new proxy with the requested type and facet, or null if the target facet does not support the
 1780    /// requested type.</returns>
 1781    public static Task<ObjectPrx?> checkedCastAsync(
 1782        ObjectPrx proxy,
 1783        string facet,
 1784        Dictionary<string, string>? context = null,
 1785        IProgress<bool>? progress = null,
 1786        CancellationToken cancel = default) =>
 1787        checkedCastAsync(proxy.ice_facet(facet), context, progress, cancel);
 1788
 1789    /// <summary>
 1790    /// Creates a new proxy from an existing proxy.
 1791    /// </summary>
 1792    /// <param name="proxy">The source proxy.</param>
 1793    /// <returns>A new proxy with the requested type.</returns>
 1794    /// <remarks>This is a purely local operation.</remarks>
 1795    [return: NotNullIfNotNull(nameof(proxy))]
 1796    public static ObjectPrx? uncheckedCast(ObjectPrx? proxy) => proxy;
 1797
 1798    /// <summary>
 1799    /// Creates a new proxy from an existing proxy.
 1800    /// </summary>
 1801    /// <param name="proxy">The source proxy.</param>
 1802    /// <param name="facet">A facet name.</param>
 1803    /// <returns>A new proxy with the requested type and facet, or null if the source proxy is null.</returns>
 1804    /// <remarks>This is a purely local operation.</remarks>
 1805    [return: NotNullIfNotNull(nameof(proxy))]
 1806    public static ObjectPrx? uncheckedCast(ObjectPrx? proxy, string facet) => proxy?.ice_facet(facet);
 1807
 1808    /// <summary>
 1809    /// Gets the Slice type id of the interface or class associated with this proxy class.
 1810    /// </summary>
 1811    /// <returns>The type id, "::Ice::Object".</returns>
 1812    public static string ice_staticId() => Object.ice_staticId();
 1813
 1814    protected override ObjectPrxHelperBase iceNewInstance(Reference reference) => new ObjectPrxHelper(reference);
 1815
 1816    internal ObjectPrxHelper(Reference reference)
 1817        : base(reference)
 1818    {
 1819    }
 1820}