Пример #1
0
        /// <summary>
        /// Creates a new proxy that is identical to this proxy, except for the facet.
        /// </summary>
        /// <param name="newFacet">The facet for the new proxy.</param>
        /// <returns>The proxy with the new facet.</returns>
        public ObjectPrx ice_facet(string newFacet)
        {
            if(newFacet == null)
            {
                newFacet = "";
            }

            if(newFacet.Equals(_reference.getFacet()))
            {
                return this;
            }
            else
            {
                ObjectPrxHelperBase proxy = new ObjectPrxHelperBase();
                proxy.setup(_reference.changeFacet(newFacet));
                return proxy;
            }
        }
Пример #2
0
 /// <summary>
 /// Creates a new proxy that is identical to this proxy, except for the per-proxy context.
 /// <param name="newIdentity">The identity for the new proxy.</param>
 /// <returns>The proxy with the new identity.</returns>
 /// </summary>
 public ObjectPrx ice_identity(Identity newIdentity)
 {
     if(newIdentity.name.Length == 0)
     {
         throw new IllegalIdentityException();
     }
     if(newIdentity.Equals(_reference.getIdentity()))
     {
         return this;
     }
     else
     {
         ObjectPrxHelperBase proxy = new ObjectPrxHelperBase();
         proxy.setup(_reference.changeIdentity(newIdentity));
         return proxy;
     }
 }
Пример #3
0
 /// <summary>
 /// Returns whether two proxies are equal. Two proxies are equal if they are equal in all
 /// respects, that is, if their object identity, endpoints timeout settings, and so on are all equal.
 /// </summary>
 /// <param name="lhs">A proxy to compare with the proxy rhs.</param>
 /// <param name="rhs">A proxy to compare with the proxy lhs.</param>
 /// <returns>True if the proxies are equal; false, otherwise.</returns>
 public static bool Equals(ObjectPrxHelperBase lhs, ObjectPrxHelperBase rhs)
 {
     return object.ReferenceEquals(lhs, null) ? object.ReferenceEquals(rhs, null) : lhs.Equals(rhs);
 }