diff options
author | Bernard Normier <bernard@zeroc.com> | 2016-11-10 14:07:23 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2016-11-10 14:07:23 -0500 |
commit | 4e06be13bf710ec95f5d207c59b90a0584b857b4 (patch) | |
tree | 5bff3948e1c2db2809ac03ef8f4aa8ba14d03c3f /csharp/src | |
parent | Visual Studio settings for C++/C# languages (diff) | |
download | ice-4e06be13bf710ec95f5d207c59b90a0584b857b4.tar.bz2 ice-4e06be13bf710ec95f5d207c59b90a0584b857b4.tar.xz ice-4e06be13bf710ec95f5d207c59b90a0584b857b4.zip |
Replaced all double-underscores in C#
Diffstat (limited to 'csharp/src')
32 files changed, 845 insertions, 845 deletions
diff --git a/csharp/src/Glacier2/Application.cs b/csharp/src/Glacier2/Application.cs index dd7caf4f806..273ba6b5372 100644 --- a/csharp/src/Glacier2/Application.cs +++ b/csharp/src/Glacier2/Application.cs @@ -190,7 +190,7 @@ public abstract class Application : Ice.Application throw new SessionNotExistException(); } - lock(mutex__) + lock(iceMutex) { if(_adapter == null) { @@ -235,21 +235,21 @@ public abstract class Application : Ice.Application // Reset internal state variables from Ice.Application. The // remainder are reset at the end of this method. // - callbackInProgress__ = false; - destroyed__ = false; - interrupted__ = false; + iceCallbackInProgress = false; + iceDestroyed = false; + iceInterrupted = false; bool restart = false; status = 0; try { - communicator__ = Ice.Util.initialize(ref args, initData); + iceCommunicator = Ice.Util.initialize(ref args, initData); _router = Glacier2.RouterPrxHelper.uncheckedCast(communicator().getDefaultRouter()); if(_router == null) { - Ice.Util.getProcessLogger().error(appName__ + ": no Glacier2 router configured"); + Ice.Util.getProcessLogger().error(iceAppName + ": no Glacier2 router configured"); status = 1; } else @@ -257,7 +257,7 @@ public abstract class Application : Ice.Application // // The default is to destroy when a signal is received. // - if(signalPolicy__ == Ice.SignalPolicy.HandleSignals) + if(iceSignalPolicy == Ice.SignalPolicy.HandleSignals) { destroyOnInterrupt(); } @@ -353,28 +353,28 @@ public abstract class Application : Ice.Application // (post-run), it would not make sense to release a held // signal to run shutdown or destroy. // - if(signalPolicy__ == Ice.SignalPolicy.HandleSignals) + if(iceSignalPolicy == Ice.SignalPolicy.HandleSignals) { ignoreInterrupt(); } - lock(mutex__) + lock(iceMutex) { - while(callbackInProgress__) + while(iceCallbackInProgress) { - System.Threading.Monitor.Wait(mutex__); + System.Threading.Monitor.Wait(iceMutex); } - if(destroyed__) + if(iceDestroyed) { - communicator__ = null; + iceCommunicator = null; } else { - destroyed__ = true; + iceDestroyed = true; // - // And communicator__ != null, meaning will be - // destroyed next, destroyed__ = true also ensures that + // And iceCommunicator != null, meaning will be + // destroyed next, iceDestroyed = true also ensures that // any remaining callback won't do anything // } @@ -409,11 +409,11 @@ public abstract class Application : Ice.Application _router = null; } - if(communicator__ != null) + if(iceCommunicator != null) { try { - communicator__.destroy(); + iceCommunicator.destroy(); } catch(Ice.LocalException ex) { @@ -425,12 +425,12 @@ public abstract class Application : Ice.Application Ice.Util.getProcessLogger().error("unknown exception:\n" + ex.ToString()); status = 1; } - communicator__ = null; + iceCommunicator = null; } // // Reset internal state. We cannot reset the Application state - // here, since destroyed__ must remain true until we re-run + // here, since iceDestroyed must remain true until we re-run // this method. // _adapter = null; diff --git a/csharp/src/Ice/Application.cs b/csharp/src/Ice/Application.cs index b41ba4e8996..99ce8f16230 100644 --- a/csharp/src/Ice/Application.cs +++ b/csharp/src/Ice/Application.cs @@ -95,7 +95,7 @@ namespace Ice /// <param name="signalPolicy">Determines how to respond to signals.</param> public Application(SignalPolicy signalPolicy) { - signalPolicy__ = signalPolicy; + iceSignalPolicy = signalPolicy; } /// <summary> @@ -135,7 +135,7 @@ namespace Ice { if(Util.getProcessLogger() is ConsoleLoggerI) { - Util.setProcessLogger(new ConsoleLoggerI(appName__)); + Util.setProcessLogger(new ConsoleLoggerI(iceAppName)); } InitializationData initData = new InitializationData(); @@ -178,10 +178,10 @@ namespace Ice { if(Util.getProcessLogger() is ConsoleLoggerI) { - Util.setProcessLogger(new ConsoleLoggerI(appName__)); + Util.setProcessLogger(new ConsoleLoggerI(iceAppName)); } - if(communicator__ != null) + if(iceCommunicator != null) { Util.getProcessLogger().error("only one instance of the Application class can be used"); return 1; @@ -214,13 +214,13 @@ namespace Ice Util.getProcessLogger().error("unknown exception:\n" + ex); return 1; } - appName__ = initData.properties.getPropertyWithDefault("Ice.ProgramName", appName__); + iceAppName = initData.properties.getPropertyWithDefault("Ice.ProgramName", iceAppName); - nohup__ = initData.properties.getPropertyAsInt("Ice.Nohup") > 0; + iceNohup = initData.properties.getPropertyAsInt("Ice.Nohup") > 0; _application = this; int status; - if(signalPolicy__ == SignalPolicy.HandleSignals) + if(iceSignalPolicy == SignalPolicy.HandleSignals) { if(IceInternal.AssemblyUtil.platform_ == IceInternal.AssemblyUtil.Platform.Windows) { @@ -254,7 +254,7 @@ namespace Ice /// <returns>The name of the application.</returns> public static string appName() { - return appName__; + return iceAppName; } /// <summary> @@ -265,7 +265,7 @@ namespace Ice /// <returns>The communicator for the application.</returns> public static Communicator communicator() { - return communicator__; + return iceCommunicator; } /// <summary> @@ -274,14 +274,14 @@ namespace Ice /// </summary> public static void destroyOnInterrupt() { - if(signalPolicy__ == SignalPolicy.HandleSignals) + if(iceSignalPolicy == SignalPolicy.HandleSignals) { - lock(mutex__) + lock(iceMutex) { if(_callback == _holdCallback) { - released__ = true; - System.Threading.Monitor.Pulse(mutex__); + iceReleased = true; + System.Threading.Monitor.Pulse(iceMutex); } _callback = _destroyCallback; } @@ -298,14 +298,14 @@ namespace Ice /// </summary> public static void shutdownOnInterrupt() { - if(signalPolicy__ == SignalPolicy.HandleSignals) + if(iceSignalPolicy == SignalPolicy.HandleSignals) { - lock(mutex__) + lock(iceMutex) { if(_callback == _holdCallback) { - released__ = true; - System.Threading.Monitor.Pulse(mutex__); + iceReleased = true; + System.Threading.Monitor.Pulse(iceMutex); } _callback = _shutdownCallback; } @@ -322,14 +322,14 @@ namespace Ice /// </summary> public static void ignoreInterrupt() { - if(signalPolicy__ == SignalPolicy.HandleSignals) + if(iceSignalPolicy == SignalPolicy.HandleSignals) { - lock(mutex__) + lock(iceMutex) { if(_callback == _holdCallback) { - released__ = true; - System.Threading.Monitor.Pulse(mutex__); + iceReleased = true; + System.Threading.Monitor.Pulse(iceMutex); } _callback = null; } @@ -347,14 +347,14 @@ namespace Ice /// </summary> public static void callbackOnInterrupt() { - if(signalPolicy__ == SignalPolicy.HandleSignals) + if(iceSignalPolicy == SignalPolicy.HandleSignals) { - lock(mutex__) + lock(iceMutex) { if(_callback == _holdCallback) { - released__ = true; - System.Threading.Monitor.Pulse(mutex__); + iceReleased = true; + System.Threading.Monitor.Pulse(iceMutex); } _callback = _userCallback; } @@ -371,14 +371,14 @@ namespace Ice /// </summary> public static void holdInterrupt() { - if(signalPolicy__ == SignalPolicy.HandleSignals) + if(iceSignalPolicy == SignalPolicy.HandleSignals) { - lock(mutex__) + lock(iceMutex) { if(_callback != _holdCallback) { _previousCallback = _callback; - released__ = false; + iceReleased = false; _callback = _holdCallback; } // else, we were already holding signals @@ -397,22 +397,22 @@ namespace Ice /// </summary> public static void releaseInterrupt() { - if(signalPolicy__ == SignalPolicy.HandleSignals) + if(iceSignalPolicy == SignalPolicy.HandleSignals) { - lock(mutex__) + lock(iceMutex) { if(_callback == _holdCallback) { // // Note that it's very possible no signal is held; // in this case the callback is just replaced and - // setting released__ to true and signalling this + // setting iceReleased to true and signalling this // will do no harm. // - released__ = true; + iceReleased = true; _callback = _previousCallback; - System.Threading.Monitor.Pulse(mutex__); + System.Threading.Monitor.Pulse(iceMutex); } // Else nothing to release. } @@ -431,9 +431,9 @@ namespace Ice /// <returns>True if a signal caused the communicator to shut down; false otherwise.</returns> public static bool interrupted() { - lock(mutex__) + lock(iceMutex) { - return interrupted__; + return iceInterrupted; } } @@ -453,13 +453,13 @@ namespace Ice Util.setProcessLogger(new ConsoleLoggerI(initData.properties.getProperty("Ice.ProgramName"))); } - communicator__ = Util.initialize(ref args, initData); - destroyed__ = false; + iceCommunicator = Util.initialize(ref args, initData); + iceDestroyed = false; // // The default is to destroy when a signal is received. // - if(signalPolicy__ == SignalPolicy.HandleSignals) + if(iceSignalPolicy == SignalPolicy.HandleSignals) { destroyOnInterrupt(); } @@ -482,38 +482,38 @@ namespace Ice // (post-run), it would not make sense to release a held // signal to run shutdown or destroy. // - if(signalPolicy__ == SignalPolicy.HandleSignals) + if(iceSignalPolicy == SignalPolicy.HandleSignals) { ignoreInterrupt(); } - lock(mutex__) + lock(iceMutex) { - while(callbackInProgress__) + while(iceCallbackInProgress) { - System.Threading.Monitor.Wait(mutex__); + System.Threading.Monitor.Wait(iceMutex); } - if(destroyed__) + if(iceDestroyed) { - communicator__ = null; + iceCommunicator = null; } else { - destroyed__ = true; + iceDestroyed = true; // - // communicator__ != null means that it will be destroyed - // next; destroyed__ == true ensures that any + // iceCommunicator != null means that it will be destroyed + // next; iceDestroyed == true ensures that any // remaining callback won't do anything // } _application = null; } - if(communicator__ != null) + if(iceCommunicator != null) { try { - communicator__.destroy(); + iceCommunicator.destroy(); } catch(Ice.Exception ex) { @@ -525,7 +525,7 @@ namespace Ice Util.getProcessLogger().error("unknown exception:\n" + ex); status = 1; } - communicator__ = null; + iceCommunicator = null; } return status; @@ -538,7 +538,7 @@ namespace Ice { Callback callback; - lock(mutex__) + lock(iceMutex) { callback = _callback; } @@ -562,14 +562,14 @@ namespace Ice private static void holdInterruptCallback(int sig) { Callback callback = null; - lock(mutex__) + lock(iceMutex) { - while(!released__) + while(!iceReleased) { - System.Threading.Monitor.Wait(mutex__); + System.Threading.Monitor.Wait(iceMutex); } - if(destroyed__) + if(iceDestroyed) { // // Being destroyed by main thread @@ -591,86 +591,86 @@ namespace Ice // private static void destroyOnInterruptCallback(int sig) { - lock(mutex__) + lock(iceMutex) { - if(destroyed__) + if(iceDestroyed) { // // Being destroyed by main thread // return; } - if(nohup__ && sig == SIGHUP) + if(iceNohup && sig == SIGHUP) { return; } - Debug.Assert(!callbackInProgress__); - callbackInProgress__ = true; - interrupted__ = true; - destroyed__ = true; + Debug.Assert(!iceCallbackInProgress); + iceCallbackInProgress = true; + iceInterrupted = true; + iceDestroyed = true; } try { - Debug.Assert(communicator__ != null); - communicator__.destroy(); + Debug.Assert(iceCommunicator != null); + iceCommunicator.destroy(); } catch(System.Exception ex) { Util.getProcessLogger().error("(while destroying in response to signal " + sig + "):\n" + ex); } - lock(mutex__) + lock(iceMutex) { - callbackInProgress__ = false; - System.Threading.Monitor.Pulse(mutex__); + iceCallbackInProgress = false; + System.Threading.Monitor.Pulse(iceMutex); } } private static void shutdownOnInterruptCallback(int sig) { - lock(mutex__) + lock(iceMutex) { - if(destroyed__) + if(iceDestroyed) { // // Being destroyed by main thread // return; } - if(nohup__ && sig == SIGHUP) + if(iceNohup && sig == SIGHUP) { return; } - Debug.Assert(!callbackInProgress__); - callbackInProgress__ = true; - interrupted__ = true; + Debug.Assert(!iceCallbackInProgress); + iceCallbackInProgress = true; + iceInterrupted = true; } try { - Debug.Assert(communicator__ != null); - communicator__.shutdown(); + Debug.Assert(iceCommunicator != null); + iceCommunicator.shutdown(); } catch(System.Exception ex) { Util.getProcessLogger().error("(while shutting down in response to signal " + sig + "):\n" + ex); } - lock(mutex__) + lock(iceMutex) { - callbackInProgress__ = false; - System.Threading.Monitor.Pulse(mutex__); + iceCallbackInProgress = false; + System.Threading.Monitor.Pulse(iceMutex); } } private static void userCallbackOnInterruptCallback(int sig) { - lock(mutex__) + lock(iceMutex) { - if(destroyed__) + if(iceDestroyed) { // // Being destroyed by main thread @@ -679,9 +679,9 @@ namespace Ice } // For SIGHUP the user callback is always called. It can // decide what to do. - Debug.Assert(!callbackInProgress__); - callbackInProgress__ = true; - interrupted__ = true; + Debug.Assert(!iceCallbackInProgress); + iceCallbackInProgress = true; + iceInterrupted = true; } try @@ -694,20 +694,20 @@ namespace Ice Util.getProcessLogger().error("(while interrupting in response to signal " + sig + "):\n" + ex); } - lock(mutex__) + lock(iceMutex) { - callbackInProgress__ = false; - System.Threading.Monitor.Pulse(mutex__); + iceCallbackInProgress = false; + System.Threading.Monitor.Pulse(iceMutex); } } - protected static object mutex__ = new object(); - protected static bool callbackInProgress__ = false; - protected static bool destroyed__ = false; - protected static bool interrupted__ = false; - protected static bool released__ = false; - protected static bool nohup__ = false; - protected static SignalPolicy signalPolicy__ = SignalPolicy.HandleSignals; + protected static object iceMutex = new object(); + protected static bool iceCallbackInProgress = false; + protected static bool iceDestroyed = false; + protected static bool iceInterrupted = false; + protected static bool iceReleased = false; + protected static bool iceNohup = false; + protected static SignalPolicy iceSignalPolicy = SignalPolicy.HandleSignals; private delegate void Callback(int sig); private static readonly Callback _destroyCallback = new Callback(destroyOnInterruptCallback); @@ -722,8 +722,8 @@ namespace Ice // We use FriendlyName instead of Process.GetCurrentProcess().ProcessName because the latter // is terribly slow. (It takes around 1 second!) // - protected static string appName__ = AppDomain.CurrentDomain.FriendlyName; - protected static Communicator communicator__; + protected static string iceAppName = AppDomain.CurrentDomain.FriendlyName; + protected static Communicator iceCommunicator; private static Application _application; private static int SIGHUP; diff --git a/csharp/src/Ice/Collections.cs b/csharp/src/Ice/Collections.cs index 668123b1cd9..dd87ad517d4 100644 --- a/csharp/src/Ice/Collections.cs +++ b/csharp/src/Ice/Collections.cs @@ -161,11 +161,11 @@ namespace IceUtilInternal public static void Shuffle<T>(ref List<T> l) { - lock(rand_) + lock(_rand) { for(int j = 0; j < l.Count - 1; ++j) { - int r = rand_.Next(l.Count - j) + j; + int r = _rand.Next(l.Count - j) + j; Debug.Assert(r >= j && r < l.Count); if(r != j) { @@ -234,6 +234,6 @@ namespace IceUtilInternal } } - private static System.Random rand_ = new System.Random(unchecked((int)System.DateTime.Now.Ticks)); + private static System.Random _rand = new System.Random(unchecked((int)System.DateTime.Now.Ticks)); } } diff --git a/csharp/src/Ice/CommunicatorI.cs b/csharp/src/Ice/CommunicatorI.cs index d4f54bdca1d..29a1196573b 100644 --- a/csharp/src/Ice/CommunicatorI.cs +++ b/csharp/src/Ice/CommunicatorI.cs @@ -20,42 +20,42 @@ namespace Ice { public void destroy() { - instance_.destroy(); + _instance.destroy(); } public void shutdown() { - instance_.objectAdapterFactory().shutdown(); + _instance.objectAdapterFactory().shutdown(); } public void waitForShutdown() { - instance_.objectAdapterFactory().waitForShutdown(); + _instance.objectAdapterFactory().waitForShutdown(); } public bool isShutdown() { - return instance_.objectAdapterFactory().isShutdown(); + return _instance.objectAdapterFactory().isShutdown(); } public Ice.ObjectPrx stringToProxy(string s) { - return instance_.proxyFactory().stringToProxy(s); + return _instance.proxyFactory().stringToProxy(s); } public string proxyToString(Ice.ObjectPrx proxy) { - return instance_.proxyFactory().proxyToString(proxy); + return _instance.proxyFactory().proxyToString(proxy); } public Ice.ObjectPrx propertyToProxy(string s) { - return instance_.proxyFactory().propertyToProxy(s); + return _instance.proxyFactory().propertyToProxy(s); } public Dictionary<string, string> proxyToProperty(Ice.ObjectPrx proxy, string prefix) { - return instance_.proxyFactory().proxyToProperty(proxy, prefix); + return _instance.proxyFactory().proxyToProperty(proxy, prefix); } public Ice.Identity stringToIdentity(string s) @@ -65,12 +65,12 @@ namespace Ice public string identityToString(Ice.Identity ident) { - return Ice.Util.identityToString(ident, instance_.toStringMode()); + return Ice.Util.identityToString(ident, _instance.toStringMode()); } public ObjectAdapter createObjectAdapter(string name) { - return instance_.objectAdapterFactory().createObjectAdapter(name, null); + return _instance.objectAdapterFactory().createObjectAdapter(name, null); } public ObjectAdapter createObjectAdapterWithEndpoints(string name, string endpoints) @@ -81,7 +81,7 @@ namespace Ice } getProperties().setProperty(name + ".Endpoints", endpoints); - return instance_.objectAdapterFactory().createObjectAdapter(name, null); + return _instance.objectAdapterFactory().createObjectAdapter(name, null); } public ObjectAdapter createObjectAdapterWithRouter(string name, RouterPrx router) @@ -100,67 +100,67 @@ namespace Ice getProperties().setProperty(entry.Key, entry.Value); } - return instance_.objectAdapterFactory().createObjectAdapter(name, router); + return _instance.objectAdapterFactory().createObjectAdapter(name, router); } public void addObjectFactory(ObjectFactory factory, string id) { - instance_.addObjectFactory(factory, id); + _instance.addObjectFactory(factory, id); } public ObjectFactory findObjectFactory(string id) { - return instance_.findObjectFactory(id); + return _instance.findObjectFactory(id); } public ValueFactoryManager getValueFactoryManager() { - return instance_.initializationData().valueFactoryManager; + return _instance.initializationData().valueFactoryManager; } public Properties getProperties() { - return instance_.initializationData().properties; + return _instance.initializationData().properties; } public Logger getLogger() { - return instance_.initializationData().logger; + return _instance.initializationData().logger; } public Ice.Instrumentation.CommunicatorObserver getObserver() { - return instance_.initializationData().observer; + return _instance.initializationData().observer; } public RouterPrx getDefaultRouter() { - return instance_.referenceFactory().getDefaultRouter(); + return _instance.referenceFactory().getDefaultRouter(); } public void setDefaultRouter(RouterPrx router) { - instance_.setDefaultRouter(router); + _instance.setDefaultRouter(router); } public LocatorPrx getDefaultLocator() { - return instance_.referenceFactory().getDefaultLocator(); + return _instance.referenceFactory().getDefaultLocator(); } public void setDefaultLocator(LocatorPrx locator) { - instance_.setDefaultLocator(locator); + _instance.setDefaultLocator(locator); } public ImplicitContext getImplicitContext() { - return instance_.getImplicitContext(); + return _instance.getImplicitContext(); } public PluginManager getPluginManager() { - return instance_.pluginManager(); + return _instance.pluginManager(); } public void flushBatchRequests() @@ -172,8 +172,8 @@ namespace Ice CancellationToken cancel = new CancellationToken()) { var completed = new FlushBatchTaskCompletionCallback(progress, cancel); - var outgoing = new CommunicatorFlushBatchAsync(instance_, completed); - outgoing.invoke(__flushBatchRequests_name); + var outgoing = new CommunicatorFlushBatchAsync(_instance, completed); + outgoing.invoke(_flushBatchRequests_name); return completed.Task; } @@ -182,7 +182,7 @@ namespace Ice return begin_flushBatchRequests(null, null); } - private const string __flushBatchRequests_name = "flushBatchRequests"; + private const string _flushBatchRequests_name = "flushBatchRequests"; private class CommunicatorFlushBatchCompletionCallback : AsyncResultCompletionCallback { @@ -216,9 +216,9 @@ namespace Ice public AsyncResult begin_flushBatchRequests(AsyncCallback cb, object cookie) { - var result = new CommunicatorFlushBatchCompletionCallback(this, instance_, __flushBatchRequests_name, cookie, cb); - var outgoing = new CommunicatorFlushBatchAsync(instance_, result); - outgoing.invoke(__flushBatchRequests_name); + var result = new CommunicatorFlushBatchCompletionCallback(this, _instance, _flushBatchRequests_name, cookie, cb); + var outgoing = new CommunicatorFlushBatchAsync(_instance, result); + outgoing.invoke(_flushBatchRequests_name); return result; } @@ -226,42 +226,42 @@ namespace Ice { if(result != null && result.getCommunicator() != this) { - const string msg = "Communicator for call to end_" + __flushBatchRequests_name + + const string msg = "Communicator for call to end_" + _flushBatchRequests_name + " does not match communicator that was used to call corresponding begin_" + - __flushBatchRequests_name + " method"; + _flushBatchRequests_name + " method"; throw new ArgumentException(msg); } - AsyncResultI.check(result, __flushBatchRequests_name).wait(); + AsyncResultI.check(result, _flushBatchRequests_name).wait(); } public ObjectPrx createAdmin(ObjectAdapter adminAdapter, Identity adminIdentity) { - return instance_.createAdmin(adminAdapter, adminIdentity); + return _instance.createAdmin(adminAdapter, adminIdentity); } public ObjectPrx getAdmin() { - return instance_.getAdmin(); + return _instance.getAdmin(); } public void addAdminFacet(Ice.Object servant, string facet) { - instance_.addAdminFacet(servant, facet); + _instance.addAdminFacet(servant, facet); } public Ice.Object removeAdminFacet(string facet) { - return instance_.removeAdminFacet(facet); + return _instance.removeAdminFacet(facet); } public Ice.Object findAdminFacet(string facet) { - return instance_.findAdminFacet(facet); + return _instance.findAdminFacet(facet); } public Dictionary<string, Ice.Object> findAllAdminFacets() { - return instance_.findAllAdminFacets(); + return _instance.findAllAdminFacets(); } public void Dispose() @@ -271,7 +271,7 @@ namespace Ice internal CommunicatorI(InitializationData initData) { - instance_ = new IceInternal.Instance(this, initData); + _instance = new IceInternal.Instance(this, initData); } /* @@ -281,7 +281,7 @@ namespace Ice { if(!System.Environment.HasShutdownStarted) { - instance_.initializationData().logger.warning( + _instance.initializationData().logger.warning( "Ice::Communicator::destroy() has not been called"); } else @@ -300,11 +300,11 @@ namespace Ice { try { - instance_.finishSetup(ref args, this); + _instance.finishSetup(ref args, this); } catch(System.Exception) { - instance_.destroy(); + _instance.destroy(); throw; } } @@ -314,9 +314,9 @@ namespace Ice // internal IceInternal.Instance getInstance() { - return instance_; + return _instance; } - private IceInternal.Instance instance_; + private IceInternal.Instance _instance; } } diff --git a/csharp/src/Ice/ConnectRequestHandler.cs b/csharp/src/Ice/ConnectRequestHandler.cs index d53aef9513a..76fadf29fd8 100644 --- a/csharp/src/Ice/ConnectRequestHandler.cs +++ b/csharp/src/Ice/ConnectRequestHandler.cs @@ -281,7 +281,7 @@ namespace IceInternal _requestHandler = new ConnectionRequestHandler(_reference, _connection, _compress); foreach(Ice.ObjectPrxHelperBase prx in _proxies) { - prx.updateRequestHandler__(this, _requestHandler); + prx.iceUpdateRequestHandler(this, _requestHandler); } } diff --git a/csharp/src/Ice/ConnectionI.cs b/csharp/src/Ice/ConnectionI.cs index 5e0ab3afbf3..4475bb107a2 100644 --- a/csharp/src/Ice/ConnectionI.cs +++ b/csharp/src/Ice/ConnectionI.cs @@ -520,16 +520,16 @@ namespace Ice { var completed = new FlushBatchTaskCompletionCallback(progress, cancel); var outgoing = new ConnectionFlushBatchAsync(this, _instance, completed); - outgoing.invoke(__flushBatchRequests_name); + outgoing.invoke(_flushBatchRequests_name); return completed.Task; } public AsyncResult begin_flushBatchRequests(AsyncCallback cb = null, object cookie = null) { var result = new ConnectionFlushBatchCompletionCallback(this, _communicator, _instance, - __flushBatchRequests_name, cookie, cb); + _flushBatchRequests_name, cookie, cb); var outgoing = new ConnectionFlushBatchAsync(this, _instance, result); - outgoing.invoke(__flushBatchRequests_name); + outgoing.invoke(_flushBatchRequests_name); return result; } @@ -537,15 +537,15 @@ namespace Ice { if(r != null && r.getConnection() != this) { - const string msg = "Connection for call to end_" + __flushBatchRequests_name + + const string msg = "Connection for call to end_" + _flushBatchRequests_name + " does not match connection that was used to call corresponding begin_" + - __flushBatchRequests_name + " method"; + _flushBatchRequests_name + " method"; throw new ArgumentException(msg); } - AsyncResultI.check(r, __flushBatchRequests_name).wait(); + AsyncResultI.check(r, _flushBatchRequests_name).wait(); } - private const string __flushBatchRequests_name = "flushBatchRequests"; + private const string _flushBatchRequests_name = "flushBatchRequests"; public void setCloseCallback(CloseCallback callback) { @@ -1071,10 +1071,10 @@ namespace Ice } ProtocolVersion pv = new ProtocolVersion(); - pv.read__(_readStream); + pv.iceRead(_readStream); IceInternal.Protocol.checkSupportedProtocol(pv); EncodingVersion ev = new EncodingVersion(); - ev.read__(_readStream); + ev.iceRead(_readStream); IceInternal.Protocol.checkSupportedProtocolEncoding(ev); _readStream.readByte(); // messageType @@ -1949,8 +1949,8 @@ namespace Ice // OutputStream os = new OutputStream(_instance, Util.currentProtocolEncoding); os.writeBlob(IceInternal.Protocol.magic); - Ice.Util.currentProtocol.write__(os); - Ice.Util.currentProtocolEncoding.write__(os); + Ice.Util.currentProtocol.iceWrite(os); + Ice.Util.currentProtocolEncoding.iceWrite(os); os.writeByte(IceInternal.Protocol.closeConnectionMsg); os.writeByte(_compressionSupported ? (byte)1 : (byte)0); os.writeInt(IceInternal.Protocol.headerSize); // Message size. @@ -1981,8 +1981,8 @@ namespace Ice { OutputStream os = new OutputStream(_instance, Util.currentProtocolEncoding); os.writeBlob(IceInternal.Protocol.magic); - Ice.Util.currentProtocol.write__(os); - Ice.Util.currentProtocolEncoding.write__(os); + Ice.Util.currentProtocol.iceWrite(os); + Ice.Util.currentProtocolEncoding.iceWrite(os); os.writeByte(IceInternal.Protocol.validateConnectionMsg); os.writeByte((byte)0); os.writeInt(IceInternal.Protocol.headerSize); // Message size. @@ -2027,8 +2027,8 @@ namespace Ice if(_writeStream.size() == 0) { _writeStream.writeBlob(IceInternal.Protocol.magic); - Ice.Util.currentProtocol.write__(_writeStream); - Ice.Util.currentProtocolEncoding.write__(_writeStream); + Ice.Util.currentProtocol.iceWrite(_writeStream); + Ice.Util.currentProtocolEncoding.iceWrite(_writeStream); _writeStream.writeByte(IceInternal.Protocol.validateConnectionMsg); _writeStream.writeByte((byte)0); // Compression status (always zero for validate connection). _writeStream.writeInt(IceInternal.Protocol.headerSize); // Message size. @@ -2098,11 +2098,11 @@ namespace Ice } ProtocolVersion pv = new ProtocolVersion(); - pv.read__(_readStream); + pv.iceRead(_readStream); IceInternal.Protocol.checkSupportedProtocol(pv); EncodingVersion ev = new EncodingVersion(); - ev.read__(_readStream); + ev.iceRead(_readStream); IceInternal.Protocol.checkSupportedProtocolEncoding(ev); byte messageType = _readStream.readByte(); diff --git a/csharp/src/Ice/DispatchInterceptor.cs b/csharp/src/Ice/DispatchInterceptor.cs index a571f356c2c..9cf3347f606 100644 --- a/csharp/src/Ice/DispatchInterceptor.cs +++ b/csharp/src/Ice/DispatchInterceptor.cs @@ -31,7 +31,7 @@ namespace Ice dispatch(Request request); public override System.Threading.Tasks.Task<Ice.OutputStream> - dispatch__(IceInternal.Incoming inc, Current current) + iceDispatch(IceInternal.Incoming inc, Current current) { return dispatch(inc); } diff --git a/csharp/src/Ice/EndpointFactoryManager.cs b/csharp/src/Ice/EndpointFactoryManager.cs index 1c8172ffcc5..5cf22c23ceb 100644 --- a/csharp/src/Ice/EndpointFactoryManager.cs +++ b/csharp/src/Ice/EndpointFactoryManager.cs @@ -18,7 +18,7 @@ namespace IceInternal { internal EndpointFactoryManager(Instance instance) { - instance_ = instance; + _instance = instance; _factories = new List<EndpointFactory>(); } @@ -77,7 +77,7 @@ namespace IceInternal if(protocol.Equals("default")) { - protocol = instance_.defaultsAndOverrides().defaultProtocol; + protocol = _instance.defaultsAndOverrides().defaultProtocol; } EndpointFactory factory = null; @@ -109,7 +109,7 @@ namespace IceInternal /* EndpointI e = f.create(s.Substring(m.Index + m.Length), oaEndpoint); - BasicStream bs = new BasicStream(instance_, true); + BasicStream bs = new BasicStream(_instance, true); e.streamWrite(bs); Buffer buf = bs.getBuffer(); buf.b.position(0); @@ -142,11 +142,11 @@ namespace IceInternal // and ask the factory to read the endpoint data from that stream to create // the actual endpoint. // - Ice.OutputStream os = new Ice.OutputStream(instance_, Ice.Util.currentProtocolEncoding); + Ice.OutputStream os = new Ice.OutputStream(_instance, Ice.Util.currentProtocolEncoding); os.writeShort(ue.type()); ue.streamWrite(os); Ice.InputStream iss = - new Ice.InputStream(instance_, Ice.Util.currentProtocolEncoding, os.getBuffer(), true); + new Ice.InputStream(_instance, Ice.Util.currentProtocolEncoding, os.getBuffer(), true); iss.pos(0); iss.readShort(); // type iss.startEncapsulation(); @@ -196,7 +196,7 @@ namespace IceInternal _factories.Clear(); } - private readonly Instance instance_; + private readonly Instance _instance; private readonly List<EndpointFactory> _factories; } diff --git a/csharp/src/Ice/Exception.cs b/csharp/src/Ice/Exception.cs index e07e9209a9c..b5720c1b798 100644 --- a/csharp/src/Ice/Exception.cs +++ b/csharp/src/Ice/Exception.cs @@ -202,27 +202,27 @@ namespace Ice /// <param name="context">Contains contextual information about the source or destination.</param> protected UserException(SerializationInfo info, StreamingContext context) : base(info, context) {} - public virtual void write__(OutputStream os__) + public virtual void iceWrite(OutputStream ostr) { - os__.startException(null); - writeImpl__(os__); - os__.endException(); + ostr.startException(null); + iceWriteImpl(ostr); + ostr.endException(); } - public virtual void read__(InputStream is__) + public virtual void iceRead(InputStream istr) { - is__.startException(); - readImpl__(is__); - is__.endException(false); + istr.startException(); + iceReadImpl(istr); + istr.endException(false); } - public virtual bool usesClasses__() + public virtual bool iceUsesClasses() { return false; } - protected abstract void writeImpl__(OutputStream os__); - protected abstract void readImpl__(InputStream is__); + protected abstract void iceWriteImpl(OutputStream ostr); + protected abstract void iceReadImpl(InputStream istr); } } diff --git a/csharp/src/Ice/Incoming.cs b/csharp/src/Ice/Incoming.cs index 9df6f1625c7..36b0f721892 100644 --- a/csharp/src/Ice/Incoming.cs +++ b/csharp/src/Ice/Incoming.cs @@ -110,7 +110,7 @@ namespace IceInternal // // Read the current. // - _current.id.read__(_is); + _current.id.iceRead(_is); // // For compatibility with the old FacetPath. @@ -211,7 +211,7 @@ namespace IceInternal try { - Task<Ice.OutputStream> task = _servant.dispatch__(this, _current); + Task<Ice.OutputStream> task = _servant.iceDispatch(this, _current); if(task == null) { completed(null, false); @@ -605,7 +605,7 @@ namespace IceInternal { Debug.Assert(false); } - ex.id.write__(_os); + ex.id.iceWrite(_os); // // For compatibility with the old FacetPath. diff --git a/csharp/src/Ice/InputStream.cs b/csharp/src/Ice/InputStream.cs index 0f9de976656..1eac58e63f1 100644 --- a/csharp/src/Ice/InputStream.cs +++ b/csharp/src/Ice/InputStream.cs @@ -257,17 +257,17 @@ namespace Ice { initialize(encoding); - instance_ = instance; - _traceSlicing = instance_.traceLevels().slicing > 0; + _instance = instance; + _traceSlicing = _instance.traceLevels().slicing > 0; - _valueFactoryManager = instance_.initializationData().valueFactoryManager; - _logger = instance_.initializationData().logger; - _classResolver = instance_.resolveClass; + _valueFactoryManager = _instance.initializationData().valueFactoryManager; + _logger = _instance.initializationData().logger; + _classResolver = _instance.resolveClass; } private void initialize(EncodingVersion encoding) { - instance_ = null; + _instance = null; _encoding = encoding; _encapsStack = null; _encapsCache = null; @@ -396,7 +396,7 @@ namespace Ice public IceInternal.Instance instance() { - return instance_; + return _instance; } /// <summary> @@ -405,7 +405,7 @@ namespace Ice /// <param name="other">The other stream.</param> public void swap(InputStream other) { - Debug.Assert(instance_ == other.instance_); + Debug.Assert(_instance == other._instance); IceInternal.Buffer tmpBuf = other._buf; other._buf = _buf; @@ -558,7 +558,7 @@ namespace Ice _encapsStack.sz = sz; EncodingVersion encoding = new EncodingVersion(); - encoding.read__(this); + encoding.iceRead(this); Protocol.checkSupportedEncoding(encoding); // Make sure the encoding is supported. _encapsStack.setEncoding(encoding); @@ -627,7 +627,7 @@ namespace Ice } var encoding = new EncodingVersion(); - encoding.read__(this); + encoding.iceRead(this); if(encoding.Equals(Util.Encoding_1_0)) { if(sz != 6) @@ -664,7 +664,7 @@ namespace Ice } encoding = new EncodingVersion(); - encoding.read__(this); + encoding.iceRead(this); _buf.b.position(_buf.b.position() - 6); byte[] v = new byte[sz]; @@ -710,7 +710,7 @@ namespace Ice throw new UnmarshalOutOfBoundsException(); } EncodingVersion encoding = new EncodingVersion(); - encoding.read__(this); + encoding.iceRead(this); try { _buf.b.position(_buf.b.position() + sz - 6); @@ -1096,7 +1096,7 @@ namespace Ice } try { - var f = new BinaryFormatter(null, new StreamingContext(StreamingContextStates.All, instance_)); + var f = new BinaryFormatter(null, new StreamingContext(StreamingContextStates.All, _instance)); return f.Deserialize(new IceInternal.InputStreamWrapper(sz, this)); } catch(System.Exception ex) @@ -2378,7 +2378,7 @@ namespace Ice /// <returns>The extracted proxy.</returns> public ObjectPrx readProxy() { - return instance_.proxyFactory().streamToProxy(this); + return _instance.proxyFactory().streamToProxy(this); } /// <summary> @@ -2699,7 +2699,7 @@ namespace Ice return userEx; } - private IceInternal.Instance instance_; + private IceInternal.Instance _instance; private IceInternal.Buffer _buf; private object _closure; private byte[] _stringBytes; // Reusable array for reading strings. @@ -2900,7 +2900,7 @@ namespace Ice // // Read the instance. // - v.read__(_stream); + v.iceRead(_stream); if(_patchMap != null) { @@ -3073,7 +3073,7 @@ namespace Ice // if(userEx != null) { - userEx.read__(_stream); + userEx.iceRead(_stream); if(usesClasses) { readPendingValues(); @@ -3382,7 +3382,7 @@ namespace Ice // if(userEx != null) { - userEx.read__(_stream); + userEx.iceRead(_stream); throw userEx; // Never reached. @@ -4018,12 +4018,12 @@ namespace Ice /// <param name="inStream">The input stream to read from.</param> public abstract void read(InputStream inStream); - public override void write__(OutputStream os) + public override void iceWrite(OutputStream os) { Debug.Assert(false); } - public override void read__(InputStream istr) + public override void iceRead(InputStream istr) { read(istr); } diff --git a/csharp/src/Ice/LocatorInfo.cs b/csharp/src/Ice/LocatorInfo.cs index 50eccbbb5fe..50b2c8b6a14 100644 --- a/csharp/src/Ice/LocatorInfo.cs +++ b/csharp/src/Ice/LocatorInfo.cs @@ -30,7 +30,7 @@ namespace IceInternal EndpointI[] endpoints = null; if(proxy != null) { - Reference r = ((Ice.ObjectPrxHelperBase)proxy).reference__(); + Reference r = ((Ice.ObjectPrxHelperBase)proxy).iceReference(); if(_ref.isWellKnown() && !Protocol.isSupported(_ref.getEncoding(), r.getEncoding())) { // @@ -163,7 +163,7 @@ namespace IceInternal EndpointI[] endpoints = null; if(_proxy != null) { - Reference r = ((Ice.ObjectPrxHelperBase)_proxy).reference__(); + Reference r = ((Ice.ObjectPrxHelperBase)_proxy).iceReference(); if(!r.isIndirect()) { endpoints = r.getEndpoints(); @@ -697,7 +697,7 @@ namespace IceInternal finishRequest(Reference @ref, List<Reference> wellKnownRefs, Ice.ObjectPrx proxy, bool notRegistered) { Ice.ObjectPrxHelperBase @base = proxy as Ice.ObjectPrxHelperBase; - if(proxy == null || @base.reference__().isIndirect()) + if(proxy == null || @base.iceReference().isIndirect()) { // // Remove the cached references of well-known objects for which we tried @@ -711,10 +711,10 @@ namespace IceInternal if(!@ref.isWellKnown()) { - if(proxy != null && !@base.reference__().isIndirect()) + if(proxy != null && !@base.iceReference().isIndirect()) { // Cache the adapter endpoints. - _table.addAdapterEndpoints(@ref.getAdapterId(), @base.reference__().getEndpoints()); + _table.addAdapterEndpoints(@ref.getAdapterId(), @base.iceReference().getEndpoints()); } else if(notRegistered) // If the adapter isn't registered anymore, remove it from the cache. { @@ -729,10 +729,10 @@ namespace IceInternal } else { - if(proxy != null && !@base.reference__().isWellKnown()) + if(proxy != null && !@base.iceReference().isWellKnown()) { // Cache the well-known object reference. - _table.addObjectReference(@ref.getIdentity(), @base.reference__()); + _table.addObjectReference(@ref.getIdentity(), @base.iceReference()); } else if(notRegistered) // If the well-known object isn't registered anymore, remove it from the cache. { @@ -762,7 +762,7 @@ namespace IceInternal { public LocatorKey(Ice.LocatorPrx prx) { - Reference r = ((Ice.ObjectPrxHelperBase)prx).reference__(); + Reference r = ((Ice.ObjectPrxHelperBase)prx).iceReference(); _id = r.getIdentity(); _encoding = r.getEncoding(); } diff --git a/csharp/src/Ice/Object.cs b/csharp/src/Ice/Object.cs index 0b888955616..a05266369e0 100644 --- a/csharp/src/Ice/Object.cs +++ b/csharp/src/Ice/Object.cs @@ -69,7 +69,7 @@ namespace Ice /// <returns>The task if dispatched asynchronously, null otherwise.</returns> Task<Ice.OutputStream> ice_dispatch(Request request); - Task<Ice.OutputStream> dispatch__(IceInternal.Incoming inc, Current current); + Task<Ice.OutputStream> iceDispatch(IceInternal.Incoming inc, Current current); } /// <summary> @@ -94,7 +94,7 @@ namespace Ice return MemberwiseClone(); } - public static readonly string[] ids__ = + private static readonly string[] _ids = { "::Ice::Object" }; @@ -107,19 +107,19 @@ namespace Ice /// <returns>The return value is true if s is ::Ice::Object.</returns> public virtual bool ice_isA(string s, Current current = null) { - return s.Equals(ids__[0]); + return s.Equals(_ids[0]); } - public static Task<Ice.OutputStream> ice_isA___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) + public static Task<Ice.OutputStream> iceD_ice_isA(Ice.Object obj, IceInternal.Incoming inS, Current current) { - InputStream is__ = inS__.startReadParams(); - var __id = is__.readString(); - inS__.endReadParams(); - var __ret = __obj.ice_isA(__id, __current); - var os__ = inS__.startWriteParams(); - os__.writeBool(__ret); - inS__.endWriteParams(os__); - inS__.setResult(os__); + InputStream istr = inS.startReadParams(); + var id = istr.readString(); + inS.endReadParams(); + var ret = obj.ice_isA(id, current); + var ostr = inS.startWriteParams(); + ostr.writeBool(ret); + inS.endWriteParams(ostr); + inS.setResult(ostr); return null; } @@ -132,11 +132,11 @@ namespace Ice // Nothing to do. } - public static Task<Ice.OutputStream> ice_ping___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) + public static Task<Ice.OutputStream> iceD_ice_ping(Ice.Object obj, IceInternal.Incoming inS, Current current) { - inS__.readEmptyParams(); - __obj.ice_ping(__current); - inS__.setResult(inS__.writeEmptyParams()); + inS.readEmptyParams(); + obj.ice_ping(current); + inS.setResult(inS.writeEmptyParams()); return null; } @@ -147,17 +147,17 @@ namespace Ice /// <returns>An array whose only element is ::Ice::Object.</returns> public virtual string[] ice_ids(Current current = null) { - return ids__; + return _ids; } - public static Task<Ice.OutputStream> ice_ids___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) + public static Task<Ice.OutputStream> iceD_ice_ids(Ice.Object obj, IceInternal.Incoming inS, Current current) { - inS__.readEmptyParams(); - var ret__ = __obj.ice_ids(__current); - var os__ = inS__.startWriteParams(); - os__.writeStringSeq(ret__); - inS__.endWriteParams(os__); - inS__.setResult(os__); + inS.readEmptyParams(); + var ret = obj.ice_ids(current); + var ostr = inS.startWriteParams(); + ostr.writeStringSeq(ret); + inS.endWriteParams(ostr); + inS.setResult(ostr); return null; } @@ -168,17 +168,17 @@ namespace Ice /// <returns>The return value is always ::Ice::Object.</returns> public virtual string ice_id(Current current = null) { - return ids__[0]; + return _ids[0]; } - public static Task<Ice.OutputStream> ice_id___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) + public static Task<Ice.OutputStream> iceD_ice_id(Ice.Object obj, IceInternal.Incoming inS, Current current) { - inS__.readEmptyParams(); - var __ret = __obj.ice_id(__current); - var os__ = inS__.startWriteParams(); - os__.writeString(__ret); - inS__.endWriteParams(os__); - inS__.setResult(os__); + inS.readEmptyParams(); + var ret = obj.ice_id(current); + var ostr = inS.startWriteParams(); + ostr.writeString(ret); + inS.endWriteParams(ostr); + inS.setResult(ostr); return null; } @@ -188,10 +188,10 @@ namespace Ice /// <returns>The return value is always ::Ice::Object.</returns> public static string ice_staticId() { - return ids__[0]; + return _ids[0]; } - private static readonly string[] all__ = new string[] + private static readonly string[] _all = new string[] { "ice_id", "ice_ids", "ice_isA", "ice_ping" }; @@ -206,12 +206,12 @@ namespace Ice { var inc = (IceInternal.Incoming)request; inc.startOver(); - return dispatch__(inc, inc.getCurrent()); + return iceDispatch(inc, inc.getCurrent()); } - public virtual Task<Ice.OutputStream> dispatch__(IceInternal.Incoming inc, Current current) + public virtual Task<Ice.OutputStream> iceDispatch(IceInternal.Incoming inc, Current current) { - int pos = System.Array.BinarySearch(all__, current.operation); + int pos = System.Array.BinarySearch(_all, current.operation); if(pos < 0) { throw new Ice.OperationNotExistException(current.id, current.facet, current.operation); @@ -221,19 +221,19 @@ namespace Ice { case 0: { - return ice_id___(this, inc, current); + return iceD_ice_id(this, inc, current); } case 1: { - return ice_ids___(this, inc, current); + return iceD_ice_ids(this, inc, current); } case 2: { - return ice_isA___(this, inc, current); + return iceD_ice_isA(this, inc, current); } case 3: { - return ice_ping___(this, inc, current); + return iceD_ice_ping(this, inc, current); } } @@ -260,7 +260,7 @@ namespace Ice return "???"; } - public static void checkMode__(OperationMode expected, OperationMode received) + public static void iceCheckMode(OperationMode expected, OperationMode received) { if(expected != received) { @@ -303,7 +303,7 @@ namespace Ice /// Ice run-time exception, it must throw it directly.</returns> public abstract bool ice_invoke(byte[] inParams, out byte[] outParams, Current current); - public override Task<Ice.OutputStream> dispatch__(IceInternal.Incoming inS, Current current) + public override Task<Ice.OutputStream> iceDispatch(IceInternal.Incoming inS, Current current) { byte[] inEncaps = inS.readParamEncaps(); byte[] outEncaps; @@ -317,7 +317,7 @@ namespace Ice { public abstract Task<Ice.Object_Ice_invokeResult> ice_invokeAsync(byte[] inEncaps, Current current); - public override Task<Ice.OutputStream> dispatch__(IceInternal.Incoming inS, Current current) + public override Task<Ice.OutputStream> iceDispatch(IceInternal.Incoming inS, Current current) { byte[] inEncaps = inS.readParamEncaps(); return ice_invokeAsync(inEncaps, current).ContinueWith((Task<Ice.Object_Ice_invokeResult> t) => diff --git a/csharp/src/Ice/ObjectAdapterFactory.cs b/csharp/src/Ice/ObjectAdapterFactory.cs index 5fba2d4db52..88c49c3c042 100644 --- a/csharp/src/Ice/ObjectAdapterFactory.cs +++ b/csharp/src/Ice/ObjectAdapterFactory.cs @@ -25,14 +25,14 @@ namespace IceInternal // Ignore shutdown requests if the object adapter factory has // already been shut down. // - if(instance_ == null) + if(_instance == null) { return; } adapters = new List<Ice.ObjectAdapterI>(_adapters); - instance_ = null; + _instance = null; _communicator = null; System.Threading.Monitor.PulseAll(this); @@ -56,7 +56,7 @@ namespace IceInternal // // First we wait for the shutdown of the factory itself. // - while(instance_ != null) + while(_instance != null) { System.Threading.Monitor.Wait(this); } @@ -77,7 +77,7 @@ namespace IceInternal { lock(this) { - return instance_ == null; + return _instance == null; } } @@ -139,7 +139,7 @@ namespace IceInternal { lock(this) { - if(instance_ == null) + if(_instance == null) { throw new Ice.CommunicatorDestroyedException(); } @@ -148,7 +148,7 @@ namespace IceInternal if(name.Length == 0) { string uuid = System.Guid.NewGuid().ToString(); - adapter = new Ice.ObjectAdapterI(instance_, _communicator, this, uuid, null, true); + adapter = new Ice.ObjectAdapterI(_instance, _communicator, this, uuid, null, true); } else { @@ -159,7 +159,7 @@ namespace IceInternal ex.id = name; throw ex; } - adapter = new Ice.ObjectAdapterI(instance_, _communicator, this, name, router, false); + adapter = new Ice.ObjectAdapterI(_instance, _communicator, this, name, router, false); _adapterNamesInUse.Add(name); } _adapters.Add(adapter); @@ -172,7 +172,7 @@ namespace IceInternal List<Ice.ObjectAdapterI> adapters; lock(this) { - if(instance_ == null) + if(_instance == null) { return null; } @@ -202,7 +202,7 @@ namespace IceInternal { lock(this) { - if(instance_ == null) + if(_instance == null) { return; } @@ -231,13 +231,13 @@ namespace IceInternal // internal ObjectAdapterFactory(Instance instance, Ice.Communicator communicator) { - instance_ = instance; + _instance = instance; _communicator = communicator; _adapterNamesInUse = new HashSet<string>(); _adapters = new List<Ice.ObjectAdapterI>(); } - private Instance instance_; + private Instance _instance; private Ice.Communicator _communicator; private HashSet<string> _adapterNamesInUse; private List<Ice.ObjectAdapterI> _adapters; diff --git a/csharp/src/Ice/ObjectAdapterI.cs b/csharp/src/Ice/ObjectAdapterI.cs index a1213d9ae99..da1cb5df9ea 100644 --- a/csharp/src/Ice/ObjectAdapterI.cs +++ b/csharp/src/Ice/ObjectAdapterI.cs @@ -45,7 +45,7 @@ namespace Ice // If we've previously been initialized we just need to activate the // incoming connection factories and we're done. // - if(state_ != StateUninitialized) + if(_state != StateUninitialized) { foreach(IncomingConnectionFactory icf in _incomingConnectionFactories) { @@ -61,12 +61,12 @@ namespace Ice // deactivation from other threads while these one off // initializations are done. // - state_ = StateActivating; + _state = StateActivating; locatorInfo = _locatorInfo; if(!_noConfig) { - Properties properties = instance_.initializationData().properties; + Properties properties = _instance.initializationData().properties; printAdapterReady = properties.getPropertyAsInt("Ice.PrintAdapterReady") > 0; } } @@ -87,7 +87,7 @@ namespace Ice // lock(this) { - state_ = StateUninitialized; + _state = StateUninitialized; System.Threading.Monitor.PulseAll(this); } throw; @@ -100,14 +100,14 @@ namespace Ice lock(this) { - Debug.Assert(state_ == StateActivating); + Debug.Assert(_state == StateActivating); foreach(IncomingConnectionFactory icf in _incomingConnectionFactories) { icf.activate(); } - state_ = StateActive; + _state = StateActive; System.Threading.Monitor.PulseAll(this); } } @@ -117,7 +117,7 @@ namespace Ice lock(this) { checkForDeactivation(); - state_ = StateHeld; + _state = StateHeld; foreach(IncomingConnectionFactory factory in _incomingConnectionFactories) { factory.hold(); @@ -150,15 +150,15 @@ namespace Ice // Wait for activation to complete. This is necessary to not // get out of order locator updates. // - while(state_ == StateActivating || state_ == StateDeactivating) + while(_state == StateActivating || _state == StateDeactivating) { System.Threading.Monitor.Wait(this); } - if(state_ > StateDeactivating) + if(_state > StateDeactivating) { return; } - state_ = StateDeactivating; + _state = StateDeactivating; } // @@ -171,7 +171,7 @@ namespace Ice // // Remove entry from the router manager. // - instance_.routerManager().erase(_routerInfo.getRouter()); + _instance.routerManager().erase(_routerInfo.getRouter()); // // Clear this object adapter with the router. @@ -206,12 +206,12 @@ namespace Ice // changing the object adapter might block if there are still // requests being dispatched. // - instance_.outgoingConnectionFactory().removeAdapter(this); + _instance.outgoingConnectionFactory().removeAdapter(this); lock(this) { - Debug.Assert(state_ == StateDeactivating); - state_ = StateDeactivated; + Debug.Assert(_state == StateDeactivating); + _state = StateDeactivated; System.Threading.Monitor.PulseAll(this); } } @@ -226,11 +226,11 @@ namespace Ice // for the return of all direct method calls using this // adapter. // - while((state_ < StateDeactivated) || _directCount > 0) + while((_state < StateDeactivated) || _directCount > 0) { System.Threading.Monitor.Wait(this); } - if(state_ > StateDeactivated) + if(_state > StateDeactivated) { return; } @@ -252,7 +252,7 @@ namespace Ice { lock(this) { - return state_ >= StateDeactivated; + return _state >= StateDeactivated; } } @@ -271,15 +271,15 @@ namespace Ice // adapter. Other threads wait for the destruction to be // completed. // - while(state_ == StateDestroying) + while(_state == StateDestroying) { System.Threading.Monitor.Wait(this); } - if(state_ == StateDestroyed) + if(_state == StateDestroyed) { return; } - state_ = StateDestroying; + _state = StateDestroying; } // @@ -313,7 +313,7 @@ namespace Ice // // Remove object references (some of them cyclic). // - instance_ = null; + _instance = null; _threadPool = null; _routerEndpoints = null; _routerInfo = null; @@ -322,7 +322,7 @@ namespace Ice _reference = null; _objectAdapterFactory = null; - state_ = StateDestroyed; + _state = StateDestroyed; System.Threading.Monitor.PulseAll(this); } } @@ -450,7 +450,7 @@ namespace Ice { checkForDeactivation(); - Reference @ref = ((ObjectPrxHelperBase)proxy).reference__(); + Reference @ref = ((ObjectPrxHelperBase)proxy).iceReference(); return findFacet(@ref.getIdentity(), @ref.getFacet()); } } @@ -534,7 +534,7 @@ namespace Ice { checkForDeactivation(); - _locatorInfo = instance_.locatorManager().get(locator); + _locatorInfo = _instance.locatorManager().get(locator); } } @@ -617,7 +617,7 @@ namespace Ice // it can be called for AMI invocations if the proxy has no delegate set yet. // - Reference r = ((ObjectPrxHelperBase)proxy).reference__(); + Reference r = ((ObjectPrxHelperBase)proxy).iceReference(); if(r.isWellKnown()) { // @@ -748,7 +748,7 @@ namespace Ice { // Not check for deactivation here! - Debug.Assert(instance_ != null); // Must not be called after destroy(). + Debug.Assert(_instance != null); // Must not be called after destroy(). Debug.Assert(_directCount > 0); if(--_directCount == 0) @@ -760,13 +760,13 @@ namespace Ice public ThreadPool getThreadPool() { - // No mutex lock necessary, _threadPool and instance_ are + // No mutex lock necessary, _threadPool and _instance are // immutable after creation until they are removed in // destroy(). // Not check for deactivation here! - Debug.Assert(instance_ != null); // Must not be called after destroy(). + Debug.Assert(_instance != null); // Must not be called after destroy(). if(_threadPool != null) { @@ -774,7 +774,7 @@ namespace Ice } else { - return instance_.serverThreadPool(); + return _instance.serverThreadPool(); } } @@ -791,7 +791,7 @@ namespace Ice { // Not check for deactivation here! - Debug.Assert(instance_ != null); // Must not be called after destroy(). + Debug.Assert(_instance != null); // Must not be called after destroy(). return _acm; } @@ -808,7 +808,7 @@ namespace Ice ObjectAdapterFactory objectAdapterFactory, string name, RouterPrx router, bool noConfig) { - instance_ = instance; + _instance = instance; _communicator = communicator; _objectAdapterFactory = objectAdapterFactory; _servantManager = new ServantManager(instance, name); @@ -824,12 +824,12 @@ namespace Ice { _id = ""; _replicaGroupId = ""; - _reference = instance_.referenceFactory().create("dummy -t", ""); - _acm = instance_.serverACM(); + _reference = _instance.referenceFactory().create("dummy -t", ""); + _acm = _instance.serverACM(); return; } - Properties properties = instance_.initializationData().properties; + Properties properties = _instance.initializationData().properties; List<string> unknownProps = new List<string>(); bool noProps = filterProperties(unknownProps); @@ -846,7 +846,7 @@ namespace Ice message.Append("\n "); message.Append(s); } - instance_.initializationData().logger.warning(message.ToString()); + _instance.initializationData().logger.warning(message.ToString()); } // @@ -857,8 +857,8 @@ namespace Ice // // These need to be set to prevent warnings/asserts in the destructor. // - state_ = StateDestroyed; - instance_ = null; + _state = StateDestroyed; + _instance = null; _incomingConnectionFactories = null; InitializationException ex = new InitializationException(); @@ -876,7 +876,7 @@ namespace Ice string proxyOptions = properties.getPropertyWithDefault(_name + ".ProxyOptions", "-t"); try { - _reference = instance_.referenceFactory().create("dummy " + proxyOptions, ""); + _reference = _instance.referenceFactory().create("dummy " + proxyOptions, ""); } catch(ProxyParseException) { @@ -885,7 +885,7 @@ namespace Ice throw ex; } - _acm = new ACMConfig(properties, communicator.getLogger(), _name + ".ACM", instance_.serverACM()); + _acm = new ACMConfig(properties, communicator.getLogger(), _name + ".ACM", _instance.serverACM()); { int defaultMessageSizeMax = instance.messageSizeMax() / 1024; @@ -906,17 +906,17 @@ namespace Ice int threadPoolSizeMax = properties.getPropertyAsInt(_name + ".ThreadPool.SizeMax"); if(threadPoolSize > 0 || threadPoolSizeMax > 0) { - _threadPool = new ThreadPool(instance_, _name + ".ThreadPool", 0); + _threadPool = new ThreadPool(_instance, _name + ".ThreadPool", 0); } if(router == null) { router = RouterPrxHelper.uncheckedCast( - instance_.proxyFactory().propertyToProxy(_name + ".Router")); + _instance.proxyFactory().propertyToProxy(_name + ".Router")); } if(router != null) { - _routerInfo = instance_.routerManager().get(router); + _routerInfo = _instance.routerManager().get(router); if(_routerInfo != null) { // @@ -926,7 +926,7 @@ namespace Ice { Ice.AlreadyRegisteredException ex = new Ice.AlreadyRegisteredException(); ex.kindOfObject = "object adapter with router"; - ex.id = Ice.Util.identityToString(router.ice_getIdentity(), instance_.toStringMode()); + ex.id = Ice.Util.identityToString(router.ice_getIdentity(), _instance.toStringMode()); throw ex; } @@ -970,7 +970,7 @@ namespace Ice // router's client proxy to use this object adapter for // callbacks. // - instance_.outgoingConnectionFactory().setRouterInfo(_routerInfo); + _instance.outgoingConnectionFactory().setRouterInfo(_routerInfo); } } else @@ -987,10 +987,10 @@ namespace Ice } if(endpoints.Count == 0) { - TraceLevels tl = instance_.traceLevels(); + TraceLevels tl = _instance.traceLevels(); if(tl.network >= 2) { - instance_.initializationData().logger.trace(tl.networkCat, "created adapter `" + _name + + _instance.initializationData().logger.trace(tl.networkCat, "created adapter `" + _name + "' without endpoints"); } } @@ -1004,11 +1004,11 @@ namespace Ice if(properties.getProperty(_name + ".Locator").Length > 0) { setLocator(LocatorPrxHelper.uncheckedCast( - instance_.proxyFactory().propertyToProxy(_name + ".Locator"))); + _instance.proxyFactory().propertyToProxy(_name + ".Locator"))); } else { - setLocator(instance_.referenceFactory().getDefaultLocator()); + setLocator(_instance.referenceFactory().getDefaultLocator()); } } catch(LocalException) @@ -1062,8 +1062,8 @@ namespace Ice // // Create a reference and return a proxy for this reference. // - Reference reference = instance_.referenceFactory().create(ident, facet, _reference, endpoints); - return instance_.proxyFactory().referenceToProxy(reference); + Reference reference = _instance.referenceFactory().create(ident, facet, _reference, endpoints); + return _instance.proxyFactory().referenceToProxy(reference); } private ObjectPrx newIndirectProxy(Identity ident, string facet, string id) @@ -1072,13 +1072,13 @@ namespace Ice // Create a reference with the adapter id and return a // proxy for the reference. // - Reference reference = instance_.referenceFactory().create(ident, facet, _reference, id); - return instance_.proxyFactory().referenceToProxy(reference); + Reference reference = _instance.referenceFactory().create(ident, facet, _reference, id); + return _instance.proxyFactory().referenceToProxy(reference); } private void checkForDeactivation() { - if(state_ >= StateDeactivating) + if(_state >= StateDeactivating) { ObjectAdapterDeactivatedException ex = new ObjectAdapterDeactivatedException(); ex.name = getName(); @@ -1172,7 +1172,7 @@ namespace Ice } string s = endpts.Substring(beg, (end) - (beg)); - EndpointI endp = instance_.endpointFactoryManager().create(s, oaEndpoints); + EndpointI endp = _instance.endpointFactoryManager().create(s, oaEndpoints); if(endp == null) { Ice.EndpointParseException e2 = new Ice.EndpointParseException(); @@ -1193,7 +1193,7 @@ namespace Ice // Parse published endpoints. If set, these are used in proxies // instead of the connection factory endpoints. // - string endpts = instance_.initializationData().properties.getProperty(_name + ".PublishedEndpoints"); + string endpts = _instance.initializationData().properties.getProperty(_name + ".PublishedEndpoints"); List<EndpointI> endpoints = parseEndpoints(endpts, false); if(endpoints.Count == 0) { @@ -1208,7 +1208,7 @@ namespace Ice } } - if(instance_.traceLevels().network >= 1 && endpoints.Count > 0) + if(_instance.traceLevels().network >= 1 && endpoints.Count > 0) { StringBuilder s = new StringBuilder("published endpoints for object adapter `"); s.Append(_name); @@ -1223,7 +1223,7 @@ namespace Ice s.Append(endpoint.ToString()); first = false; } - instance_.initializationData().logger.trace(instance_.traceLevels().networkCat, s.ToString()); + _instance.initializationData().logger.trace(_instance.traceLevels().networkCat, s.ToString()); } return endpoints; } @@ -1258,12 +1258,12 @@ namespace Ice } catch(AdapterNotFoundException) { - if(instance_.traceLevels().location >= 1) + if(_instance.traceLevels().location >= 1) { System.Text.StringBuilder s = new System.Text.StringBuilder(); s.Append("couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n"); s.Append("the object adapter is not known to the locator registry"); - instance_.initializationData().logger.trace(instance_.traceLevels().locationCat, s.ToString()); + _instance.initializationData().logger.trace(_instance.traceLevels().locationCat, s.ToString()); } NotRegisteredException ex1 = new NotRegisteredException(); @@ -1273,12 +1273,12 @@ namespace Ice } catch(InvalidReplicaGroupIdException) { - if(instance_.traceLevels().location >= 1) + if(_instance.traceLevels().location >= 1) { System.Text.StringBuilder s = new System.Text.StringBuilder(); s.Append("couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n"); s.Append("the replica group `" + _replicaGroupId + "' is not known to the locator registry"); - instance_.initializationData().logger.trace(instance_.traceLevels().locationCat, s.ToString()); + _instance.initializationData().logger.trace(_instance.traceLevels().locationCat, s.ToString()); } NotRegisteredException ex1 = new NotRegisteredException(); @@ -1288,12 +1288,12 @@ namespace Ice } catch(AdapterAlreadyActiveException) { - if(instance_.traceLevels().location >= 1) + if(_instance.traceLevels().location >= 1) { System.Text.StringBuilder s = new System.Text.StringBuilder(); s.Append("couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n"); s.Append("the object adapter endpoints are already set"); - instance_.initializationData().logger.trace(instance_.traceLevels().locationCat, s.ToString()); + _instance.initializationData().logger.trace(_instance.traceLevels().locationCat, s.ToString()); } ObjectAdapterIdInUseException ex1 = new ObjectAdapterIdInUseException(); @@ -1310,17 +1310,17 @@ namespace Ice } catch(LocalException e) { - if(instance_.traceLevels().location >= 1) + if(_instance.traceLevels().location >= 1) { System.Text.StringBuilder s = new System.Text.StringBuilder(); s.Append("couldn't update object adapter `" + _id + "' endpoints with the locator registry:\n"); s.Append(e.ToString()); - instance_.initializationData().logger.trace(instance_.traceLevels().locationCat, s.ToString()); + _instance.initializationData().logger.trace(_instance.traceLevels().locationCat, s.ToString()); } throw; // TODO: Shall we raise a special exception instead of a non obvious local exception? } - if(instance_.traceLevels().location >= 1) + if(_instance.traceLevels().location >= 1) { System.Text.StringBuilder s = new System.Text.StringBuilder(); s.Append("updated object adapter `" + _id + "' endpoints with the locator registry\n"); @@ -1337,7 +1337,7 @@ namespace Ice } } } - instance_.initializationData().logger.trace(instance_.traceLevels().locationCat, s.ToString()); + _instance.initializationData().logger.trace(_instance.traceLevels().locationCat, s.ToString()); } } @@ -1400,7 +1400,7 @@ namespace Ice bool noProps = true; Dictionary<string, string> props = - instance_.initializationData().properties.getPropertiesForPrefix(prefix); + _instance.initializationData().properties.getPropertiesForPrefix(prefix); foreach(String prop in props.Keys) { bool valid = false; @@ -1432,8 +1432,8 @@ namespace Ice private const int StateDestroying = 6; private const int StateDestroyed = 7; - private int state_ = StateUninitialized; - private Instance instance_; + private int _state = StateUninitialized; + private Instance _instance; private Communicator _communicator; private ObjectAdapterFactory _objectAdapterFactory; private ThreadPool _threadPool; diff --git a/csharp/src/Ice/ObserverHelper.cs b/csharp/src/Ice/ObserverHelper.cs index 67e21f718a1..a6a15dded62 100644 --- a/csharp/src/Ice/ObserverHelper.cs +++ b/csharp/src/Ice/ObserverHelper.cs @@ -37,7 +37,7 @@ namespace IceInternal static public InvocationObserver get(Ice.ObjectPrx proxy, string op, Dictionary<string, string> context) { CommunicatorObserver obsv = - ((Ice.ObjectPrxHelperBase)proxy).reference__().getInstance().initializationData().observer; + ((Ice.ObjectPrxHelperBase)proxy).iceReference().getInstance().initializationData().observer; if(obsv != null) { InvocationObserver observer; diff --git a/csharp/src/Ice/OutgoingAsync.cs b/csharp/src/Ice/OutgoingAsync.cs index 9fbc4fb71f4..44f87eb97fd 100644 --- a/csharp/src/Ice/OutgoingAsync.cs +++ b/csharp/src/Ice/OutgoingAsync.cs @@ -423,7 +423,7 @@ namespace IceInternal } cachedConnection_ = null; - if(proxy_.reference__().getInvocationTimeout() == -2) + if(proxy_.iceReference().getInvocationTimeout() == -2) { instance_.timer().cancel(this); } @@ -439,7 +439,7 @@ namespace IceInternal // the retry interval is 0. This method can be called with the // connection locked so we can't just retry here. // - instance_.retryQueue().add(this, proxy_.handleException__(exc, handler_, mode_, _sent, ref _cnt)); + instance_.retryQueue().add(this, proxy_.iceHandleException(exc, handler_, mode_, _sent, ref _cnt)); return false; } catch(Ice.Exception ex) @@ -450,7 +450,7 @@ namespace IceInternal public override void cancelable(CancellationHandler handler) { - if(proxy_.reference__().getInvocationTimeout() == -2 && cachedConnection_ != null) + if(proxy_.iceReference().getInvocationTimeout() == -2 && cachedConnection_ != null) { int timeout = cachedConnection_.timeout(); if(timeout > 0) @@ -471,7 +471,7 @@ namespace IceInternal // require could end up waiting for the flush of the // connection to be done. // - proxy_.updateRequestHandler__(handler_, null); // Clear request handler and always retry. + proxy_.iceUpdateRequestHandler(handler_, null); // Clear request handler and always retry. instance_.retryQueue().add(this, 0); } catch(Ice.Exception exc) @@ -509,7 +509,7 @@ namespace IceInternal OutgoingAsyncCompletionCallback completionCallback, Ice.OutputStream os = null, Ice.InputStream iss = null) : - base(prx.reference__().getInstance(), completionCallback, os, iss) + base(prx.iceReference().getInstance(), completionCallback, os, iss) { proxy_ = prx; mode_ = Ice.OperationMode.Normal; @@ -523,7 +523,7 @@ namespace IceInternal { if(userThread) { - int invocationTimeout = proxy_.reference__().getInvocationTimeout(); + int invocationTimeout = proxy_.iceReference().getInvocationTimeout(); if(invocationTimeout > 0) { instance_.timer().schedule(this, invocationTimeout); @@ -539,7 +539,7 @@ namespace IceInternal try { _sent = false; - handler_ = proxy_.getRequestHandler__(); + handler_ = proxy_.iceGetRequestHandler(); int status = handler_.sendAsyncRequest(this); if((status & AsyncStatusSent) != 0) { @@ -563,7 +563,7 @@ namespace IceInternal } catch(RetryException) { - proxy_.updateRequestHandler__(handler_, null); // Clear request handler and always retry. + proxy_.iceUpdateRequestHandler(handler_, null); // Clear request handler and always retry. } catch(Ice.Exception ex) { @@ -573,7 +573,7 @@ namespace IceInternal childObserver_.detach(); childObserver_ = null; } - int interval = proxy_.handleException__(ex, handler_, mode_, _sent, ref _cnt); + int interval = proxy_.iceHandleException(ex, handler_, mode_, _sent, ref _cnt); if(interval > 0) { instance_.retryQueue().add(this, interval); @@ -607,7 +607,7 @@ namespace IceInternal _sent = true; if(done) { - if(proxy_.reference__().getInvocationTimeout() != -1) + if(proxy_.iceReference().getInvocationTimeout() != -1) { instance_.timer().cancel(this); } @@ -616,7 +616,7 @@ namespace IceInternal } protected override bool exceptionImpl(Ice.Exception ex) { - if(proxy_.reference__().getInvocationTimeout() != -1) + if(proxy_.iceReference().getInvocationTimeout() != -1) { instance_.timer().cancel(this); } @@ -625,7 +625,7 @@ namespace IceInternal protected override bool responseImpl(bool ok) { - if(proxy_.reference__().getInvocationTimeout() != -1) + if(proxy_.iceReference().getInvocationTimeout() != -1) { instance_.timer().cancel(this); } @@ -634,7 +634,7 @@ namespace IceInternal public void runTimerTask() { - if(proxy_.reference__().getInvocationTimeout() == -2) + if(proxy_.iceReference().getInvocationTimeout() == -2) { cancel(new Ice.ConnectionTimeoutException()); } @@ -661,21 +661,21 @@ namespace IceInternal Ice.OutputStream os = null, Ice.InputStream iss = null) : base(prx, completionCallback, os, iss) { - encoding_ = Protocol.getCompatibleEncoding(proxy_.reference__().getEncoding()); + encoding_ = Protocol.getCompatibleEncoding(proxy_.iceReference().getEncoding()); synchronous_ = false; } public void prepare(string operation, Ice.OperationMode mode, Dictionary<string, string> context, bool synchronous) { - Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(proxy_.reference__().getProtocol())); + Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(proxy_.iceReference().getProtocol())); mode_ = mode; synchronous_ = synchronous; observer_ = ObserverHelper.get(proxy_, operation, context); - switch(proxy_.reference__().getMode()) + switch(proxy_.iceReference().getMode()) { case Reference.Mode.ModeTwoway: case Reference.Mode.ModeOneway: @@ -688,14 +688,14 @@ namespace IceInternal case Reference.Mode.ModeBatchOneway: case Reference.Mode.ModeBatchDatagram: { - proxy_.getBatchRequestQueue__().prepareBatchRequest(os_); + proxy_.iceGetBatchRequestQueue().prepareBatchRequest(os_); break; } } - Reference rf = proxy_.reference__(); + Reference rf = proxy_.iceReference(); - rf.getIdentity().write__(os_); + rf.getIdentity().iceWrite(os_); // // For compatibility with the old FacetPath. @@ -786,7 +786,7 @@ namespace IceInternal case ReplyStatus.replyOperationNotExist: { Ice.Identity ident = new Ice.Identity(); - ident.read__(is_); + ident.iceRead(is_); // // For compatibility with the old FacetPath. @@ -904,7 +904,7 @@ namespace IceInternal public override int invokeCollocated(CollocatedRequestHandler handler) { // The stream cannot be cached if the proxy is not a twoway or there is an invocation timeout set. - if(!proxy_.ice_isTwoway() || proxy_.reference__().getInvocationTimeout() != -1) + if(!proxy_.ice_isTwoway() || proxy_.iceReference().getInvocationTimeout() != -1) { // Disable caching by marking the streams as cached! state_ |= StateCachedBuffers; @@ -914,7 +914,7 @@ namespace IceInternal public new void abort(Ice.Exception ex) { - Reference.Mode mode = proxy_.reference__().getMode(); + Reference.Mode mode = proxy_.iceReference().getMode(); if(mode == Reference.Mode.ModeBatchOneway || mode == Reference.Mode.ModeBatchDatagram) { // @@ -922,7 +922,7 @@ namespace IceInternal // must notify the connection about that we give up ownership // of the batch stream. // - proxy_.getBatchRequestQueue__().abortBatchRequest(os_); + proxy_.iceGetBatchRequestQueue().abortBatchRequest(os_); } base.abort(ex); @@ -930,11 +930,11 @@ namespace IceInternal public void invoke(string operation) { - Reference.Mode mode = proxy_.reference__().getMode(); + Reference.Mode mode = proxy_.iceReference().getMode(); if(mode == Reference.Mode.ModeBatchOneway || mode == Reference.Mode.ModeBatchDatagram) { sentSynchronously_ = true; - proxy_.getBatchRequestQueue__().finishBatchRequest(os_, proxy_, operation); + proxy_.iceGetBatchRequestQueue().finishBatchRequest(os_, proxy_, operation); responseImpl(true); return; // Don't call sent/completed callback for batch AMI requests } @@ -995,7 +995,7 @@ namespace IceInternal public override void cacheMessageBuffers() { - if(proxy_.reference__().getInstance().cacheMessageBuffers() > 0) + if(proxy_.iceReference().getInstance().cacheMessageBuffers() > 0) { lock(this) { @@ -1048,7 +1048,7 @@ namespace IceInternal base.invoke(operation, mode, format, context, synchronous, write); } - public T result__(bool ok) + public T getResult(bool ok) { try { @@ -1138,9 +1138,9 @@ namespace IceInternal public void invoke(string operation) { - Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(proxy_.reference__().getProtocol())); + Protocol.checkSupportedProtocol(Protocol.getCompatibleProtocol(proxy_.iceReference().getProtocol())); observer_ = ObserverHelper.get(proxy_, operation, null); - _batchRequestNum = proxy_.getBatchRequestQueue__().swap(os_); + _batchRequestNum = proxy_.iceGetBatchRequestQueue().swap(os_); invokeImpl(true); // userThread = true } @@ -1440,7 +1440,7 @@ namespace IceInternal public override bool handleResponse(bool ok, OutgoingAsyncBase og) { - SetResult(((OutgoingAsyncT<T>)og).result__(ok)); + SetResult(((OutgoingAsyncT<T>)og).getResult(ok)); return false; } } @@ -1561,7 +1561,7 @@ namespace IceInternal { public ProxyAsyncResultCompletionCallback(Ice.ObjectPrxHelperBase proxy, string operation, object cookie, Ice.AsyncCallback cb) : - base(proxy.ice_getCommunicator(), proxy.reference__().getInstance(), operation, cookie, cb) + base(proxy.ice_getCommunicator(), proxy.iceReference().getInstance(), operation, cookie, cb) { _proxy = proxy; } @@ -1625,7 +1625,7 @@ namespace IceInternal Debug.Assert(r == this); try { - R result = ((OutgoingAsyncT<R>)outgoing_).result__(wait()); + R result = ((OutgoingAsyncT<R>)outgoing_).getResult(wait()); try { _completed(responseCallback_, result); diff --git a/csharp/src/Ice/OutputStream.cs b/csharp/src/Ice/OutputStream.cs index 89f42e694f3..930270c4207 100644 --- a/csharp/src/Ice/OutputStream.cs +++ b/csharp/src/Ice/OutputStream.cs @@ -32,7 +32,7 @@ namespace Ice public OutputStream() { _buf = new IceInternal.Buffer(); - instance_ = null; + _instance = null; _closure = null; _encoding = Util.currentEncoding; _format = FormatType.CompactFormat; @@ -111,12 +111,12 @@ namespace Ice { Debug.Assert(instance != null); - instance_ = instance; + _instance = instance; _buf = buf; _closure = null; _encoding = encoding; - _format = instance_.defaultsAndOverrides().defaultFormat; + _format = _instance.defaultsAndOverrides().defaultFormat; _encapsStack = null; _encapsCache = null; @@ -149,7 +149,7 @@ namespace Ice public IceInternal.Instance instance() { - return instance_; + return _instance; } /// <summary> @@ -200,7 +200,7 @@ namespace Ice /// <param name="other">The other stream.</param> public void swap(OutputStream other) { - Debug.Assert(instance_ == other.instance_); + Debug.Assert(_instance == other._instance); IceInternal.Buffer tmpBuf = other._buf; other._buf = _buf; @@ -343,7 +343,7 @@ namespace Ice _encapsStack.start = _buf.b.position(); writeInt(0); // Placeholder for the encapsulation length. - _encapsStack.encoding.write__(this); + _encapsStack.encoding.iceWrite(this); } /// <summary> @@ -373,7 +373,7 @@ namespace Ice { Protocol.checkSupportedEncoding(encoding); writeInt(6); // Size - encoding.write__(this); + encoding.iceWrite(this); } /// <summary> @@ -1967,12 +1967,12 @@ namespace Ice { if(v != null) { - v.write__(this); + v.iceWrite(this); } else { Identity ident = new Identity(); - ident.write__(this); + ident.iceWrite(this); } } @@ -2160,7 +2160,7 @@ namespace Ice _buf.expand(n); } - private IceInternal.Instance instance_; + private IceInternal.Instance _instance; private IceInternal.Buffer _buf; private object _closure; private FormatType _format; @@ -2258,9 +2258,9 @@ namespace Ice // This allows reading the pending instances even if some part of // the exception was sliced. // - bool usesClasses = v.usesClasses__(); + bool usesClasses = v.iceUsesClasses(); _stream.writeBool(usesClasses); - v.write__(_stream); + v.iceWrite(_stream); if(usesClasses) { writePendingValues(); @@ -2363,7 +2363,7 @@ namespace Ice _stream.instance().initializationData().logger.warning(s); } - p.Key.write__(_stream); + p.Key.iceWrite(_stream); } } _stream.writeSize(0); // Zero marker indicates end of sequence of sequences of instances. @@ -2456,7 +2456,7 @@ namespace Ice internal override void writeException(UserException v) { - v.write__(_stream); + v.iceWrite(_stream); } internal override void startInstance(SliceType sliceType, SlicedData data) @@ -2700,7 +2700,7 @@ namespace Ice } _stream.writeSize(1); // Object instance marker. - v.write__(_stream); + v.iceWrite(_stream); } private sealed class InstanceData @@ -2792,7 +2792,7 @@ namespace Ice if(_encapsStack.format == FormatType.DefaultFormat) { - _encapsStack.format = instance_.defaultsAndOverrides().defaultFormat; + _encapsStack.format = _instance.defaultsAndOverrides().defaultFormat; } if(_encapsStack.encoder == null) // Lazy initialization. @@ -2820,12 +2820,12 @@ namespace Ice /// <param name="outStream">The stream to write to.</param> public abstract void write(OutputStream outStream); - public override void write__(OutputStream os) + public override void iceWrite(OutputStream os) { write(os); } - public override void read__(InputStream istr) + public override void iceRead(InputStream istr) { Debug.Assert(false); } diff --git a/csharp/src/Ice/Proxy.cs b/csharp/src/Ice/Proxy.cs index a155f908c72..6f982179332 100644 --- a/csharp/src/Ice/Proxy.cs +++ b/csharp/src/Ice/Proxy.cs @@ -21,21 +21,21 @@ namespace Ice { /// <summary> /// Delegate for a successful <code>ice_isA</code> invocation. - /// <param name="ret__">True if the remote object supports the type, false otherwise.</param> + /// <param name="ret">True if the remote object supports the type, false otherwise.</param> /// </summary> - public delegate void Callback_Object_ice_isA(bool ret__); + public delegate void Callback_Object_ice_isA(bool ret); /// <summary> /// Delegate for a successful <code>ice_ids</code> invocation. - /// <param name="ret__">The array of Slice type ids supported by the remote object.</param> + /// <param name="ret">The array of Slice type ids supported by the remote object.</param> /// </summary> - public delegate void Callback_Object_ice_ids(string[] ret__); + public delegate void Callback_Object_ice_ids(string[] ret); /// <summary> /// Delegate for a successful <code>ice_id</code> invocation. - /// <param name="ret__">The Slice type id of the most-derived interface supported by the remote object.</param> + /// <param name="ret">The Slice type id of the most-derived interface supported by the remote object.</param> /// </summary> - public delegate void Callback_Object_ice_id(string ret__); + public delegate void Callback_Object_ice_id(string ret); /// <summary> /// Delegate for a successful <code>ice_ping</code> invocation. @@ -44,17 +44,17 @@ namespace Ice /// <summary> /// Delegate for a successful <code>ice_invoke</code> invocation. - /// <param name="ret__">True if the invocation succeeded, or false if the invocation + /// <param name="ret">True if the invocation succeeded, or false if the invocation /// raised a user exception.</param> /// <param name="outEncaps">The encoded out-parameters or user exception.</param> /// </summary> - public delegate void Callback_Object_ice_invoke(bool ret__, byte[] outEncaps); + public delegate void Callback_Object_ice_invoke(bool ret, byte[] outEncaps); /// <summary> /// Delegate for a successful <code>ice_getConnection</code> invocation. - /// <param name="ret__">The connection used by the proxy.</param> + /// <param name="ret">The connection used by the proxy.</param> /// </summary> - public delegate void Callback_Object_ice_getConnection(Connection ret__); + public delegate void Callback_Object_ice_getConnection(Connection ret); /// <summary> /// Value type to allow differenciate between a context that is explicity set to @@ -767,7 +767,7 @@ namespace Ice /// Write a proxy to the output stream. /// </summary> /// <param name="os">Output stream object to write the proxy.</param> - void write__(OutputStream os); + void iceWrite(OutputStream os); } /// <summary> @@ -872,7 +872,7 @@ namespace Ice { try { - return ice_isAAsync(id, context, null, CancellationToken.None, true).Result; + return iceI_ice_isAAsync(id, context, null, CancellationToken.None, true).Result; } catch(AggregateException ex) { @@ -893,15 +893,15 @@ namespace Ice IProgress<bool> progress = null, CancellationToken cancel = new CancellationToken()) { - return ice_isAAsync(id, context, progress, cancel, false); + return iceI_ice_isAAsync(id, context, progress, cancel, false); } private Task<bool> - ice_isAAsync(string id, OptionalContext context, IProgress<bool> progress, CancellationToken cancel, - bool synchronous) + iceI_ice_isAAsync(string id, OptionalContext context, IProgress<bool> progress, CancellationToken cancel, + bool synchronous) { var completed = new OperationTaskCompletionCallback<bool>(progress, cancel); - ice_isA_invoke__(id, context, completed, synchronous); + iceI_ice_isA(id, context, completed, synchronous); return completed.Task; } @@ -914,7 +914,7 @@ namespace Ice /// <returns>An asynchronous result object.</returns> public AsyncResult begin_ice_isA(string id, AsyncCallback callback, object cookie) { - return begin_ice_isA(id, new OptionalContext(), callback, cookie, false); + return iceI_begin_ice_isA(id, new OptionalContext(), callback, cookie, false); } /// <summary> @@ -927,7 +927,7 @@ namespace Ice /// <returns>An asynchronous result object.</returns> public AsyncResult begin_ice_isA(string id, OptionalContext context, AsyncCallback callback, object cookie) { - return begin_ice_isA(id, context, callback, cookie, false); + return iceI_begin_ice_isA(id, context, callback, cookie, false); } /// <summary> @@ -939,10 +939,10 @@ namespace Ice public AsyncResult<Callback_Object_ice_isA> begin_ice_isA(string id, OptionalContext context = new OptionalContext()) { - return begin_ice_isA(id, context, null, null, false); + return iceI_begin_ice_isA(id, context, null, null, false); } - internal const string __ice_isA_name = "ice_isA"; + private const string _ice_isA_name = "ice_isA"; /// <summary> /// Tests whether this object supports a specific Slice interface. @@ -951,13 +951,13 @@ namespace Ice /// <returns>True if the object supports the Slice interface, false otherwise.</returns> public bool end_ice_isA(AsyncResult result) { - var resultI = AsyncResultI.check(result, this, __ice_isA_name); - return ((OutgoingAsyncT<bool>)resultI.OutgoingAsync).result__(resultI.wait()); + var resultI = AsyncResultI.check(result, this, _ice_isA_name); + return ((OutgoingAsyncT<bool>)resultI.OutgoingAsync).getResult(resultI.wait()); } private AsyncResult<Callback_Object_ice_isA> - begin_ice_isA(string id, Dictionary<string, string> context, AsyncCallback callback, object cookie, - bool synchronous) + iceI_begin_ice_isA(string id, Dictionary<string, string> context, AsyncCallback callback, object cookie, + bool synchronous) { var completed = new OperationAsyncResultCompletionCallback<Callback_Object_ice_isA, bool>( (Callback_Object_ice_isA cb, bool result) => @@ -966,18 +966,18 @@ namespace Ice { cb.Invoke(result); } - }, this, __ice_isA_name, cookie, callback); - ice_isA_invoke__(id, context, completed, synchronous); + }, this, _ice_isA_name, cookie, callback); + iceI_ice_isA(id, context, completed, synchronous); return completed; } - private void ice_isA_invoke__(string id, - Dictionary<string, string> context, - OutgoingAsyncCompletionCallback completed, - bool synchronous) + private void iceI_ice_isA(string id, + Dictionary<string, string> context, + OutgoingAsyncCompletionCallback completed, + bool synchronous) { - checkAsyncTwowayOnly__(__ice_isA_name); - getOutgoingAsync<bool>(completed).invoke(__ice_isA_name, + iceCheckAsyncTwowayOnly(_ice_isA_name); + getOutgoingAsync<bool>(completed).invoke(_ice_isA_name, OperationMode.Nonmutating, FormatType.DefaultFormat, context, @@ -995,7 +995,7 @@ namespace Ice { try { - ice_pingAsync(context, null, CancellationToken.None, true).Wait(); + iceI_ice_pingAsync(context, null, CancellationToken.None, true).Wait(); } catch(AggregateException ex) { @@ -1014,14 +1014,14 @@ namespace Ice IProgress<bool> progress = null, CancellationToken cancel = new CancellationToken()) { - return ice_pingAsync(context, progress, cancel, false); + return iceI_ice_pingAsync(context, progress, cancel, false); } private Task - ice_pingAsync(OptionalContext context, IProgress<bool> progress, CancellationToken cancel, bool synchronous) + iceI_ice_pingAsync(OptionalContext context, IProgress<bool> progress, CancellationToken cancel, bool synchronous) { var completed = new OperationTaskCompletionCallback<object>(progress, cancel); - ice_ping_invoke__(context, completed, synchronous); + iceI_ice_ping(context, completed, synchronous); return completed.Task; } @@ -1033,7 +1033,7 @@ namespace Ice /// <returns>An asynchronous result object.</returns> public AsyncResult begin_ice_ping(AsyncCallback callback, object cookie) { - return begin_ice_ping(new OptionalContext(), callback, cookie, false); + return iceI_begin_ice_ping(new OptionalContext(), callback, cookie, false); } /// <summary> @@ -1045,7 +1045,7 @@ namespace Ice /// <returns>An asynchronous result object.</returns> public AsyncResult begin_ice_ping(OptionalContext context, AsyncCallback callback, object cookie) { - return begin_ice_ping(context, callback, cookie, false); + return iceI_begin_ice_ping(context, callback, cookie, false); } /// <summary> @@ -1056,10 +1056,10 @@ namespace Ice public AsyncResult<Callback_Object_ice_ping> begin_ice_ping(OptionalContext context = new OptionalContext()) { - return begin_ice_ping(context, null, null, false); + return iceI_begin_ice_ping(context, null, null, false); } - internal const string __ice_ping_name = "ice_ping"; + private const string _ice_ping_name = "ice_ping"; /// <summary> /// Tests whether the target object of this proxy can be reached. @@ -1067,14 +1067,14 @@ namespace Ice /// <param name="result">The asynchronous result object returned by <code>begin_ice_ping</code>.</param> public void end_ice_ping(AsyncResult result) { - var resultI = AsyncResultI.check(result, this, __ice_ping_name); - ((OutgoingAsyncT<object>)resultI.OutgoingAsync).result__(resultI.wait()); + var resultI = AsyncResultI.check(result, this, _ice_ping_name); + ((OutgoingAsyncT<object>)resultI.OutgoingAsync).getResult(resultI.wait()); } - private AsyncResult<Callback_Object_ice_ping> begin_ice_ping(Dictionary<string, string> context, - AsyncCallback callback, - object cookie, - bool synchronous) + private AsyncResult<Callback_Object_ice_ping> iceI_begin_ice_ping(Dictionary<string, string> context, + AsyncCallback callback, + object cookie, + bool synchronous) { var completed = new OperationAsyncResultCompletionCallback<Callback_Object_ice_ping, object>( (Callback_Object_ice_ping cb, object result) => @@ -1083,15 +1083,15 @@ namespace Ice { cb.Invoke(); } - }, this, __ice_ping_name, cookie, callback); - ice_ping_invoke__(context, completed, synchronous); + }, this, _ice_ping_name, cookie, callback); + iceI_ice_ping(context, completed, synchronous); return completed; } - private void ice_ping_invoke__(Dictionary<string, string> context, OutgoingAsyncCompletionCallback completed, + private void iceI_ice_ping(Dictionary<string, string> context, OutgoingAsyncCompletionCallback completed, bool synchronous) { - getOutgoingAsync<object>(completed).invoke(__ice_ping_name, + getOutgoingAsync<object>(completed).invoke(_ice_ping_name, OperationMode.Nonmutating, FormatType.DefaultFormat, context, @@ -1108,7 +1108,7 @@ namespace Ice { try { - return ice_idsAsync(context, null, CancellationToken.None, true).Result; + return iceI_ice_idsAsync(context, null, CancellationToken.None, true).Result; } catch(AggregateException ex) { @@ -1128,14 +1128,14 @@ namespace Ice IProgress<bool> progress = null, CancellationToken cancel = new CancellationToken()) { - return ice_idsAsync(context, progress, cancel, false); + return iceI_ice_idsAsync(context, progress, cancel, false); } - private Task<string[]> ice_idsAsync(OptionalContext context, IProgress<bool> progress, CancellationToken cancel, - bool synchronous) + private Task<string[]> iceI_ice_idsAsync(OptionalContext context, IProgress<bool> progress, CancellationToken cancel, + bool synchronous) { var completed = new OperationTaskCompletionCallback<string[]>(progress, cancel); - ice_ids_invoke__(context, completed, false); + iceI_ice_ids(context, completed, false); return completed.Task; } @@ -1147,7 +1147,7 @@ namespace Ice /// <returns>An asynchronous result object.</returns> public AsyncResult begin_ice_ids(AsyncCallback callback, object cookie) { - return begin_ice_ids(new OptionalContext(), callback, cookie, false); + return iceI_begin_ice_ids(new OptionalContext(), callback, cookie, false); } /// <summary> @@ -1160,19 +1160,19 @@ namespace Ice public AsyncResult begin_ice_ids(OptionalContext context, AsyncCallback callback, object cookie) { - return begin_ice_ids(context, callback, cookie, false); + return iceI_begin_ice_ids(context, callback, cookie, false); } public AsyncResult<Callback_Object_ice_ids> begin_ice_ids(OptionalContext context = new OptionalContext()) { - return begin_ice_ids(context, null, null, false); + return iceI_begin_ice_ids(context, null, null, false); } - internal const string __ice_ids_name = "ice_ids"; + private const string _ice_ids_name = "ice_ids"; private AsyncResult<Callback_Object_ice_ids> - begin_ice_ids(Dictionary<string, string> context, AsyncCallback callback, object cookie, bool synchronous) + iceI_begin_ice_ids(Dictionary<string, string> context, AsyncCallback callback, object cookie, bool synchronous) { var completed = new OperationAsyncResultCompletionCallback<Callback_Object_ice_ids, string[]>( (Callback_Object_ice_ids cb, string[] result) => @@ -1181,8 +1181,8 @@ namespace Ice { cb.Invoke(result); } - }, this, __ice_ids_name, cookie, callback); - ice_ids_invoke__(context, completed, synchronous); + }, this, _ice_ids_name, cookie, callback); + iceI_ice_ids(context, completed, synchronous); return completed; } @@ -1194,15 +1194,15 @@ namespace Ice /// order. The first element of the returned array is always ::Ice::Object.</returns> public string[] end_ice_ids(AsyncResult result) { - var resultI = AsyncResultI.check(result, this, __ice_ids_name); - return ((OutgoingAsyncT<string[]>)resultI.OutgoingAsync).result__(resultI.wait()); + var resultI = AsyncResultI.check(result, this, _ice_ids_name); + return ((OutgoingAsyncT<string[]>)resultI.OutgoingAsync).getResult(resultI.wait()); } - private void ice_ids_invoke__(Dictionary<string, string> context, OutgoingAsyncCompletionCallback completed, - bool synchronous) + private void iceI_ice_ids(Dictionary<string, string> context, OutgoingAsyncCompletionCallback completed, + bool synchronous) { - checkAsyncTwowayOnly__(__ice_ids_name); - getOutgoingAsync<string[]>(completed).invoke(__ice_ids_name, + iceCheckAsyncTwowayOnly(_ice_ids_name); + getOutgoingAsync<string[]>(completed).invoke(_ice_ids_name, OperationMode.Nonmutating, FormatType.DefaultFormat, context, @@ -1218,7 +1218,7 @@ namespace Ice { try { - return ice_idAsync(context, null, CancellationToken.None, true).Result; + return iceI_ice_idAsync(context, null, CancellationToken.None, true).Result; } catch(AggregateException ex) { @@ -1237,14 +1237,14 @@ namespace Ice IProgress<bool> progress = null, CancellationToken cancel = new CancellationToken()) { - return ice_idAsync(context, progress, cancel, false); + return iceI_ice_idAsync(context, progress, cancel, false); } private Task<string> - ice_idAsync(OptionalContext context, IProgress<bool> progress, CancellationToken cancel, bool synchronous) + iceI_ice_idAsync(OptionalContext context, IProgress<bool> progress, CancellationToken cancel, bool synchronous) { var completed = new OperationTaskCompletionCallback<string>(progress, cancel); - ice_id_invoke__(context, completed, synchronous); + iceI_ice_id(context, completed, synchronous); return completed.Task; } @@ -1256,7 +1256,7 @@ namespace Ice /// <returns>An asynchronous result object.</returns> public AsyncResult begin_ice_id(AsyncCallback callback, object cookie) { - return begin_ice_id(new OptionalContext(), callback, cookie, false); + return iceI_begin_ice_id(new OptionalContext(), callback, cookie, false); } /// <summary> @@ -1269,7 +1269,7 @@ namespace Ice public AsyncResult begin_ice_id(OptionalContext context, AsyncCallback callback, object cookie) { - return begin_ice_id(context, callback, cookie, false); + return iceI_begin_ice_id(context, callback, cookie, false); } /// <summary> @@ -1280,13 +1280,13 @@ namespace Ice public AsyncResult<Callback_Object_ice_id> begin_ice_id(OptionalContext context = new OptionalContext()) { - return begin_ice_id(context, null, null, false); + return iceI_begin_ice_id(context, null, null, false); } - internal const string __ice_id_name = "ice_id"; + private const string _ice_id_name = "ice_id"; private AsyncResult<Callback_Object_ice_id> - begin_ice_id(Dictionary<string, string> context, AsyncCallback callback, object cookie, bool synchronous) + iceI_begin_ice_id(Dictionary<string, string> context, AsyncCallback callback, object cookie, bool synchronous) { var completed = new OperationAsyncResultCompletionCallback<Callback_Object_ice_id, string>( (Callback_Object_ice_id cb, string result) => @@ -1295,8 +1295,8 @@ namespace Ice { cb.Invoke(result); } - }, this, __ice_id_name, cookie, callback); - ice_id_invoke__(context, completed, synchronous); + }, this, _ice_id_name, cookie, callback); + iceI_ice_id(context, completed, synchronous); return completed; } @@ -1307,16 +1307,16 @@ namespace Ice /// <returns>The Slice type ID of the most-derived interface.</returns> public string end_ice_id(AsyncResult result) { - var resultI = AsyncResultI.check(result, this, __ice_id_name); - return ((OutgoingAsyncT<string>)resultI.OutgoingAsync).result__(resultI.wait()); + var resultI = AsyncResultI.check(result, this, _ice_id_name); + return ((OutgoingAsyncT<string>)resultI.OutgoingAsync).getResult(resultI.wait()); } - private void ice_id_invoke__(Dictionary<string, string> context, - OutgoingAsyncCompletionCallback completed, - bool synchronous) + private void iceI_ice_id(Dictionary<string, string> context, + OutgoingAsyncCompletionCallback completed, + bool synchronous) { - checkAsyncTwowayOnly__(__ice_id_name); - getOutgoingAsync<string>(completed).invoke(__ice_id_name, + iceCheckAsyncTwowayOnly(_ice_id_name); + getOutgoingAsync<string>(completed).invoke(_ice_id_name, OperationMode.Nonmutating, FormatType.DefaultFormat, context, @@ -1346,7 +1346,7 @@ namespace Ice { try { - var result = ice_invokeAsync(operation, mode, inEncaps, context, null, CancellationToken.None, true).Result; + var result = iceI_ice_invokeAsync(operation, mode, inEncaps, context, null, CancellationToken.None, true).Result; outEncaps = result.outEncaps; return result.returnValue; } @@ -1374,20 +1374,20 @@ namespace Ice IProgress<bool> progress = null, CancellationToken cancel = new CancellationToken()) { - return ice_invokeAsync(operation, mode, inEncaps, context, progress, cancel, false); + return iceI_ice_invokeAsync(operation, mode, inEncaps, context, progress, cancel, false); } private Task<Object_Ice_invokeResult> - ice_invokeAsync(string operation, - OperationMode mode, - byte[] inEncaps, - OptionalContext context, - IProgress<bool> progress, - CancellationToken cancel, - bool synchronous) + iceI_ice_invokeAsync(string operation, + OperationMode mode, + byte[] inEncaps, + OptionalContext context, + IProgress<bool> progress, + CancellationToken cancel, + bool synchronous) { var completed = new InvokeTaskCompletionCallback(progress, cancel); - ice_invoke_invoke__(operation, mode, inEncaps, context, completed, synchronous); + iceI_ice_invoke(operation, mode, inEncaps, context, completed, synchronous); return completed.Task; } @@ -1407,7 +1407,7 @@ namespace Ice AsyncCallback callback, object cookie) { - return begin_ice_invoke(operation, mode, inEncaps, new OptionalContext(), callback, cookie, false); + return iceI_begin_ice_invoke(operation, mode, inEncaps, new OptionalContext(), callback, cookie, false); } /// <summary> @@ -1428,7 +1428,7 @@ namespace Ice AsyncCallback callback, object cookie) { - return begin_ice_invoke(operation, mode, inEncaps, context, callback, cookie, false); + return iceI_begin_ice_invoke(operation, mode, inEncaps, context, callback, cookie, false); } /// <summary> @@ -1445,10 +1445,10 @@ namespace Ice byte[] inEncaps, OptionalContext context = new OptionalContext()) { - return begin_ice_invoke(operation, mode, inEncaps, context, null, null, false); + return iceI_begin_ice_invoke(operation, mode, inEncaps, context, null, null, false); } - internal const string __ice_invoke_name = "ice_invoke"; + private const string _ice_invoke_name = "ice_invoke"; /// <summary> /// Completes a dynamic invocation. @@ -1462,32 +1462,32 @@ namespace Ice /// it throws it directly.</returns> public bool end_ice_invoke(out byte[] outEncaps, AsyncResult result) { - var resultI = AsyncResultI.check(result, this, __ice_invoke_name); - var r = ((InvokeOutgoingAsyncT)resultI.OutgoingAsync).result__(resultI.wait()); + var resultI = AsyncResultI.check(result, this, _ice_invoke_name); + var r = ((InvokeOutgoingAsyncT)resultI.OutgoingAsync).getResult(resultI.wait()); outEncaps = r.outEncaps; return r.returnValue; } private AsyncResult<Callback_Object_ice_invoke> - begin_ice_invoke(string operation, - OperationMode mode, - byte[] inEncaps, - Dictionary<string, string> context, - AsyncCallback callback, - object cookie, - bool synchronous) - { - var completed = new InvokeAsyncResultCompletionCallback(this, __ice_invoke_name, cookie, callback); - ice_invoke_invoke__(operation, mode, inEncaps, context, completed, synchronous); + iceI_begin_ice_invoke(string operation, + OperationMode mode, + byte[] inEncaps, + Dictionary<string, string> context, + AsyncCallback callback, + object cookie, + bool synchronous) + { + var completed = new InvokeAsyncResultCompletionCallback(this, _ice_invoke_name, cookie, callback); + iceI_ice_invoke(operation, mode, inEncaps, context, completed, synchronous); return completed; } - private void ice_invoke_invoke__(string operation, - OperationMode mode, - byte[] inEncaps, - Dictionary<string, string> context, - OutgoingAsyncCompletionCallback completed, - bool synchronous) + private void iceI_ice_invoke(string operation, + OperationMode mode, + byte[] inEncaps, + Dictionary<string, string> context, + OutgoingAsyncCompletionCallback completed, + bool synchronous) { getInvokeOutgoingAsync(completed).invoke(operation, mode, inEncaps, context, synchronous); } @@ -2186,7 +2186,7 @@ namespace Ice var outgoing = new ProxyGetConnection(this, completed); try { - outgoing.invoke(__ice_getConnection_name); + outgoing.invoke(_ice_getConnection_name); } catch(Exception ex) { @@ -2200,7 +2200,7 @@ namespace Ice return begin_ice_getConnectionInternal(null, null); } - internal const string __ice_getConnection_name = "ice_getConnection"; + private const string _ice_getConnection_name = "ice_getConnection"; public AsyncResult begin_ice_getConnection(AsyncCallback cb, object cookie) { @@ -2209,7 +2209,7 @@ namespace Ice public Connection end_ice_getConnection(AsyncResult r) { - var resultI = AsyncResultI.check(r, this, __ice_getConnection_name); + var resultI = AsyncResultI.check(r, this, _ice_getConnection_name); resultI.wait(); return ((ProxyGetConnection)resultI.OutgoingAsync).getConnection(); } @@ -2217,11 +2217,11 @@ namespace Ice private AsyncResult<Callback_Object_ice_getConnection> begin_ice_getConnectionInternal(AsyncCallback callback, object cookie) { - var completed = new ProxyGetConnectionAsyncCallback(this, __ice_getConnection_name, cookie, callback); + var completed = new ProxyGetConnectionAsyncCallback(this, _ice_getConnection_name, cookie, callback); var outgoing = new ProxyGetConnection(this, completed); try { - outgoing.invoke(__ice_getConnection_name); + outgoing.invoke(_ice_getConnection_name); } catch(Exception ex) { @@ -2274,7 +2274,7 @@ namespace Ice } } - internal const string __ice_flushBatchRequests_name = "ice_flushBatchRequests"; + internal const string _ice_flushBatchRequests_name = "ice_flushBatchRequests"; public Task ice_flushBatchRequestsAsync(IProgress<bool> progress = null, CancellationToken cancel = new CancellationToken()) @@ -2283,7 +2283,7 @@ namespace Ice var outgoing = new ProxyFlushBatchAsync(this, completed); try { - outgoing.invoke(__ice_flushBatchRequests_name); + outgoing.invoke(_ice_flushBatchRequests_name); } catch(Exception ex) { @@ -2298,7 +2298,7 @@ namespace Ice string operation, object cookie, AsyncCallback callback) : - base(proxy.ice_getCommunicator(), ((ObjectPrxHelperBase)proxy).reference__().getInstance(), + base(proxy.ice_getCommunicator(), ((ObjectPrxHelperBase)proxy).iceReference().getInstance(), operation, cookie, callback) { _proxy = proxy; @@ -2332,11 +2332,11 @@ namespace Ice public AsyncResult begin_ice_flushBatchRequests(AsyncCallback cb = null, object cookie = null) { - var completed = new ProxyFlushBatchRequestsAsyncCallback(this, __ice_flushBatchRequests_name, cookie, cb); + var completed = new ProxyFlushBatchRequestsAsyncCallback(this, _ice_flushBatchRequests_name, cookie, cb); var outgoing = new ProxyFlushBatchAsync(this, completed); try { - outgoing.invoke(__ice_flushBatchRequests_name); + outgoing.invoke(_ice_flushBatchRequests_name); } catch(Exception ex) { @@ -2347,7 +2347,7 @@ namespace Ice public void end_ice_flushBatchRequests(AsyncResult r) { - var resultI = AsyncResultI.check(r, this, __ice_flushBatchRequests_name); + var resultI = AsyncResultI.check(r, this, _ice_flushBatchRequests_name); resultI.wait(); } @@ -2399,18 +2399,18 @@ namespace Ice return !Equals(lhs, rhs); } - public void write__(OutputStream os) + public void iceWrite(OutputStream os) { - _reference.getIdentity().write__(os); + _reference.getIdentity().iceWrite(os); _reference.streamWrite(os); } - public Reference reference__() + public Reference iceReference() { return _reference; } - public void copyFrom__(ObjectPrx from) + public void iceCopyFrom(ObjectPrx from) { lock(from) { @@ -2420,10 +2420,10 @@ namespace Ice } } - public int handleException__(Exception ex, RequestHandler handler, OperationMode mode, bool sent, + public int iceHandleException(Exception ex, RequestHandler handler, OperationMode mode, bool sent, ref int cnt) { - updateRequestHandler__(handler, null); // Clear the request handler + iceUpdateRequestHandler(handler, null); // Clear the request handler // // We only retry local exception, system exceptions aren't retried. @@ -2465,7 +2465,7 @@ namespace Ice } } - public void checkAsyncTwowayOnly__(string name) + public void iceCheckAsyncTwowayOnly(string name) { // // No mutex lock necessary, there is nothing mutable in this @@ -2478,7 +2478,7 @@ namespace Ice } } - public RequestHandler getRequestHandler__() + public RequestHandler iceGetRequestHandler() { if(_reference.getCacheConnection()) { @@ -2494,7 +2494,7 @@ namespace Ice } public BatchRequestQueue - getBatchRequestQueue__() + iceGetBatchRequestQueue() { lock(this) { @@ -2507,7 +2507,7 @@ namespace Ice } public RequestHandler - setRequestHandler__(RequestHandler handler) + iceSetRequestHandler(RequestHandler handler) { if(_reference.getCacheConnection()) { @@ -2523,7 +2523,7 @@ namespace Ice return handler; } - public void updateRequestHandler__(RequestHandler previous, RequestHandler handler) + public void iceUpdateRequestHandler(RequestHandler previous, RequestHandler handler) { if(_reference.getCacheConnection() && previous != null) { @@ -2607,22 +2607,22 @@ namespace Ice } public Object_Ice_invokeResult - result__(bool ok) + getResult(bool ok) { try { - var ret__ = new Object_Ice_invokeResult(); + var ret = new Object_Ice_invokeResult(); EncodingVersion encoding; - if(proxy_.reference__().getMode() == Reference.Mode.ModeTwoway) + if(proxy_.iceReference().getMode() == Reference.Mode.ModeTwoway) { - ret__.outEncaps = is_.readEncapsulation(out encoding); + ret.outEncaps = is_.readEncapsulation(out encoding); } else { - ret__.outEncaps = null; + ret.outEncaps = null; } - ret__.returnValue = ok; - return ret__; + ret.returnValue = ok; + return ret; } finally { @@ -2648,7 +2648,7 @@ namespace Ice Debug.Assert(r == this); try { - Object_Ice_invokeResult result = ((InvokeOutgoingAsyncT)outgoing_).result__(wait()); + Object_Ice_invokeResult result = ((InvokeOutgoingAsyncT)outgoing_).getResult(wait()); try { if(responseCallback_ != null) @@ -2692,7 +2692,7 @@ namespace Ice public override bool handleResponse(bool ok, OutgoingAsyncBase og) { - SetResult(((InvokeOutgoingAsyncT)og).result__(ok)); + SetResult(((InvokeOutgoingAsyncT)og).getResult(ok)); return false; } } @@ -2829,7 +2829,7 @@ namespace Ice var ok = bb.ice_isA("::Ice::Object"); Debug.Assert(ok); ObjectPrxHelper h = new ObjectPrxHelper(); - h.copyFrom__(bb); + h.iceCopyFrom(bb); d = h; } catch(FacetNotExistException) @@ -2860,7 +2860,7 @@ namespace Ice var ok = bb.ice_isA("::Ice::Object", ctx); Debug.Assert(ok); ObjectPrxHelper h = new ObjectPrxHelper(); - h.copyFrom__(bb); + h.iceCopyFrom(bb); d = h; } catch(FacetNotExistException) @@ -2895,7 +2895,7 @@ namespace Ice { var bb = b.ice_facet(f); var h = new ObjectPrxHelper(); - h.copyFrom__(bb); + h.iceCopyFrom(bb); d = h; } return d; diff --git a/csharp/src/Ice/ProxyFactory.cs b/csharp/src/Ice/ProxyFactory.cs index 11a204f7a10..159468ba8e3 100644 --- a/csharp/src/Ice/ProxyFactory.cs +++ b/csharp/src/Ice/ProxyFactory.cs @@ -17,7 +17,7 @@ namespace IceInternal { public Ice.ObjectPrx stringToProxy(string str) { - Reference r = instance_.referenceFactory().create(str, null); + Reference r = _instance.referenceFactory().create(str, null); return referenceToProxy(r); } @@ -26,7 +26,7 @@ namespace IceInternal if(proxy != null) { Ice.ObjectPrxHelperBase h = (Ice.ObjectPrxHelperBase) proxy; - return h.reference__().ToString(); + return h.iceReference().ToString(); } else { @@ -36,8 +36,8 @@ namespace IceInternal public Ice.ObjectPrx propertyToProxy(string prefix) { - string proxy = instance_.initializationData().properties.getProperty(prefix); - Reference r = instance_.referenceFactory().create(proxy, prefix); + string proxy = _instance.initializationData().properties.getProperty(prefix); + Reference r = _instance.referenceFactory().create(proxy, prefix); return referenceToProxy(r); } @@ -46,7 +46,7 @@ namespace IceInternal if(proxy != null) { Ice.ObjectPrxHelperBase h = (Ice.ObjectPrxHelperBase) proxy; - return h.reference__().toProperty(prefix); + return h.iceReference().toProperty(prefix); } else { @@ -57,9 +57,9 @@ namespace IceInternal public Ice.ObjectPrx streamToProxy(Ice.InputStream s) { Ice.Identity ident = new Ice.Identity(); - ident.read__(s); + ident.iceRead(s); - Reference r = instance_.referenceFactory().create(ident, s); + Reference r = _instance.referenceFactory().create(ident, s); return referenceToProxy(r); } @@ -79,8 +79,8 @@ namespace IceInternal public int checkRetryAfterException(Ice.LocalException ex, Reference @ref, ref int cnt) { - TraceLevels traceLevels = instance_.traceLevels(); - Ice.Logger logger = instance_.initializationData().logger; + TraceLevels traceLevels = _instance.traceLevels(); + Ice.Logger logger = _instance.initializationData().logger; // // We don't retry batch requests because the exception might have caused @@ -233,9 +233,9 @@ namespace IceInternal // internal ProxyFactory(Instance instance) { - instance_ = instance; + _instance = instance; - string[] arr = instance_.initializationData().properties.getPropertyAsList("Ice.RetryIntervals"); + string[] arr = _instance.initializationData().properties.getPropertyAsList("Ice.RetryIntervals"); if(arr.Length > 0) { @@ -273,7 +273,7 @@ namespace IceInternal } } - private Instance instance_; + private Instance _instance; private int[] _retryIntervals; } diff --git a/csharp/src/Ice/Reference.cs b/csharp/src/Ice/Reference.cs index 19493d35d0a..8ae5d9e78bf 100644 --- a/csharp/src/Ice/Reference.cs +++ b/csharp/src/Ice/Reference.cs @@ -34,7 +34,7 @@ namespace IceInternal public Mode getMode() { - return mode_; + return _mode; } public bool getSecure() @@ -44,43 +44,43 @@ namespace IceInternal public Ice.ProtocolVersion getProtocol() { - return protocol_; + return _protocol; } public Ice.EncodingVersion getEncoding() { - return encoding_; + return _encoding; } public Ice.Identity getIdentity() { - return identity_; + return _identity; } public string getFacet() { - return facet_; + return _facet; } public Instance getInstance() { - return instance_; + return _instance; } public Dictionary<string, string> getContext() { - return context_; + return _context; } public int getInvocationTimeout() { - return invocationTimeout_; + return _invocationTimeout; } public Ice.Communicator getCommunicator() { - return communicator_; + return _communicator; } public abstract EndpointI[] getEndpoints(); @@ -105,26 +105,26 @@ namespace IceInternal { newContext = _emptyContext; } - Reference r = instance_.referenceFactory().copy(this); + Reference r = _instance.referenceFactory().copy(this); if(newContext.Count == 0) { - r.context_ = _emptyContext; + r._context = _emptyContext; } else { - r.context_ = new Dictionary<string, string>(newContext); + r._context = new Dictionary<string, string>(newContext); } return r; } public Reference changeMode(Mode newMode) { - if(newMode == mode_) + if(newMode == _mode) { return this; } - Reference r = instance_.referenceFactory().copy(this); - r.mode_ = newMode; + Reference r = _instance.referenceFactory().copy(this); + r._mode = newMode; return r; } @@ -134,52 +134,52 @@ namespace IceInternal { return this; } - Reference r = instance_.referenceFactory().copy(this); + Reference r = _instance.referenceFactory().copy(this); r.secure_ = newSecure; return r; } public Reference changeIdentity(Ice.Identity newIdentity) { - if(newIdentity.Equals(identity_)) + if(newIdentity.Equals(_identity)) { return this; } - Reference r = instance_.referenceFactory().copy(this); - r.identity_ = newIdentity; // Identity is a value type, therefore a copy of newIdentity is made. + Reference r = _instance.referenceFactory().copy(this); + r._identity = newIdentity; // Identity is a value type, therefore a copy of newIdentity is made. return r; } public Reference changeFacet(string newFacet) { - if(newFacet.Equals(facet_)) + if(newFacet.Equals(_facet)) { return this; } - Reference r = instance_.referenceFactory().copy(this); - r.facet_ = newFacet; + Reference r = _instance.referenceFactory().copy(this); + r._facet = newFacet; return r; } public Reference changeInvocationTimeout(int newTimeout) { - if(newTimeout == invocationTimeout_) + if(newTimeout == _invocationTimeout) { return this; } - Reference r = instance_.referenceFactory().copy(this); - r.invocationTimeout_ = newTimeout; + Reference r = _instance.referenceFactory().copy(this); + r._invocationTimeout = newTimeout; return r; } public virtual Reference changeEncoding(Ice.EncodingVersion newEncoding) { - if(newEncoding.Equals(encoding_)) + if(newEncoding.Equals(_encoding)) { return this; } - Reference r = instance_.referenceFactory().copy(this); - r.encoding_ = newEncoding; + Reference r = _instance.referenceFactory().copy(this); + r._encoding = newEncoding; return r; } @@ -190,7 +190,7 @@ namespace IceInternal return this; } - Reference r = instance_.referenceFactory().copy(this); + Reference r = _instance.referenceFactory().copy(this); r.compress_ = newCompress; r.overrideCompress_ = true; return r; @@ -218,19 +218,19 @@ namespace IceInternal return hashValue_; } int h = 5381; - IceInternal.HashUtil.hashAdd(ref h, mode_); + IceInternal.HashUtil.hashAdd(ref h, _mode); IceInternal.HashUtil.hashAdd(ref h, secure_); - IceInternal.HashUtil.hashAdd(ref h, identity_); - IceInternal.HashUtil.hashAdd(ref h, context_); - IceInternal.HashUtil.hashAdd(ref h, facet_); + IceInternal.HashUtil.hashAdd(ref h, _identity); + IceInternal.HashUtil.hashAdd(ref h, _context); + IceInternal.HashUtil.hashAdd(ref h, _facet); IceInternal.HashUtil.hashAdd(ref h, overrideCompress_); if(overrideCompress_) { IceInternal.HashUtil.hashAdd(ref h, compress_); } - IceInternal.HashUtil.hashAdd(ref h, protocol_); - IceInternal.HashUtil.hashAdd(ref h, encoding_); - IceInternal.HashUtil.hashAdd(ref h, invocationTimeout_); + IceInternal.HashUtil.hashAdd(ref h, _protocol); + IceInternal.HashUtil.hashAdd(ref h, _encoding); + IceInternal.HashUtil.hashAdd(ref h, _invocationTimeout); hashValue_ = h; hashInitialized_ = true; return hashValue_; @@ -253,24 +253,24 @@ namespace IceInternal // // For compatibility with the old FacetPath. // - if(facet_.Length == 0) + if(_facet.Length == 0) { s.writeStringSeq(null); } else { - string[] facetPath = { facet_ }; + string[] facetPath = { _facet }; s.writeStringSeq(facetPath); } - s.writeByte((byte)mode_); + s.writeByte((byte)_mode); s.writeBool(secure_); if(!s.getEncoding().Equals(Ice.Util.Encoding_1_0)) { - protocol_.write__(s); - encoding_.write__(s); + _protocol.iceWrite(s); + _encoding.iceWrite(s); } // Derived class writes the remainder of the reference. @@ -290,14 +290,14 @@ namespace IceInternal // StringBuilder s = new StringBuilder(); - Ice.ToStringMode toStringMode = instance_.toStringMode(); + Ice.ToStringMode toStringMode = _instance.toStringMode(); // // If the encoded identity string contains characters which // the reference parser uses as separators, then we enclose // the identity string in quotes. // - string id = Ice.Util.identityToString(identity_, toStringMode); + string id = Ice.Util.identityToString(_identity, toStringMode); if(IceUtilInternal.StringUtil.findFirstOf(id, " :@") != -1) { s.Append('"'); @@ -309,7 +309,7 @@ namespace IceInternal s.Append(id); } - if(facet_.Length > 0) + if(_facet.Length > 0) { // // If the encoded facet string contains characters which @@ -317,7 +317,7 @@ namespace IceInternal // the facet string in quotes. // s.Append(" -f "); - string fs = IceUtilInternal.StringUtil.escapeString(facet_, "", toStringMode); + string fs = IceUtilInternal.StringUtil.escapeString(_facet, "", toStringMode); if(IceUtilInternal.StringUtil.findFirstOf(fs, " :@") != -1) { s.Append('"'); @@ -330,7 +330,7 @@ namespace IceInternal } } - switch(mode_) + switch(_mode) { case Mode.ModeTwoway: { @@ -368,7 +368,7 @@ namespace IceInternal s.Append(" -s"); } - if(!protocol_.Equals(Ice.Util.Protocol_1_0)) + if(!_protocol.Equals(Ice.Util.Protocol_1_0)) { // // We only print the protocol if it's not 1.0. It's fine as @@ -377,7 +377,7 @@ namespace IceInternal // stringToProxy. // s.Append(" -p "); - s.Append(Ice.Util.protocolVersionToString(protocol_)); + s.Append(Ice.Util.protocolVersionToString(_protocol)); } // @@ -386,7 +386,7 @@ namespace IceInternal // stringToProxy (and won't use Ice.Default.EncodingVersion). // s.Append(" -e "); - s.Append(Ice.Util.encodingVersionToString(encoding_)); + s.Append(Ice.Util.encodingVersionToString(_encoding)); return s.ToString(); @@ -407,7 +407,7 @@ namespace IceInternal Reference r = (Reference)obj; // Guaranteed to succeed. - if(mode_ != r.mode_) + if(_mode != r._mode) { return false; } @@ -417,17 +417,17 @@ namespace IceInternal return false; } - if(!identity_.Equals(r.identity_)) + if(!_identity.Equals(r._identity)) { return false; } - if(!Ice.CollectionComparer.Equals(context_, r.context_)) + if(!Ice.CollectionComparer.Equals(_context, r._context)) { return false; } - if(!facet_.Equals(r.facet_)) + if(!_facet.Equals(r._facet)) { return false; } @@ -441,17 +441,17 @@ namespace IceInternal return false; } - if(!protocol_.Equals(r.protocol_)) + if(!_protocol.Equals(r._protocol)) { return false; } - if(!encoding_.Equals(r.encoding_)) + if(!_encoding.Equals(r._encoding)) { return false; } - if(invocationTimeout_ != r.invocationTimeout_) + if(_invocationTimeout != r._invocationTimeout) { return false; } @@ -471,17 +471,17 @@ namespace IceInternal protected bool hashInitialized_; private static Dictionary<string, string> _emptyContext = new Dictionary<string, string>(); - private Instance instance_; - private Ice.Communicator communicator_; + private Instance _instance; + private Ice.Communicator _communicator; - private Mode mode_; - private Ice.Identity identity_; - private Dictionary<string, string> context_; - private string facet_; + private Mode _mode; + private Ice.Identity _identity; + private Dictionary<string, string> _context; + private string _facet; protected bool secure_; - private Ice.ProtocolVersion protocol_; - private Ice.EncodingVersion encoding_; - private int invocationTimeout_; + private Ice.ProtocolVersion _protocol; + private Ice.EncodingVersion _encoding; + private int _invocationTimeout; protected bool overrideCompress_; protected bool compress_; // Only used if _overrideCompress == true @@ -504,15 +504,15 @@ namespace IceInternal Debug.Assert(identity.category != null); Debug.Assert(facet != null); - instance_ = instance; - communicator_ = communicator; - mode_ = mode; - identity_ = identity; - context_ = context != null ? new Dictionary<string, string>(context) : _emptyContext; - facet_ = facet; - protocol_ = protocol; - encoding_ = encoding; - invocationTimeout_ = invocationTimeout; + _instance = instance; + _communicator = communicator; + _mode = mode; + _identity = identity; + _context = context != null ? new Dictionary<string, string>(context) : _emptyContext; + _facet = facet; + _protocol = protocol; + _encoding = encoding; + _invocationTimeout = invocationTimeout; secure_ = secure; hashInitialized_ = false; overrideCompress_ = false; @@ -728,7 +728,7 @@ namespace IceInternal compress = _fixedConnection.endpoint().compress(); } - return ((Ice.ObjectPrxHelperBase)proxy).setRequestHandler__(new ConnectionRequestHandler(this, + return ((Ice.ObjectPrxHelperBase)proxy).iceSetRequestHandler(new ConnectionRequestHandler(this, _fixedConnection, compress)); } @@ -1090,7 +1090,7 @@ namespace IceInternal if(_routerInfo != null) { Ice.ObjectPrxHelperBase h = (Ice.ObjectPrxHelperBase)_routerInfo.getRouter(); - Dictionary<String, String> routerProperties = h.reference__().toProperty(prefix + ".Router"); + Dictionary<String, String> routerProperties = h.iceReference().toProperty(prefix + ".Router"); foreach(KeyValuePair<string, string> entry in routerProperties) { properties[entry.Key] = entry.Value; @@ -1100,7 +1100,7 @@ namespace IceInternal if(_locatorInfo != null) { Ice.ObjectPrxHelperBase h = (Ice.ObjectPrxHelperBase)_locatorInfo.getLocator(); - Dictionary<String, String> locatorProperties = h.reference__().toProperty(prefix + ".Locator"); + Dictionary<String, String> locatorProperties = h.iceReference().toProperty(prefix + ".Locator"); foreach(KeyValuePair<string, string> entry in locatorProperties) { properties[entry.Key] = entry.Value; diff --git a/csharp/src/Ice/ReferenceFactory.cs b/csharp/src/Ice/ReferenceFactory.cs index eaca68feead..d5782ed7ffc 100644 --- a/csharp/src/Ice/ReferenceFactory.cs +++ b/csharp/src/Ice/ReferenceFactory.cs @@ -56,13 +56,13 @@ namespace IceInternal // Create new reference // return new FixedReference( - instance_, + _instance, _communicator, ident, "", // Facet connection.endpoint().datagram() ? Reference.Mode.ModeDatagram : Reference.Mode.ModeTwoway, connection.endpoint().secure(), - instance_.defaultsAndOverrides().defaultEncoding, + _instance.defaultsAndOverrides().defaultEncoding, connection); } @@ -169,7 +169,7 @@ namespace IceInternal string facet = ""; Reference.Mode mode = Reference.Mode.ModeTwoway; bool secure = false; - Ice.EncodingVersion encoding = instance_.defaultsAndOverrides().defaultEncoding; + Ice.EncodingVersion encoding = _instance.defaultsAndOverrides().defaultEncoding; Ice.ProtocolVersion protocol = Ice.Util.Protocol_1_0; string adapter = ""; @@ -450,7 +450,7 @@ namespace IceInternal } string es = s.Substring(beg, end - beg); - EndpointI endp = instance_.endpointFactoryManager().create(es, false); + EndpointI endp = _instance.endpointFactoryManager().create(es, false); if(endp != null) { endpoints.Add(endp); @@ -468,7 +468,7 @@ namespace IceInternal throw e2; } else if(unknownEndpoints.Count != 0 && - instance_.initializationData().properties.getPropertyAsIntWithDefault( + _instance.initializationData().properties.getPropertyAsIntWithDefault( "Ice.Warn.Endpoints", 1) > 0) { StringBuilder msg = new StringBuilder("Proxy contains unknown endpoints:"); @@ -479,7 +479,7 @@ namespace IceInternal msg.Append((string)unknownEndpoints[idx]); msg.Append("'"); } - instance_.initializationData().logger.warning(msg.ToString()); + _instance.initializationData().logger.warning(msg.ToString()); } EndpointI[] ep = endpoints.ToArray(); @@ -593,9 +593,9 @@ namespace IceInternal if(!s.getEncoding().Equals(Ice.Util.Encoding_1_0)) { protocol = new Ice.ProtocolVersion(); - protocol.read__(s); + protocol.iceRead(s); encoding = new Ice.EncodingVersion(); - encoding.read__(s); + encoding.iceRead(s); } else { @@ -612,7 +612,7 @@ namespace IceInternal endpoints = new EndpointI[sz]; for(int i = 0; i < sz; i++) { - endpoints[i] = instance_.endpointFactoryManager().read(s); + endpoints[i] = _instance.endpointFactoryManager().read(s); } } else @@ -630,7 +630,7 @@ namespace IceInternal return this; } - ReferenceFactory factory = new ReferenceFactory(instance_, _communicator); + ReferenceFactory factory = new ReferenceFactory(_instance, _communicator); factory._defaultLocator = _defaultLocator; factory._defaultRouter = defaultRouter; return factory; @@ -648,7 +648,7 @@ namespace IceInternal return this; } - ReferenceFactory factory = new ReferenceFactory(instance_, _communicator); + ReferenceFactory factory = new ReferenceFactory(_instance, _communicator); factory._defaultLocator = defaultLocator; factory._defaultRouter = _defaultRouter; return factory; @@ -664,7 +664,7 @@ namespace IceInternal // internal ReferenceFactory(Instance instance, Ice.Communicator communicator) { - instance_ = instance; + _instance = instance; _communicator = communicator; } @@ -697,7 +697,7 @@ namespace IceInternal List<string> unknownProps = new List<string>(); Dictionary<string, string> props - = instance_.initializationData().properties.getPropertiesForPrefix(prefix + "."); + = _instance.initializationData().properties.getPropertiesForPrefix(prefix + "."); foreach(String prop in props.Keys) { bool valid = false; @@ -727,7 +727,7 @@ namespace IceInternal message.Append("\n "); message.Append(s); } - instance_.initializationData().logger.warning(message.ToString()); + _instance.initializationData().logger.warning(message.ToString()); } } @@ -741,7 +741,7 @@ namespace IceInternal string adapterId, string propertyPrefix) { - DefaultsAndOverrides defaultsAndOverrides = instance_.defaultsAndOverrides(); + DefaultsAndOverrides defaultsAndOverrides = _instance.defaultsAndOverrides(); // // Default local proxy options. @@ -749,17 +749,17 @@ namespace IceInternal LocatorInfo locatorInfo = null; if(_defaultLocator != null) { - if(!((Ice.ObjectPrxHelperBase)_defaultLocator).reference__().getEncoding().Equals(encoding)) + if(!((Ice.ObjectPrxHelperBase)_defaultLocator).iceReference().getEncoding().Equals(encoding)) { - locatorInfo = instance_.locatorManager().get( + locatorInfo = _instance.locatorManager().get( (Ice.LocatorPrx)_defaultLocator.ice_encodingVersion(encoding)); } else { - locatorInfo = instance_.locatorManager().get(_defaultLocator); + locatorInfo = _instance.locatorManager().get(_defaultLocator); } } - RouterInfo routerInfo = instance_.routerManager().get(_defaultRouter); + RouterInfo routerInfo = _instance.routerManager().get(_defaultRouter); bool collocOptimized = defaultsAndOverrides.defaultCollocationOptimization; bool cacheConnection = true; bool preferSecure = defaultsAndOverrides.defaultPreferSecure; @@ -773,7 +773,7 @@ namespace IceInternal // if(propertyPrefix != null && propertyPrefix.Length > 0) { - Ice.Properties properties = instance_.initializationData().properties; + Ice.Properties properties = _instance.initializationData().properties; // // Warn about unknown properties. @@ -789,14 +789,14 @@ namespace IceInternal Ice.LocatorPrx locator = Ice.LocatorPrxHelper.uncheckedCast(_communicator.propertyToProxy(property)); if(locator != null) { - if(!((Ice.ObjectPrxHelperBase)locator).reference__().getEncoding().Equals(encoding)) + if(!((Ice.ObjectPrxHelperBase)locator).iceReference().getEncoding().Equals(encoding)) { - locatorInfo = instance_.locatorManager().get( + locatorInfo = _instance.locatorManager().get( (Ice.LocatorPrx)locator.ice_encodingVersion(encoding)); } else { - locatorInfo = instance_.locatorManager().get(locator); + locatorInfo = _instance.locatorManager().get(locator); } } @@ -808,11 +808,11 @@ namespace IceInternal { string s = "`" + property + "=" + properties.getProperty(property) + "': cannot set a router on a router; setting ignored"; - instance_.initializationData().logger.warning(s); + _instance.initializationData().logger.warning(s); } else { - routerInfo = instance_.routerManager().get(router); + routerInfo = _instance.routerManager().get(router); } } @@ -858,7 +858,7 @@ namespace IceInternal msg.Append(" `"); msg.Append(properties.getProperty(property)); msg.Append("': defaulting to -1"); - instance_.initializationData().logger.warning(msg.ToString()); + _instance.initializationData().logger.warning(msg.ToString()); } } @@ -876,7 +876,7 @@ namespace IceInternal msg.Append(" `"); msg.Append(properties.getProperty(property)); msg.Append("': defaulting to -1"); - instance_.initializationData().logger.warning(msg.ToString()); + _instance.initializationData().logger.warning(msg.ToString()); } } @@ -895,7 +895,7 @@ namespace IceInternal // // Create new reference // - return new RoutableReference(instance_, + return new RoutableReference(_instance, _communicator, ident, facet, @@ -916,7 +916,7 @@ namespace IceInternal context); } - private Instance instance_; + private Instance _instance; private Ice.Communicator _communicator; private Ice.RouterPrx _defaultRouter; private Ice.LocatorPrx _defaultLocator; diff --git a/csharp/src/Ice/RequestHandlerFactory.cs b/csharp/src/Ice/RequestHandlerFactory.cs index c30707f2492..1e4058738c6 100644 --- a/csharp/src/Ice/RequestHandlerFactory.cs +++ b/csharp/src/Ice/RequestHandlerFactory.cs @@ -26,7 +26,7 @@ namespace IceInternal Ice.ObjectAdapter adapter = _instance.objectAdapterFactory().findObjectAdapter(proxy); if(adapter != null) { - return proxy.setRequestHandler__(new CollocatedRequestHandler(rf, adapter)); + return proxy.iceSetRequestHandler(new CollocatedRequestHandler(rf, adapter)); } } @@ -54,7 +54,7 @@ namespace IceInternal { rf.getConnection(handler); } - return proxy.setRequestHandler__(handler.connect(proxy)); + return proxy.iceSetRequestHandler(handler.connect(proxy)); } internal void diff --git a/csharp/src/Ice/RouterInfo.cs b/csharp/src/Ice/RouterInfo.cs index 1a5fe9b0131..87f786ff0f2 100644 --- a/csharp/src/Ice/RouterInfo.cs +++ b/csharp/src/Ice/RouterInfo.cs @@ -207,7 +207,7 @@ namespace IceInternal // // If getClientProxy() return nil, use router endpoints. // - _clientEndpoints = ((Ice.ObjectPrxHelperBase)_router).reference__().getEndpoints(); + _clientEndpoints = ((Ice.ObjectPrxHelperBase)_router).iceReference().getEndpoints(); } else { @@ -223,7 +223,7 @@ namespace IceInternal clientProxy = clientProxy.ice_timeout(_router.ice_getConnection().timeout()); } - _clientEndpoints = ((Ice.ObjectPrxHelperBase)clientProxy).reference__().getEndpoints(); + _clientEndpoints = ((Ice.ObjectPrxHelperBase)clientProxy).iceReference().getEndpoints(); } } return _clientEndpoints; @@ -240,7 +240,7 @@ namespace IceInternal } serverProxy = serverProxy.ice_router(null); // The server proxy cannot be routed. - _serverEndpoints = ((Ice.ObjectPrxHelperBase)serverProxy).reference__().getEndpoints(); + _serverEndpoints = ((Ice.ObjectPrxHelperBase)serverProxy).iceReference().getEndpoints(); return _serverEndpoints; } } diff --git a/csharp/src/Ice/ServantManager.cs b/csharp/src/Ice/ServantManager.cs index 526e205c514..493b88cbc1a 100644 --- a/csharp/src/Ice/ServantManager.cs +++ b/csharp/src/Ice/ServantManager.cs @@ -19,7 +19,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(instance_ != null); // Must not be called after destruction. + Debug.Assert(_instance != null); // Must not be called after destruction. if(facet == null) { @@ -37,11 +37,11 @@ public sealed class ServantManager if(m.ContainsKey(facet)) { Ice.AlreadyRegisteredException ex = new Ice.AlreadyRegisteredException(); - ex.id = Ice.Util.identityToString(ident, instance_.toStringMode()); + ex.id = Ice.Util.identityToString(ident, _instance.toStringMode()); ex.kindOfObject = "servant"; if(facet.Length > 0) { - ex.id += " -f " + IceUtilInternal.StringUtil.escapeString(facet, "", instance_.toStringMode()); + ex.id += " -f " + IceUtilInternal.StringUtil.escapeString(facet, "", _instance.toStringMode()); } throw ex; } @@ -55,7 +55,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(instance_ != null); // Must not be called after destruction. + Debug.Assert(_instance != null); // Must not be called after destruction. Ice.Object obj = null; _defaultServantMap.TryGetValue(category, out obj); if(obj != null) @@ -74,7 +74,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(instance_ != null); // Must not be called after destruction. + Debug.Assert(_instance != null); // Must not be called after destruction. if(facet == null) { @@ -87,11 +87,11 @@ public sealed class ServantManager if(m == null || !m.ContainsKey(facet)) { Ice.NotRegisteredException ex = new Ice.NotRegisteredException(); - ex.id = Ice.Util.identityToString(ident, instance_.toStringMode()); + ex.id = Ice.Util.identityToString(ident, _instance.toStringMode()); ex.kindOfObject = "servant"; if(facet.Length > 0) { - ex.id += " -f " + IceUtilInternal.StringUtil.escapeString(facet, "", instance_.toStringMode()); + ex.id += " -f " + IceUtilInternal.StringUtil.escapeString(facet, "", _instance.toStringMode()); } throw ex; } @@ -110,7 +110,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(instance_ != null); // Must not be called after destruction. + Debug.Assert(_instance != null); // Must not be called after destruction. Ice.Object obj = null; _defaultServantMap.TryGetValue(category, out obj); @@ -131,14 +131,14 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(instance_ != null); + Debug.Assert(_instance != null); Dictionary<string, Ice.Object> m; _servantMapMap.TryGetValue(ident, out m); if(m == null) { Ice.NotRegisteredException ex = new Ice.NotRegisteredException(); - ex.id = Ice.Util.identityToString(ident, instance_.toStringMode()); + ex.id = Ice.Util.identityToString(ident, _instance.toStringMode()); ex.kindOfObject = "servant"; throw ex; } @@ -158,7 +158,7 @@ public sealed class ServantManager // requests are received over the bidir connection after the // adapter was deactivated. // - //Debug.Assert(instance_ != null); // Must not be called after destruction. + //Debug.Assert(_instance != null); // Must not be called after destruction. if(facet == null) { @@ -189,7 +189,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(instance_ != null); // Must not be called after destruction. + Debug.Assert(_instance != null); // Must not be called after destruction. Ice.Object obj = null; _defaultServantMap.TryGetValue(category, out obj); @@ -201,7 +201,7 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(instance_ != null); // Must not be called after destruction. + Debug.Assert(_instance != null); // Must not be called after destruction. Dictionary<string, Ice.Object> m = _servantMapMap[ident]; if(m != null) @@ -224,7 +224,7 @@ public sealed class ServantManager // adapter was deactivated. // // - //Debug.Assert(instance_ != null); // Must not be called after destruction. + //Debug.Assert(_instance != null); // Must not be called after destruction. Dictionary<string, Ice.Object> m; _servantMapMap.TryGetValue(ident, out m); @@ -244,14 +244,14 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(instance_ != null); // Must not be called after destruction. + Debug.Assert(_instance != null); // Must not be called after destruction. Ice.ServantLocator l; _locatorMap.TryGetValue(category, out l); if(l != null) { Ice.AlreadyRegisteredException ex = new Ice.AlreadyRegisteredException(); - ex.id = IceUtilInternal.StringUtil.escapeString(category, "", instance_.toStringMode()); + ex.id = IceUtilInternal.StringUtil.escapeString(category, "", _instance.toStringMode()); ex.kindOfObject = "servant locator"; throw ex; } @@ -264,14 +264,14 @@ public sealed class ServantManager { lock(this) { - Debug.Assert(instance_ != null); // Must not be called after destruction. + Debug.Assert(_instance != null); // Must not be called after destruction. Ice.ServantLocator l; _locatorMap.TryGetValue(category, out l); if(l == null) { Ice.NotRegisteredException ex = new Ice.NotRegisteredException(); - ex.id = IceUtilInternal.StringUtil.escapeString(category, "", instance_.toStringMode()); + ex.id = IceUtilInternal.StringUtil.escapeString(category, "", _instance.toStringMode()); ex.kindOfObject = "servant locator"; throw ex; } @@ -291,7 +291,7 @@ public sealed class ServantManager // adapter was deactivated. // // - //Debug.Assert(instance_ != null); // Must not be called after destruction. + //Debug.Assert(_instance != null); // Must not be called after destruction. Ice.ServantLocator result; _locatorMap.TryGetValue(category, out result); @@ -304,7 +304,7 @@ public sealed class ServantManager // public ServantManager(Instance instance, string adapterName) { - instance_ = instance; + _instance = instance; _adapterName = adapterName; } @@ -318,7 +318,7 @@ public sealed class ServantManager // //lock(this) //{ - //IceUtil.Assert.FinalizerAssert(instance_ == null); + //IceUtil.Assert.FinalizerAssert(_instance == null); //} } */ @@ -335,12 +335,12 @@ public sealed class ServantManager // // If the ServantManager has already been destroyed, we're done. // - if(instance_ == null) + if(_instance == null) { return; } - logger = instance_.initializationData().logger; + logger = _instance.initializationData().logger; _servantMapMap.Clear(); @@ -349,7 +349,7 @@ public sealed class ServantManager locatorMap = new Dictionary<string, Ice.ServantLocator>(_locatorMap); _locatorMap.Clear(); - instance_ = null; + _instance = null; } foreach(KeyValuePair<string, Ice.ServantLocator> p in locatorMap) @@ -368,7 +368,7 @@ public sealed class ServantManager } } - private Instance instance_; + private Instance _instance; private readonly string _adapterName; private Dictionary <Ice.Identity, Dictionary<string, Ice.Object>> _servantMapMap = new Dictionary<Ice.Identity, Dictionary<string, Ice.Object>>(); diff --git a/csharp/src/Ice/StreamWrapper.cs b/csharp/src/Ice/StreamWrapper.cs index 983182a9ff6..b41cb8a560a 100644 --- a/csharp/src/Ice/StreamWrapper.cs +++ b/csharp/src/Ice/StreamWrapper.cs @@ -25,24 +25,24 @@ namespace IceInternal // Slice sequences are encoded on the wire as a count of elements, followed // by the sequence contents. For arbitrary .NET classes, we do not know how // big the sequence that is eventually written will be. To avoid excessive - // data copying, this class maintains a private bytes_ array of 254 bytes and, + // data copying, this class maintains a private _bytes array of 254 bytes and, // initially, writes data into that array. If more than 254 bytes end up being // written, we write a dummy sequence size of 255 (which occupies five bytes // on the wire) into the stream and, once this class is disposed, patch - // that size to match the actual size. Otherwise, if the bytes_ buffer contains + // that size to match the actual size. Otherwise, if the _bytes buffer contains // fewer than 255 bytes when this class is disposed, we write the sequence size - // as a single byte, followed by the contents of the bytes_ buffer. + // as a single byte, followed by the contents of the _bytes buffer. // public class OutputStreamWrapper : System.IO.Stream, System.IDisposable { public OutputStreamWrapper(Ice.OutputStream s) { - s_ = s; - spos_ = s.pos(); - bytes_ = new byte[254]; - pos_ = 0; - length_ = 0; + _s = s; + _spos = s.pos(); + _bytes = new byte[254]; + _pos = 0; + _length = 0; } public override int Read(byte[] buffer, int offset, int count) @@ -62,38 +62,38 @@ namespace IceInternal Debug.Assert(array != null && offset >= 0 && count >= 0 && offset + count <= array.Length); try { - if(bytes_ != null) + if(_bytes != null) { // - // If we can fit the data into the first 254 bytes, write it to bytes_. + // If we can fit the data into the first 254 bytes, write it to _bytes. // - if(count <= bytes_.Length - pos_) + if(count <= _bytes.Length - _pos) { - System.Buffer.BlockCopy(array, offset, bytes_, pos_, count); - pos_ += count; + System.Buffer.BlockCopy(array, offset, _bytes, _pos, count); + _pos += count; return; } - s_.writeSize(255); // Dummy size, until we know how big the stream + _s.writeSize(255); // Dummy size, until we know how big the stream // really is and can patch the size. - if(pos_ > 0) + if(_pos > 0) { // - // Write the current contents of bytes_. + // Write the current contents of _bytes. // - s_.expand(pos_); - s_.getBuffer().b.put(bytes_, 0, pos_); + _s.expand(_pos); + _s.getBuffer().b.put(_bytes, 0, _pos); } - bytes_ = null; + _bytes = null; } // // Write data passed by caller. // - s_.expand(count); - s_.getBuffer().b.put(array, offset, count); - pos_ += count; + _s.expand(count); + _s.getBuffer().b.put(array, offset, count); + _pos += count; } catch(System.Exception ex) { @@ -105,37 +105,37 @@ namespace IceInternal { try { - if(bytes_ != null) + if(_bytes != null) { // - // If we can fit the data into the first 254 bytes, write it to bytes_. + // If we can fit the data into the first 254 bytes, write it to _bytes. // - if(pos_ < bytes_.Length) + if(_pos < _bytes.Length) { - bytes_[pos_++] = value; + _bytes[_pos++] = value; return; } - s_.writeSize(255); // Dummy size, until we know how big the stream + _s.writeSize(255); // Dummy size, until we know how big the stream // really is and can patch the size. - if(pos_ > 0) + if(_pos > 0) { // - // Write the current contents of bytes_. + // Write the current contents of _bytes. // - s_.expand(pos_); - s_.getBuffer().b.put(bytes_, 0, pos_); + _s.expand(_pos); + _s.getBuffer().b.put(_bytes, 0, _pos); } - bytes_ = null; + _bytes = null; } // // Write data passed by caller. // - s_.expand(1); - s_.getBuffer().b.put(value); - pos_ += 1; + _s.expand(1); + _s.getBuffer().b.put(value); + _pos += 1; } catch(System.Exception ex) { @@ -171,20 +171,20 @@ namespace IceInternal { try { - if(bytes_ != null) + if(_bytes != null) { - Debug.Assert(pos_ <= bytes_.Length); - s_.pos(spos_); - s_.writeSize(pos_); - s_.expand(pos_); - s_.getBuffer().b.put(bytes_, 0, pos_); + Debug.Assert(_pos <= _bytes.Length); + _s.pos(_spos); + _s.writeSize(_pos); + _s.expand(_pos); + _s.getBuffer().b.put(_bytes, 0, _pos); } else { - int currentPos = s_.pos(); - s_.pos(spos_); - s_.writeSize(pos_); // Patch previously-written dummy value. - s_.pos(currentPos); + int currentPos = _s.pos(); + _s.pos(_spos); + _s.writeSize(_pos); // Patch previously-written dummy value. + _s.pos(currentPos); } } catch(System.Exception ex) @@ -197,7 +197,7 @@ namespace IceInternal { get { - return length_; + return _length; } } @@ -205,7 +205,7 @@ namespace IceInternal { get { - return pos_; + return _pos; } set @@ -223,23 +223,23 @@ namespace IceInternal public override void SetLength(long value) { Debug.Assert(value >= 0); - length_ = value; + _length = value; } - private Ice.OutputStream s_; - private int spos_; - private byte[] bytes_; - private int pos_; - private long length_; + private Ice.OutputStream _s; + private int _spos; + private byte[] _bytes; + private int _pos; + private long _length; } public class InputStreamWrapper : System.IO.Stream, System.IDisposable { public InputStreamWrapper(int size, Ice.InputStream s) { - s_ = s; - pos_ = 0; - length_ = size; + _s = s; + _pos = 0; + _length = size; } public override int Read(byte[] buffer, int offset, int count) @@ -247,7 +247,7 @@ namespace IceInternal Debug.Assert(buffer != null && offset >= 0 && count >= 0 && offset + count <= buffer.Length); try { - s_.getBuffer().b.get(buffer, offset, count); + _s.getBuffer().b.get(buffer, offset, count); } catch(System.Exception ex) { @@ -260,7 +260,7 @@ namespace IceInternal { try { - return s_.getBuffer().b.get(); + return _s.getBuffer().b.get(); } catch(System.Exception ex) { @@ -321,7 +321,7 @@ namespace IceInternal { get { - return length_; + return _length; } } @@ -329,7 +329,7 @@ namespace IceInternal { get { - return pos_; + return _pos; } set @@ -345,17 +345,17 @@ namespace IceInternal { case SeekOrigin.Begin: { - pos_ = (int)offset; + _pos = (int)offset; break; } case SeekOrigin.Current: { - pos_ += (int)offset; + _pos += (int)offset; break; } case SeekOrigin.End: { - pos_ = (int)length_ + (int)offset; + _pos = (int)_length + (int)offset; break; } default: @@ -364,8 +364,8 @@ namespace IceInternal break; } } - s_.pos(pos_); - return pos_; + _s.pos(_pos); + return _pos; } public override void SetLength(long value) @@ -373,8 +373,8 @@ namespace IceInternal Debug.Assert(false); } - private Ice.InputStream s_; - private int pos_; - private long length_; + private Ice.InputStream _s; + private int _pos; + private long _length; } } diff --git a/csharp/src/Ice/TraceUtil.cs b/csharp/src/Ice/TraceUtil.cs index cb18fb957a9..8aec8ed6de9 100644 --- a/csharp/src/Ice/TraceUtil.cs +++ b/csharp/src/Ice/TraceUtil.cs @@ -183,7 +183,7 @@ namespace IceInternal } Ice.Identity identity = new Ice.Identity(); - identity.read__(str); + identity.iceRead(str); s.Write("\nidentity = " + Ice.Util.identityToString(identity, toStringMode)); string[] facet = str.readStringSeq(); diff --git a/csharp/src/Ice/UdpEndpointI.cs b/csharp/src/Ice/UdpEndpointI.cs index bdaa9ef35e9..0bcdfc61c82 100644 --- a/csharp/src/Ice/UdpEndpointI.cs +++ b/csharp/src/Ice/UdpEndpointI.cs @@ -259,8 +259,8 @@ namespace IceInternal base.streamWriteImpl(s); if(s.getEncoding().Equals(Ice.Util.Encoding_1_0)) { - Ice.Util.Protocol_1_0.write__(s); - Ice.Util.Encoding_1_0.write__(s); + Ice.Util.Protocol_1_0.iceWrite(s); + Ice.Util.Encoding_1_0.iceWrite(s); } // Not transmitted. //s.writeBool(_connect); diff --git a/csharp/src/Ice/UnknownSlicedValue.cs b/csharp/src/Ice/UnknownSlicedValue.cs index 4f31945a855..0d0d38c0264 100644 --- a/csharp/src/Ice/UnknownSlicedValue.cs +++ b/csharp/src/Ice/UnknownSlicedValue.cs @@ -32,16 +32,16 @@ namespace Ice return _unknownTypeId; } - public override void write__(OutputStream os__) + public override void iceWrite(OutputStream ostr) { - os__.startValue(_slicedData); - os__.endValue(); + ostr.startValue(_slicedData); + ostr.endValue(); } - public override void read__(InputStream is__) + public override void iceRead(InputStream istr) { - is__.startValue(); - _slicedData = is__.endValue(true); + istr.startValue(); + _slicedData = istr.endValue(true); } private string _unknownTypeId; diff --git a/csharp/src/Ice/Value.cs b/csharp/src/Ice/Value.cs index cf4fd0144d7..b3c9924811e 100644 --- a/csharp/src/Ice/Value.cs +++ b/csharp/src/Ice/Value.cs @@ -14,7 +14,7 @@ namespace Ice [Serializable] public abstract class Value : ICloneable { - public static readonly string static_id__ = "::Ice::Object"; + private const string _id = "::Ice::Object"; /// <summary> /// Returns the Slice type ID of the interface supported by this object. @@ -22,7 +22,7 @@ namespace Ice /// <returns>The return value is always ::Ice::Object.</returns> public static string ice_staticId() { - return static_id__; + return _id; } /// <summary> @@ -31,7 +31,7 @@ namespace Ice /// <returns>The return value is always ::Ice::Object.</returns> public virtual string ice_id() { - return static_id__; + return _id; } /// <summary> @@ -50,25 +50,25 @@ namespace Ice { } - public virtual void write__(OutputStream os__) + public virtual void iceWrite(OutputStream ostr) { - os__.startValue(null); - writeImpl__(os__); - os__.endValue(); + ostr.startValue(null); + iceWriteImpl(ostr); + ostr.endValue(); } - public virtual void read__(InputStream is__) + public virtual void iceRead(InputStream istr) { - is__.startValue(); - readImpl__(is__); - is__.endValue(false); + istr.startValue(); + iceReadImpl(istr); + istr.endValue(false); } - protected virtual void writeImpl__(OutputStream os__) + protected virtual void iceWriteImpl(OutputStream ostr) { } - protected virtual void readImpl__(InputStream is__) + protected virtual void iceReadImpl(InputStream istr) { } @@ -87,26 +87,26 @@ namespace Ice { public InterfaceByValue(string id) { - id_ = id; + _id = id; } public override string ice_id() { - return id_; + return _id; } - protected override void writeImpl__(OutputStream os__) + protected override void iceWriteImpl(OutputStream ostr) { - os__.startSlice(ice_id(), -1, true); - os__.endSlice(); + ostr.startSlice(ice_id(), -1, true); + ostr.endSlice(); } - protected override void readImpl__(InputStream is__) + protected override void iceReadImpl(InputStream istr) { - is__.startSlice(); - is__.endSlice(); + istr.startSlice(); + istr.endSlice(); } - private string id_; + private string _id; } } diff --git a/csharp/src/Ice/ValueWriter.cs b/csharp/src/Ice/ValueWriter.cs index 9973e8a51d4..811b3f0c8a0 100644 --- a/csharp/src/Ice/ValueWriter.cs +++ b/csharp/src/Ice/ValueWriter.cs @@ -70,7 +70,7 @@ namespace IceInternal { writeName(name, output); Ice.ObjectPrxHelperBase proxy = (Ice.ObjectPrxHelperBase)val; - output.print(proxy.reference__().ToString()); + output.print(proxy.iceReference().ToString()); } else if(val is Ice.Object) { diff --git a/csharp/src/IceSSL/TrustManager.cs b/csharp/src/IceSSL/TrustManager.cs index 2813ecdc942..d9f53b058c5 100644 --- a/csharp/src/IceSSL/TrustManager.cs +++ b/csharp/src/IceSSL/TrustManager.cs @@ -20,18 +20,18 @@ namespace IceSSL internal TrustManager(Ice.Communicator communicator) { Debug.Assert(communicator != null); - communicator_ = communicator; + _communicator = communicator; Ice.Properties properties = communicator.getProperties(); - traceLevel_ = properties.getPropertyAsInt("IceSSL.Trace.Security"); + _traceLevel = properties.getPropertyAsInt("IceSSL.Trace.Security"); string key = null; try { key = "IceSSL.TrustOnly"; - parse(properties.getProperty(key), rejectAll_, acceptAll_); + parse(properties.getProperty(key), _rejectAll, _acceptAll); key = "IceSSL.TrustOnly.Client"; - parse(properties.getProperty(key), rejectClient_, acceptClient_); + parse(properties.getProperty(key), _rejectClient, _acceptClient); key = "IceSSL.TrustOnly.Server"; - parse(properties.getProperty(key), rejectAllServer_, acceptAllServer_); + parse(properties.getProperty(key), _rejectAllServer, _acceptAllServer); Dictionary<string, string> dict = properties.getPropertiesForPrefix("IceSSL.TrustOnly.Server."); foreach(KeyValuePair<string, string> entry in dict) { @@ -42,11 +42,11 @@ namespace IceSSL parse(entry.Value, reject, accept); if(reject.Count > 0) { - rejectServer_[name] = reject; + _rejectServer[name] = reject; } if(accept.Count > 0) { - acceptServer_[name] = accept; + _acceptServer[name] = accept; } } } @@ -63,20 +63,20 @@ namespace IceSSL List<List<List<RFC2253.RDNPair>>> reject = new List<List<List<RFC2253.RDNPair>>>(), accept = new List<List<List<RFC2253.RDNPair>>>(); - if(rejectAll_.Count != 0) + if(_rejectAll.Count != 0) { - reject.Add(rejectAll_); + reject.Add(_rejectAll); } if(info.incoming) { - if(rejectAllServer_.Count != 0) + if(_rejectAllServer.Count != 0) { - reject.Add(rejectAllServer_); + reject.Add(_rejectAllServer); } if(info.adapterName.Length > 0) { List<List<RFC2253.RDNPair>> p = null; - if(rejectServer_.TryGetValue(info.adapterName, out p)) + if(_rejectServer.TryGetValue(info.adapterName, out p)) { reject.Add(p); } @@ -84,26 +84,26 @@ namespace IceSSL } else { - if(rejectClient_.Count != 0) + if(_rejectClient.Count != 0) { - reject.Add(rejectClient_); + reject.Add(_rejectClient); } } - if(acceptAll_.Count != 0) + if(_acceptAll.Count != 0) { - accept.Add(acceptAll_); + accept.Add(_acceptAll); } if(info.incoming) { - if(acceptAllServer_.Count != 0) + if(_acceptAllServer.Count != 0) { - accept.Add(acceptAllServer_); + accept.Add(_acceptAllServer); } if(info.adapterName.Length > 0) { List<List<RFC2253.RDNPair>> p = null; - if(acceptServer_.TryGetValue(info.adapterName, out p)) + if(_acceptServer.TryGetValue(info.adapterName, out p)) { accept.Add(p); } @@ -111,9 +111,9 @@ namespace IceSSL } else { - if(acceptClient_.Count != 0) + if(_acceptClient.Count != 0) { - accept.Add(acceptClient_); + accept.Add(_acceptClient); } } @@ -138,16 +138,16 @@ namespace IceSSL // // Decompose the subject DN into the RDNs. // - if(traceLevel_ > 0) + if(_traceLevel > 0) { if(info.incoming) { - communicator_.getLogger().trace("Security", "trust manager evaluating client:\n" + + _communicator.getLogger().trace("Security", "trust manager evaluating client:\n" + "subject = " + subjectName + "\n" + "adapter = " + info.adapterName + "\n" + desc); } else { - communicator_.getLogger().trace("Security", "trust manager evaluating server:\n" + + _communicator.getLogger().trace("Security", "trust manager evaluating server:\n" + "subject = " + subjectName + "\n" + desc); } } @@ -171,11 +171,11 @@ namespace IceSSL // foreach(List<List<RFC2253.RDNPair>> matchSet in reject) { - if(traceLevel_ > 0) + if(_traceLevel > 0) { StringBuilder s = new StringBuilder("trust manager rejecting PDNs:\n"); stringify(matchSet, s); - communicator_.getLogger().trace("Security", s.ToString()); + _communicator.getLogger().trace("Security", s.ToString()); } if(match(matchSet, dn)) { @@ -188,11 +188,11 @@ namespace IceSSL // foreach(List<List<RFC2253.RDNPair>> matchSet in accept) { - if(traceLevel_ > 0) + if(_traceLevel > 0) { StringBuilder s = new StringBuilder("trust manager accepting PDNs:\n"); stringify(matchSet, s); - communicator_.getLogger().trace("Security", s.ToString()); + _communicator.getLogger().trace("Security", s.ToString()); } if(match(matchSet, dn)) { @@ -202,7 +202,7 @@ namespace IceSSL } catch(RFC2253.ParseException e) { - communicator_.getLogger().warning( + _communicator.getLogger().warning( "IceSSL: unable to parse certificate DN `" + subjectName + "'\nreason: " + e.reason); } @@ -316,19 +316,19 @@ namespace IceSSL } } - private Ice.Communicator communicator_; - private int traceLevel_; + private Ice.Communicator _communicator; + private int _traceLevel; - private List<List<RFC2253.RDNPair>> rejectAll_ = new List<List<RFC2253.RDNPair>>(); - private List<List<RFC2253.RDNPair>> rejectClient_ = new List<List<RFC2253.RDNPair>>(); - private List<List<RFC2253.RDNPair>> rejectAllServer_ = new List<List<RFC2253.RDNPair>>(); - private Dictionary<string, List<List<RFC2253.RDNPair>>> rejectServer_ = + private List<List<RFC2253.RDNPair>> _rejectAll = new List<List<RFC2253.RDNPair>>(); + private List<List<RFC2253.RDNPair>> _rejectClient = new List<List<RFC2253.RDNPair>>(); + private List<List<RFC2253.RDNPair>> _rejectAllServer = new List<List<RFC2253.RDNPair>>(); + private Dictionary<string, List<List<RFC2253.RDNPair>>> _rejectServer = new Dictionary<string, List<List<RFC2253.RDNPair>>>(); - private List<List<RFC2253.RDNPair>> acceptAll_ = new List<List<RFC2253.RDNPair>>(); - private List<List<RFC2253.RDNPair>> acceptClient_ = new List<List<RFC2253.RDNPair>>(); - private List<List<RFC2253.RDNPair>> acceptAllServer_ = new List<List<RFC2253.RDNPair>>(); - private Dictionary<string, List<List<RFC2253.RDNPair>>> acceptServer_ = + private List<List<RFC2253.RDNPair>> _acceptAll = new List<List<RFC2253.RDNPair>>(); + private List<List<RFC2253.RDNPair>> _acceptClient = new List<List<RFC2253.RDNPair>>(); + private List<List<RFC2253.RDNPair>> _acceptAllServer = new List<List<RFC2253.RDNPair>>(); + private Dictionary<string, List<List<RFC2253.RDNPair>>> _acceptServer = new Dictionary<string, List<List<RFC2253.RDNPair>>>(); } } |