summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cs/Gen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cs/Gen.cpp')
-rwxr-xr-xcpp/src/slice2cs/Gen.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index 47a87d9ac85..4984b96d1ae 100755
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -3117,7 +3117,22 @@ Slice::Gen::ProxyVisitor::visitOperation(const OperationPtr& p)
string name = fixId(p->name(), DotNet::ICloneable, true);
vector<string> params = getParams(p);
- _out << sp << nl << typeToString(p->returnType()) << " " << name << spar << params << epar << ';';
+ _out << sp;
+ StringList metaData = p->getMetaData();
+ for(StringList::const_iterator q = metaData.begin(); q != metaData.end(); ++q)
+ {
+ if(q->find("deprecate") == 0)
+ {
+ string reason = "This method has been deprecated.";
+ if(q->find("deprecate:") == 0)
+ {
+ reason = q->substr(10);
+ }
+ _out << nl << "[System.Obsolete(\"" << reason << "\")]";
+ break;
+ }
+ }
+ _out << nl << typeToString(p->returnType()) << " " << name << spar << params << epar << ';';
_out << nl << typeToString(p->returnType()) << " " << name
<< spar << params << "Ice.Context context__" << epar << ';';