summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cs
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2014-09-24 21:06:55 +0200
committerJose <jose@zeroc.com>2014-09-24 21:06:55 +0200
commitb1087d646fa93c4208dd227d0c9df323ff7c858b (patch)
tree48532138bffdfac0dc5c818593d9c1958cfeeeb5 /cpp/src/slice2cs
parentPHP dependency fixes (diff)
downloadice-b1087d646fa93c4208dd227d0c9df323ff7c858b.tar.bz2
ice-b1087d646fa93c4208dd227d0c9df323ff7c858b.tar.xz
ice-b1087d646fa93c4208dd227d0c9df323ff7c858b.zip
Fixed (ICE-5511) - Consider removing the deprecated AMI mapping
Diffstat (limited to 'cpp/src/slice2cs')
-rw-r--r--cpp/src/slice2cs/Gen.cpp129
1 files changed, 0 insertions, 129 deletions
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 7f0ffd539a2..32dcf69137d 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -4803,28 +4803,6 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
_out << sp;
_out << nl << retS << " end_" << p->name() << spar << getParamsAsyncCB(p, true) << "Ice.AsyncResult r__" << epar
<< ';';
-
- if(cl->hasMetaData("ami") || p->hasMetaData("ami"))
- {
- vector<string> paramsAMI = getParamsAsync(p, false);
-
- //
- // Write two versions of the operation - with and without a
- // context parameter.
- //
- _out << sp;
- if(!deprecateReason.empty())
- {
- _out << nl << "[_System.Obsolete(\"" << deprecateReason << "\")]";
- }
- _out << nl << "bool " << p->name() << "_async" << spar << paramsAMI << epar << ';';
- if(!deprecateReason.empty())
- {
- _out << nl << "[_System.Obsolete(\"" << deprecateReason << "\")]";
- }
- _out << nl << "bool " << p->name() << "_async" << spar << paramsAMI
- << "_System.Collections.Generic.Dictionary<string, string> ctx__" << epar << ';';
- }
}
Slice::Gen::AsyncDelegateVisitor::AsyncDelegateVisitor(IceUtilInternal::Output& out)
@@ -5516,89 +5494,6 @@ Slice::Gen::HelperVisitor::visitClassDefStart(const ClassDefPtr& p)
_out << eb;
_out << eb;
}
-
- //
- // Old AMI mapping.
- //
- if(containingClass->hasMetaData("ami") || op->hasMetaData("ami"))
- {
- vector<string> paramsAMI = getParamsAsync(op, false);
- vector<string> argsAMI = getArgsAsync(op);
- vector<string> argsNewAMI = getArgsAsync(op, true);
-
- string opName = op->name();
- string flatName = "__" + opName + "_name";
-
- //
- // Write two versions of the operation - with and without a
- // context parameter
- //
- _out << sp;
- writeDocCommentAsync(op, InParam);
- _out << nl << "public bool " << opName << "_async" << spar << paramsAMI << epar;
- _out << sb;
- if(op->returnsData())
- {
- _out << nl << "Ice.AsyncResult<" << delType << "> result__;";
- _out << nl << "try";
- _out << sb;
- _out << nl << "checkTwowayOnly__(" << flatName << ");";
- _out << nl << "result__ = begin_" << opName << spar << argsNewAMI << epar << ";";
- _out << eb;
- _out << nl << "catch(Ice.TwowayOnlyException ex)";
- _out << sb;
- _out << nl << "result__ = new IceInternal.TwowayOutgoingAsync<" << delType << ">(this, "
- << flatName << ", " << op->name() << "_completed__, null);";
- _out << nl << "((IceInternal.OutgoingAsyncBase)result__).invokeExceptionAsync(ex);";
- _out << eb;
- }
- else
- {
- _out << nl << "Ice.AsyncResult<" << delType << "> result__ = begin_" << opName << spar << argsNewAMI
- << epar << ";";
- }
- _out << nl << "result__.whenCompleted(cb__.response__, cb__.exception__);";
- _out << nl << "if(cb__ is Ice.AMISentCallback)";
- _out << sb;
- _out << nl << "result__.whenSent((Ice.AsyncCallback)cb__.sent__);";
- _out << eb;
- _out << nl << "return result__.sentSynchronously();";
- _out << eb;
-
- _out << sp;
- writeDocCommentAsync(op, InParam,
- "<param name=\"ctx__\">The Context map to send with the invocation.</param>");
- _out << nl << "public bool " << opName << "_async" << spar << paramsAMI
- << "_System.Collections.Generic.Dictionary<string, string> ctx__" << epar;
- _out << sb;
- if(op->returnsData())
- {
- _out << nl << "Ice.AsyncResult<" << delType << "> result__;";
- _out << nl << "try";
- _out << sb;
- _out << nl << "checkTwowayOnly__(" << flatName << ");";
- _out << nl << "result__ = begin_" << opName << spar << argsNewAMI << "ctx__" << epar << ";";
- _out << eb;
- _out << nl << "catch(Ice.TwowayOnlyException ex)";
- _out << sb;
- _out << nl << "result__ = new IceInternal.TwowayOutgoingAsync<" << delType << ">(this, "
- << flatName << ", " << op->name() << "_completed__, null);";
- _out << nl << "((IceInternal.OutgoingAsyncBase)result__).invokeExceptionAsync(ex);";
- _out << eb;
- }
- else
- {
- _out << nl << "Ice.AsyncResult<" << delType << "> result__ = begin_" << opName << spar << argsNewAMI
- << "ctx__" << epar << ";";
- }
- _out << nl << "result__.whenCompleted(cb__.response__, cb__.exception__);";
- _out << nl << "if(cb__ is Ice.AMISentCallback)";
- _out << sb;
- _out << nl << "result__.whenSent((Ice.AsyncCallback)cb__.sent__);";
- _out << eb;
- _out << nl << "return result__.sentSynchronously();";
- _out << eb;
- }
}
_out << sp << nl << "#endregion"; // Asynchronous operations
@@ -6294,30 +6189,6 @@ Slice::Gen::AsyncVisitor::visitOperation(const OperationPtr& p)
string name = p->name();
- if(cl->hasMetaData("ami") || p->hasMetaData("ami"))
- {
- vector<string> params = getParamsAsyncCB(p);
- vector<string> args = getArgsAsyncCB(p);
-
- _out << sp;
- writeDocCommentOp(p);
- emitComVisibleAttribute();
- emitGeneratedCodeAttribute();
- _out << nl << "public abstract class AMI_" << cl->name() << '_' << name << " : Ice.AMICallbackBase";
- _out << sb;
- _out << sp;
- writeDocCommentAsync(p, OutParam);
- _out << nl << "public abstract void ice_response" << spar << params << epar << ';';
-
- _out << sp;
- _out << nl << "public void response__" << spar << params << epar;
- _out << sb;
- _out << nl << "ice_response" << spar << args << epar << ';';
- _out << eb;
-
- _out << eb;
- }
-
if(cl->hasMetaData("amd") || p->hasMetaData("amd"))
{
string classNameAMD = "AMD_" + cl->name();