diff options
Diffstat (limited to 'cs/src/Ice/Proxy.cs')
-rw-r--r-- | cs/src/Ice/Proxy.cs | 722 |
1 files changed, 361 insertions, 361 deletions
diff --git a/cs/src/Ice/Proxy.cs b/cs/src/Ice/Proxy.cs index a00b4ef77de..cb09b746f65 100644 --- a/cs/src/Ice/Proxy.cs +++ b/cs/src/Ice/Proxy.cs @@ -16,15 +16,15 @@ namespace Ice { public interface ObjectPrx { - [Obsolete("This method is deprecated, use ice_getHash instead.")] + [Obsolete("This method is deprecated, use ice_getHash instead.")] int ice_hash(); int ice_getHash(); - [Obsolete("This method is deprecated, use ice_getCommunicator instead.")] - Communicator ice_communicator(); - Communicator ice_getCommunicator(); + [Obsolete("This method is deprecated, use ice_getCommunicator instead.")] + Communicator ice_communicator(); + Communicator ice_getCommunicator(); - string ice_toString(); + string ice_toString(); bool ice_isA(string id__); bool ice_isA(string id__, Context context__); @@ -48,54 +48,54 @@ namespace Ice Context context); Identity ice_getIdentity(); - [Obsolete("This method is deprecated, use ice_identity instead.")] + [Obsolete("This method is deprecated, use ice_identity instead.")] ObjectPrx ice_newIdentity(Identity newIdentity); ObjectPrx ice_identity(Identity newIdentity); - + Context ice_getContext(); - [Obsolete("This method is deprecated, use ice_context instead.")] + [Obsolete("This method is deprecated, use ice_context instead.")] ObjectPrx ice_newContext(Context newContext); ObjectPrx ice_context(Context newContext); ObjectPrx ice_defaultContext(); - + string ice_getFacet(); - [Obsolete("This method is deprecated, use ice_facet instead.")] + [Obsolete("This method is deprecated, use ice_facet instead.")] ObjectPrx ice_newFacet(string newFacet); ObjectPrx ice_facet(string newFacet); string ice_getAdapterId(); - [Obsolete("This method is deprecated, use ice_adapterId instead.")] + [Obsolete("This method is deprecated, use ice_adapterId instead.")] ObjectPrx ice_newAdapterId(string newAdapterId); ObjectPrx ice_adapterId(string newAdapterId); - Endpoint[] ice_getEndpoints(); - [Obsolete("This method is deprecated, use ice_endpoints instead.")] + Endpoint[] ice_getEndpoints(); + [Obsolete("This method is deprecated, use ice_endpoints instead.")] ObjectPrx ice_newEndpoints(Endpoint[] newEndpoints); ObjectPrx ice_endpoints(Endpoint[] newEndpoints); - int ice_getLocatorCacheTimeout(); - ObjectPrx ice_locatorCacheTimeout(int timeout); - - bool ice_isConnectionCached(); - ObjectPrx ice_connectionCached(bool newCache); + int ice_getLocatorCacheTimeout(); + ObjectPrx ice_locatorCacheTimeout(int timeout); + + bool ice_isConnectionCached(); + ObjectPrx ice_connectionCached(bool newCache); - EndpointSelectionType ice_getEndpointSelection(); - ObjectPrx ice_endpointSelection(EndpointSelectionType newType); + EndpointSelectionType ice_getEndpointSelection(); + ObjectPrx ice_endpointSelection(EndpointSelectionType newType); - bool ice_isSecure(); + bool ice_isSecure(); ObjectPrx ice_secure(bool b); - bool ice_isPreferSecure(); + bool ice_isPreferSecure(); ObjectPrx ice_preferSecure(bool b); - Ice.RouterPrx ice_getRouter(); + Ice.RouterPrx ice_getRouter(); ObjectPrx ice_router(Ice.RouterPrx router); - Ice.LocatorPrx ice_getLocator(); + Ice.LocatorPrx ice_getLocator(); ObjectPrx ice_locator(Ice.LocatorPrx locator); - bool ice_isCollocationOptimized(); - [Obsolete("This method is deprecated, use ice_collocationOptimized instead.")] + bool ice_isCollocationOptimized(); + [Obsolete("This method is deprecated, use ice_collocationOptimized instead.")] ObjectPrx ice_collocationOptimization(bool b); ObjectPrx ice_collocationOptimized(bool b); @@ -117,7 +117,7 @@ namespace Ice bool ice_isThreadPerConnection(); ObjectPrx ice_threadPerConnection(bool tpc); - [Obsolete("This method is deprecated, use ice_getConnection instead.")] + [Obsolete("This method is deprecated, use ice_getConnection instead.")] Connection ice_connection(); Connection ice_getConnection(); Connection ice_getCachedConnection(); @@ -141,41 +141,41 @@ namespace Ice } public Communicator ice_communicator() - { - return ice_getCommunicator(); - } + { + return ice_getCommunicator(); + } public Communicator ice_getCommunicator() - { - return _reference.getCommunicator(); - } + { + return _reference.getCommunicator(); + } - public override string ToString() - { - return _reference.ToString(); - } + public override string ToString() + { + return _reference.ToString(); + } - public string ice_toString() - { - return ToString(); - } + public string ice_toString() + { + return ToString(); + } public bool ice_isA(string id__) { return ice_isA(id__, null, false); } - public bool ice_isA(string id__, Context context__) + public bool ice_isA(string id__, Context context__) { - return ice_isA(id__, context__, true); - } + return ice_isA(id__, context__, true); + } private bool ice_isA(string id__, Context context__, bool explicitContext__) { - if(explicitContext__ && context__ == null) - { - context__ = emptyContext_; - } + if(explicitContext__ && context__ == null) + { + context__ = emptyContext_; + } int cnt__ = 0; while(true) @@ -203,17 +203,17 @@ namespace Ice ice_ping(null, false); } - public void ice_ping(Context context__) + public void ice_ping(Context context__) { ice_ping(context__, true); } private void ice_ping(Context context__, bool explicitContext__) { - if(explicitContext__ && context__ == null) - { - context__ = emptyContext_; - } + if(explicitContext__ && context__ == null) + { + context__ = emptyContext_; + } int cnt__ = 0; while(true) @@ -228,7 +228,7 @@ namespace Ice } catch(IceInternal.LocalExceptionWrapper ex__) { - cnt__ = handleExceptionWrapperRelaxed__(del__, ex__, cnt__); + cnt__ = handleExceptionWrapperRelaxed__(del__, ex__, cnt__); } catch(LocalException ex__) { @@ -242,17 +242,17 @@ namespace Ice return ice_ids(null, false); } - public string[] ice_ids(Context context__) + public string[] ice_ids(Context context__) { - return ice_ids(context__, true); - } + return ice_ids(context__, true); + } private string[] ice_ids(Context context__, bool explicitContext__) { - if(explicitContext__ && context__ == null) - { - context__ = emptyContext_; - } + if(explicitContext__ && context__ == null) + { + context__ = emptyContext_; + } int cnt__ = 0; while(true) { @@ -265,7 +265,7 @@ namespace Ice } catch(IceInternal.LocalExceptionWrapper ex__) { - cnt__ = handleExceptionWrapperRelaxed__(del__, ex__, cnt__); + cnt__ = handleExceptionWrapperRelaxed__(del__, ex__, cnt__); } catch(LocalException ex__) { @@ -279,17 +279,17 @@ namespace Ice return ice_id(null, false); } - public string ice_id(Context context__) + public string ice_id(Context context__) { - return ice_id(context__, true); - } + return ice_id(context__, true); + } private string ice_id(Context context__, bool explicitContext__) { - if(explicitContext__ && context__ == null) - { - context__ = emptyContext_; - } + if(explicitContext__ && context__ == null) + { + context__ = emptyContext_; + } int cnt__ = 0; while(true) { @@ -302,7 +302,7 @@ namespace Ice } catch(IceInternal.LocalExceptionWrapper ex__) { - cnt__ = handleExceptionWrapperRelaxed__(del__, ex__, cnt__); + cnt__ = handleExceptionWrapperRelaxed__(del__, ex__, cnt__); } catch(LocalException ex__) { @@ -316,19 +316,19 @@ namespace Ice return ice_invoke(operation, mode, inParams, out outParams, null, false); } - public bool ice_invoke(string operation, OperationMode mode, byte[] inParams, out byte[] outParams, + public bool ice_invoke(string operation, OperationMode mode, byte[] inParams, out byte[] outParams, Context context) { - return ice_invoke(operation, mode, inParams, out outParams, context, true); - } - + return ice_invoke(operation, mode, inParams, out outParams, context, true); + } + private bool ice_invoke(string operation, OperationMode mode, byte[] inParams, out byte[] outParams, - Context context, bool explicitContext) + Context context, bool explicitContext) { - if(explicitContext && context == null) - { - context = emptyContext_; - } + if(explicitContext && context == null) + { + context = emptyContext_; + } int cnt__ = 0; while(true) @@ -364,12 +364,12 @@ namespace Ice } public void ice_invoke_async(AMI_Object_ice_invoke cb, string operation, OperationMode mode, byte[] inParams, - Context context) + Context context) { - if(context == null) - { - context = emptyContext_; - } + if(context == null) + { + context = emptyContext_; + } checkTwowayOnly__("ice_invoke_async"); cb.invoke__(this, operation, mode, inParams, context); } @@ -381,10 +381,10 @@ namespace Ice public ObjectPrx ice_identity(Identity newIdentity) { - if(newIdentity.name.Equals("")) - { - throw new IllegalIdentityException(); - } + if(newIdentity.name.Equals("")) + { + throw new IllegalIdentityException(); + } if(newIdentity.Equals(_reference.getIdentity())) { return this; @@ -399,8 +399,8 @@ namespace Ice public ObjectPrx ice_newIdentity(Identity newIdentity) { - return ice_identity(newIdentity); - } + return ice_identity(newIdentity); + } public Context ice_getContext() { @@ -416,15 +416,15 @@ namespace Ice public ObjectPrx ice_newContext(Context newContext) { - return ice_context(newContext); - } + return ice_context(newContext); + } - public ObjectPrx ice_defaultContext() - { + public ObjectPrx ice_defaultContext() + { ObjectPrxHelperBase proxy = new ObjectPrxHelperBase(); proxy.setup(_reference.defaultContext()); return proxy; - } + } public string ice_getFacet() { @@ -452,8 +452,8 @@ namespace Ice public ObjectPrx ice_newFacet(string newFacet) { - return ice_facet(newFacet); - } + return ice_facet(newFacet); + } public string ice_getAdapterId() { @@ -481,8 +481,8 @@ namespace Ice public ObjectPrx ice_newAdapterId(string newAdapterId) { - return ice_adapterId(newAdapterId); - } + return ice_adapterId(newAdapterId); + } public Endpoint[] ice_getEndpoints() { @@ -498,8 +498,8 @@ namespace Ice else { ObjectPrxHelperBase proxy = new ObjectPrxHelperBase(); - ArrayList arr = ArrayList.Adapter(newEndpoints); - IceInternal.EndpointI[] endpts = (IceInternal.EndpointI[])arr.ToArray(typeof(IceInternal.EndpointI)); + ArrayList arr = ArrayList.Adapter(newEndpoints); + IceInternal.EndpointI[] endpts = (IceInternal.EndpointI[])arr.ToArray(typeof(IceInternal.EndpointI)); proxy.setup(_reference.changeEndpoints(endpts)); return proxy; } @@ -507,8 +507,8 @@ namespace Ice public ObjectPrx ice_newEndpoints(Endpoint[] newEndpoints) { - return ice_endpoints(newEndpoints); - } + return ice_endpoints(newEndpoints); + } public int ice_getLocatorCacheTimeout() { @@ -607,8 +607,8 @@ namespace Ice public Ice.RouterPrx ice_getRouter() { - IceInternal.RouterInfo ri = _reference.getRouterInfo(); - return ri != null ? ri.getRouter() : null; + IceInternal.RouterInfo ri = _reference.getRouterInfo(); + return ri != null ? ri.getRouter() : null; } public ObjectPrx ice_router(RouterPrx router) @@ -628,8 +628,8 @@ namespace Ice public Ice.LocatorPrx ice_getLocator() { - IceInternal.LocatorInfo li = _reference.getLocatorInfo(); - return li != null ? li.getLocator() : null; + IceInternal.LocatorInfo li = _reference.getLocatorInfo(); + return li != null ? li.getLocator() : null; } public ObjectPrx ice_locator(LocatorPrx locator) @@ -654,8 +654,8 @@ namespace Ice public ObjectPrx ice_collocationOptimization(bool b) { - return ice_collocationOptimized(b); - } + return ice_collocationOptimized(b); + } public ObjectPrx ice_collocationOptimized(bool b) { @@ -796,7 +796,7 @@ namespace Ice } } - public ObjectPrx ice_connectionId(string connectionId) + public ObjectPrx ice_connectionId(string connectionId) { IceInternal.Reference @ref = _reference.changeConnectionId(connectionId); if(@ref.Equals(_reference)) @@ -833,8 +833,8 @@ namespace Ice public Connection ice_connection() { - return ice_getConnection(); - } + return ice_getConnection(); + } public Connection ice_getConnection() { @@ -845,7 +845,7 @@ namespace Ice try { del__ = getDelegate__(); - bool comp; + bool comp; return del__.getConnection__(out comp); } catch(LocalException ex__) @@ -858,23 +858,23 @@ namespace Ice public Connection ice_getCachedConnection() { ObjectDel_ del__ = null; - lock(this) - { - del__ = _delegate; - } + lock(this) + { + del__ = _delegate; + } if(del__ != null) { try { - bool comp; + bool comp; return del__.getConnection__(out comp); } catch(CollocationOptimizationException) { } } - return null; + return null; } public override bool Equals(object r) @@ -927,27 +927,27 @@ namespace Ice _reference = @ref; - if(_reference.getCacheConnection()) - { - // - // The _delegate attribute is only used if "cache connection" - // is enabled. If it's not enabled, we don't keep track of the - // delegate -- a new delegate is created for each invocations. - // - - if(delegateD != null) - { - ObjectDelD_ @delegate = createDelegateD__(); - @delegate.copyFrom__(delegateD); - _delegate = @delegate; - } - else if(delegateM != null) - { - ObjectDelM_ @delegate = createDelegateM__(); - @delegate.copyFrom__(delegateM); - _delegate = @delegate; - } - } + if(_reference.getCacheConnection()) + { + // + // The _delegate attribute is only used if "cache connection" + // is enabled. If it's not enabled, we don't keep track of the + // delegate -- a new delegate is created for each invocations. + // + + if(delegateD != null) + { + ObjectDelD_ @delegate = createDelegateD__(); + @delegate.copyFrom__(delegateD); + _delegate = @delegate; + } + else if(delegateM != null) + { + ObjectDelM_ @delegate = createDelegateM__(); + @delegate.copyFrom__(delegateM); + _delegate = @delegate; + } + } } public int handleException__(ObjectDel_ @delegate, LocalException ex, int cnt) @@ -964,16 +964,16 @@ namespace Ice } IceInternal.ProxyFactory proxyFactory; - try - { - proxyFactory = _reference.getInstance().proxyFactory(); - } - catch(CommunicatorDestroyedException) - { - // - // The communicator is already destroyed, so we cannot - // retry. - // + try + { + proxyFactory = _reference.getInstance().proxyFactory(); + } + catch(CommunicatorDestroyedException) + { + // + // The communicator is already destroyed, so we cannot + // retry. + // throw ex; } @@ -1036,51 +1036,51 @@ namespace Ice { if(_delegate != null) { - return _delegate; - } - - ObjectDel_ @delegate = null; - if(_reference.getCollocationOptimization()) - { - ObjectAdapter adapter = _reference.getInstance().objectAdapterFactory().findObjectAdapter(this); - if(adapter != null) - { - ObjectDelD_ d = createDelegateD__(); - d.setup(_reference, adapter); - @delegate = d; - } - } - - if(@delegate == null) - { - ObjectDelM_ d = createDelegateM__(); - d.setup(_reference); - @delegate = d; - - // - // If this proxy is for a non-local object, and we are - // using a router, then add this proxy to the router info - // object. - // - IceInternal.RouterInfo ri = _reference.getRouterInfo(); - if(ri != null) - { - ri.addProxy(this); - } - } - - if(_reference.getCacheConnection()) - { - // - // The _delegate attribute is only used if "cache connection" - // is enabled. If it's not enabled, we don't keep track of the - // delegate -- a new delegate is created for each invocations. - // - _delegate = @delegate; - } - - return @delegate; - } + return _delegate; + } + + ObjectDel_ @delegate = null; + if(_reference.getCollocationOptimization()) + { + ObjectAdapter adapter = _reference.getInstance().objectAdapterFactory().findObjectAdapter(this); + if(adapter != null) + { + ObjectDelD_ d = createDelegateD__(); + d.setup(_reference, adapter); + @delegate = d; + } + } + + if(@delegate == null) + { + ObjectDelM_ d = createDelegateM__(); + d.setup(_reference); + @delegate = d; + + // + // If this proxy is for a non-local object, and we are + // using a router, then add this proxy to the router info + // object. + // + IceInternal.RouterInfo ri = _reference.getRouterInfo(); + if(ri != null) + { + ri.addProxy(this); + } + } + + if(_reference.getCacheConnection()) + { + // + // The _delegate attribute is only used if "cache connection" + // is enabled. If it's not enabled, we don't keep track of the + // delegate -- a new delegate is created for each invocations. + // + _delegate = @delegate; + } + + return @delegate; + } } protected virtual ObjectDelM_ createDelegateM__() @@ -1109,7 +1109,7 @@ namespace Ice _reference = @ref; } - protected static Ice.Context emptyContext_ = new Ice.Context(); + protected static Ice.Context emptyContext_ = new Ice.Context(); private IceInternal.Reference _reference; private ObjectDel_ _delegate; } @@ -1189,12 +1189,12 @@ namespace Ice public interface ObjectDel_ { - bool ice_isA(string id, Ice.Context context); - void ice_ping(Ice.Context context); - string[] ice_ids(Ice.Context context); - string ice_id(Ice.Context context); - bool ice_invoke(string operation, Ice.OperationMode mode, byte[] inParams, out byte[] outParams, - Ice.Context context); + bool ice_isA(string id, Ice.Context context); + void ice_ping(Ice.Context context); + string[] ice_ids(Ice.Context context); + string ice_id(Ice.Context context); + bool ice_invoke(string operation, Ice.OperationMode mode, byte[] inParams, out byte[] outParams, + Ice.Context context); ConnectionI getConnection__(out bool compress); } @@ -1218,7 +1218,7 @@ namespace Ice } } } - + public virtual void ice_ping(Ice.Context context__) { Current current__ = new Current(); @@ -1237,7 +1237,7 @@ namespace Ice } } } - + public virtual string[] ice_ids(Ice.Context context__) { Current current__ = new Current(); @@ -1255,7 +1255,7 @@ namespace Ice } } } - + public virtual string ice_id(Ice.Context context__) { Current current__ = new Current(); @@ -1273,13 +1273,13 @@ namespace Ice } } } - + public virtual bool ice_invoke(string operation, Ice.OperationMode mode, byte[] inParams, out byte[] outParams, Ice.Context context) { throw new CollocationOptimizationException(); } - + public virtual ConnectionI getConnection__(out bool compress) { throw new CollocationOptimizationException(); @@ -1294,24 +1294,24 @@ namespace Ice // No need to synchronize "from", as the delegate is immutable // after creation. // - + // // No need to synchronize, as this operation is only called // upon initialization. // - + Debug.Assert(reference__ == null); Debug.Assert(adapter__ == null); - + reference__ = from.reference__; adapter__ = from.adapter__; } - + protected internal IceInternal.Reference reference__; protected internal Ice.ObjectAdapter adapter__; - + protected internal void initCurrent__(ref Current current, string op, Ice.OperationMode mode, - Ice.Context context) + Ice.Context context) { current.adapter = adapter__; current.id = reference__.getIdentity(); @@ -1319,48 +1319,48 @@ namespace Ice current.operation = op; current.mode = mode; - if(context != null) - { - current.ctx = context; - } - else - { - // - // Implicit context - // - ImplicitContextI implicitContext = - reference__.getInstance().getImplicitContext(); - - Context prxContext = reference__.getContext(); - - if(implicitContext == null) - { - current.ctx = (Context)prxContext.Clone(); - } - else - { - current.ctx = implicitContext.combine(prxContext); - } - } - - current.requestId = -1; - } - + if(context != null) + { + current.ctx = context; + } + else + { + // + // Implicit context + // + ImplicitContextI implicitContext = + reference__.getInstance().getImplicitContext(); + + Context prxContext = reference__.getContext(); + + if(implicitContext == null) + { + current.ctx = (Context)prxContext.Clone(); + } + else + { + current.ctx = implicitContext.combine(prxContext); + } + } + + current.requestId = -1; + } + public virtual void setup(IceInternal.Reference rf, Ice.ObjectAdapter adapter) { // // No need to synchronize, as this operation is only called // upon initialization. // - + Debug.Assert(reference__ == null); Debug.Assert(adapter__ == null); - + reference__ = rf; adapter__ = adapter; } } - + public class ObjectDelM_ : ObjectDel_ { public virtual bool ice_isA(string id__, Ice.Context context__) @@ -1368,156 +1368,156 @@ namespace Ice IceInternal.Outgoing og__ = getOutgoing("ice_isA", OperationMode.Nonmutating, context__); try { - try - { - IceInternal.BasicStream os__ = og__.ostr(); - os__.writeString(id__); - } - catch(LocalException ex__) - { - og__.abort(ex__); - } - bool ok__ = og__.invoke(); - try - { - IceInternal.BasicStream is__ = og__.istr(); - if(!ok__) - { - try - { - is__.throwException(); - } - catch(UserException) - { - throw new UnknownUserException(); - } - } - return is__.readBool(); - } - catch(LocalException ex__) - { - throw new IceInternal.LocalExceptionWrapper(ex__, false); - } + try + { + IceInternal.BasicStream os__ = og__.ostr(); + os__.writeString(id__); + } + catch(LocalException ex__) + { + og__.abort(ex__); + } + bool ok__ = og__.invoke(); + try + { + IceInternal.BasicStream is__ = og__.istr(); + if(!ok__) + { + try + { + is__.throwException(); + } + catch(UserException) + { + throw new UnknownUserException(); + } + } + return is__.readBool(); + } + catch(LocalException ex__) + { + throw new IceInternal.LocalExceptionWrapper(ex__, false); + } } finally { reclaimOutgoing(og__); } } - + public virtual void ice_ping(Ice.Context context__) { IceInternal.Outgoing og__ = getOutgoing("ice_ping", OperationMode.Nonmutating, context__); try { - bool ok__ = og__.invoke(); - try - { - IceInternal.BasicStream is__ = og__.istr(); - if(!ok__) - { - try - { - is__.throwException(); - } - catch(UserException) - { - throw new UnknownUserException(); - } - } - } - catch(LocalException ex__) - { - throw new IceInternal.LocalExceptionWrapper(ex__, false); - } + bool ok__ = og__.invoke(); + try + { + IceInternal.BasicStream is__ = og__.istr(); + if(!ok__) + { + try + { + is__.throwException(); + } + catch(UserException) + { + throw new UnknownUserException(); + } + } + } + catch(LocalException ex__) + { + throw new IceInternal.LocalExceptionWrapper(ex__, false); + } } finally { reclaimOutgoing(og__); } } - + public virtual string[] ice_ids(Ice.Context context__) { IceInternal.Outgoing og__ = getOutgoing("ice_ids", OperationMode.Nonmutating, context__); try { - bool ok__ = og__.invoke(); - try - { - IceInternal.BasicStream is__ = og__.istr(); - if(!ok__) - { - try - { - is__.throwException(); - } - catch(UserException) - { - throw new UnknownUserException(); - } - } - return is__.readStringSeq(); - } - catch(LocalException ex__) - { - throw new IceInternal.LocalExceptionWrapper(ex__, false); - } + bool ok__ = og__.invoke(); + try + { + IceInternal.BasicStream is__ = og__.istr(); + if(!ok__) + { + try + { + is__.throwException(); + } + catch(UserException) + { + throw new UnknownUserException(); + } + } + return is__.readStringSeq(); + } + catch(LocalException ex__) + { + throw new IceInternal.LocalExceptionWrapper(ex__, false); + } } finally { reclaimOutgoing(og__); } } - + public virtual string ice_id(Ice.Context context__) { IceInternal.Outgoing og__ = getOutgoing("ice_id", OperationMode.Nonmutating, context__); try { - bool ok__ = og__.invoke(); - try - { - IceInternal.BasicStream is__ = og__.istr(); - if(!ok__) - { - try - { - is__.throwException(); - } - catch(UserException) - { - throw new UnknownUserException(); - } - } - return is__.readString(); - } - catch(LocalException ex__) - { - throw new IceInternal.LocalExceptionWrapper(ex__, false); - } + bool ok__ = og__.invoke(); + try + { + IceInternal.BasicStream is__ = og__.istr(); + if(!ok__) + { + try + { + is__.throwException(); + } + catch(UserException) + { + throw new UnknownUserException(); + } + } + return is__.readString(); + } + catch(LocalException ex__) + { + throw new IceInternal.LocalExceptionWrapper(ex__, false); + } } finally { reclaimOutgoing(og__); } } - + public virtual bool ice_invoke(string operation, OperationMode mode, byte[] inParams, out byte[] outParams, Ice.Context context__) { IceInternal.Outgoing og__ = getOutgoing(operation, mode, context__); try { - try - { - IceInternal.BasicStream os__ = og__.ostr(); - os__.writeBlob(inParams); - } - catch(LocalException ex__) - { - og__.abort(ex__); - } + try + { + IceInternal.BasicStream os__ = og__.ostr(); + os__.writeBlob(inParams); + } + catch(LocalException ex__) + { + og__.abort(ex__); + } bool ok = og__.invoke(); outParams = null; if(reference__.getMode() == IceInternal.Reference.Mode.ModeTwoway) @@ -1540,13 +1540,13 @@ namespace Ice reclaimOutgoing(og__); } } - + public virtual ConnectionI getConnection__(out bool compress) { - compress = compress__; + compress = compress__; return connection__; } - + // // Only for use by ObjectPrx // @@ -1556,20 +1556,20 @@ namespace Ice // No need to synchronize "from", as the delegate is immutable // after creation. // - + // // No need to synchronize, as this operation is only called // upon initialization. // - + Debug.Assert(reference__ == null); Debug.Assert(connection__ == null); - + reference__ = from.reference__; connection__ = from.connection__; - compress__ = from.compress__; + compress__ = from.compress__; } - + protected IceInternal.Reference reference__; protected ConnectionI connection__; protected bool compress__; @@ -1580,22 +1580,22 @@ namespace Ice // No need to synchronize, as this operation is only called // upon initialization. // - + Debug.Assert(reference__ == null); Debug.Assert(connection__ == null); - + reference__ = rf; connection__ = reference__.getConnection(out compress__); } - + protected IceInternal.Outgoing getOutgoing(string operation, OperationMode mode, Ice.Context context) { - return connection__.getOutgoing(reference__, operation, mode, context, compress__); + return connection__.getOutgoing(reference__, operation, mode, context, compress__); } protected void reclaimOutgoing(IceInternal.Outgoing outg) { - connection__.reclaimOutgoing(outg); + connection__.reclaimOutgoing(outg); } } } |