summaryrefslogtreecommitdiff
path: root/csharp/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-07-11 21:02:01 +0200
committerJose <jose@zeroc.com>2016-07-11 21:02:01 +0200
commit7dcc23e3a2936f7a8252d2be3c5d35debc68cc1b (patch)
tree6fd64dff92249801d83f373da3c1dd5cfe18b6cb /csharp/src
parentFixed streamFilename bug (diff)
downloadice-7dcc23e3a2936f7a8252d2be3c5d35debc68cc1b.tar.bz2
ice-7dcc23e3a2936f7a8252d2be3c5d35debc68cc1b.tar.xz
ice-7dcc23e3a2936f7a8252d2be3c5d35debc68cc1b.zip
CSharp updates for Visual Studio 2013 compatibility
Diffstat (limited to 'csharp/src')
-rw-r--r--csharp/src/Ice/CommunicatorI.cs5
-rw-r--r--csharp/src/Ice/ConnectionI.cs5
-rw-r--r--csharp/src/Ice/OutgoingAsync.cs10
-rw-r--r--csharp/src/Ice/Proxy.cs46
4 files changed, 53 insertions, 13 deletions
diff --git a/csharp/src/Ice/CommunicatorI.cs b/csharp/src/Ice/CommunicatorI.cs
index 8e968058c16..e2e1f0015f4 100644
--- a/csharp/src/Ice/CommunicatorI.cs
+++ b/csharp/src/Ice/CommunicatorI.cs
@@ -205,7 +205,10 @@ namespace Ice
}
catch(Ice.Exception ex)
{
- exceptionCallback_?.Invoke(ex);
+ if(exceptionCallback_ != null)
+ {
+ exceptionCallback_.Invoke(ex);
+ }
}
};
}
diff --git a/csharp/src/Ice/ConnectionI.cs b/csharp/src/Ice/ConnectionI.cs
index 252909df781..5ddb6579f7a 100644
--- a/csharp/src/Ice/ConnectionI.cs
+++ b/csharp/src/Ice/ConnectionI.cs
@@ -504,7 +504,10 @@ namespace Ice
}
catch(Ice.Exception ex)
{
- exceptionCallback_?.Invoke(ex);
+ if(exceptionCallback_ != null)
+ {
+ exceptionCallback_.Invoke(ex);
+ }
}
};
}
diff --git a/csharp/src/Ice/OutgoingAsync.cs b/csharp/src/Ice/OutgoingAsync.cs
index d9160e9239a..db48881c593 100644
--- a/csharp/src/Ice/OutgoingAsync.cs
+++ b/csharp/src/Ice/OutgoingAsync.cs
@@ -985,7 +985,10 @@ namespace IceInternal
catch(Ice.UserException ex)
{
is_.endEncapsulation();
- userException_?.Invoke(ex);
+ if(userException_!= null)
+ {
+ userException_.Invoke(ex);
+ }
throw new Ice.UnknownUserException(ex.ice_id());
}
}
@@ -1629,7 +1632,10 @@ namespace IceInternal
}
catch(Ice.Exception ex)
{
- exceptionCallback_?.Invoke(ex);
+ if(exceptionCallback_ != null)
+ {
+ exceptionCallback_.Invoke(ex);
+ }
}
};
}
diff --git a/csharp/src/Ice/Proxy.cs b/csharp/src/Ice/Proxy.cs
index e79d6bdfe62..65f5aee516f 100644
--- a/csharp/src/Ice/Proxy.cs
+++ b/csharp/src/Ice/Proxy.cs
@@ -923,7 +923,10 @@ namespace Ice
var completed = new OperationAsyncResultCompletionCallback<Callback_Object_ice_isA, bool>(
(Callback_Object_ice_isA cb, bool result) =>
{
- cb?.Invoke(result);
+ if(cb != null)
+ {
+ cb.Invoke(result);
+ }
}, this, __ice_isA_name, cookie, callback);
ice_isA_invoke__(id, context, completed, synchronous);
return completed;
@@ -1037,7 +1040,10 @@ namespace Ice
var completed = new OperationAsyncResultCompletionCallback<Callback_Object_ice_ping, object>(
(Callback_Object_ice_ping cb, object result) =>
{
- cb?.Invoke();
+ if(cb != null)
+ {
+ cb.Invoke();
+ }
}, this, __ice_ping_name, cookie, callback);
ice_ping_invoke__(context, completed, synchronous);
return completed;
@@ -1132,7 +1138,10 @@ namespace Ice
var completed = new OperationAsyncResultCompletionCallback<Callback_Object_ice_ids, string[]>(
(Callback_Object_ice_ids cb, string[] result) =>
{
- cb?.Invoke(result);
+ if(cb != null)
+ {
+ cb.Invoke(result);
+ }
}, this, __ice_ids_name, cookie, callback);
ice_ids_invoke__(context, completed, synchronous);
return completed;
@@ -1243,7 +1252,10 @@ namespace Ice
var completed = new OperationAsyncResultCompletionCallback<Callback_Object_ice_id, string>(
(Callback_Object_ice_id cb, string result) =>
{
- cb?.Invoke(result);
+ if(cb != null)
+ {
+ cb.Invoke(result);
+ }
}, this, __ice_id_name, cookie, callback);
ice_id_invoke__(context, completed, synchronous);
return completed;
@@ -2092,11 +2104,18 @@ namespace Ice
try
{
result.throwLocalException();
- responseCallback_?.Invoke(getProxy().ice_getCachedConnection());
+ if(responseCallback_ != null)
+ {
+ responseCallback_.Invoke(getProxy().ice_getCachedConnection());
+ }
+
}
catch(Exception ex)
{
- exceptionCallback_?.Invoke(ex);
+ if(exceptionCallback_ != null)
+ {
+ exceptionCallback_.Invoke(ex);
+ }
}
};
}
@@ -2261,7 +2280,10 @@ namespace Ice
}
catch(Exception ex)
{
- exceptionCallback_?.Invoke(ex);
+ if(exceptionCallback_ != null)
+ {
+ exceptionCallback_.Invoke(ex);
+ }
}
};
}
@@ -2590,7 +2612,10 @@ namespace Ice
Object_Ice_invokeResult result = ((InvokeOutgoingAsyncT)outgoing_).result__(wait());
try
{
- responseCallback_?.Invoke(result.returnValue, result.outEncaps);
+ if(responseCallback_ != null)
+ {
+ responseCallback_.Invoke(result.returnValue, result.outEncaps);
+ }
}
catch(Exception ex)
{
@@ -2599,7 +2624,10 @@ namespace Ice
}
catch(Exception ex)
{
- exceptionCallback_?.Invoke(ex);
+ if(exceptionCallback_ != null)
+ {
+ exceptionCallback_.Invoke(ex);
+ }
}
};
}